File: Delegates.cpp

package info (click to toggle)
box2d 2.0.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,748 kB
  • ctags: 2,143
  • sloc: cpp: 15,308; xml: 1,249; cs: 648; makefile: 338; ansic: 28
file content (28 lines) | stat: -rw-r--r-- 920 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "stdafx.h"
#include "Joint.cpp"
#include "Body.cpp"

namespace Box2D
{
	namespace Net
	{
		/// <summary>
		/// If a body is destroyed, then any joints attached to it are also destroyed.
		/// This prevents memory leaks, but you may unexpectedly be left with an
		/// orphaned joint pointer.
		/// Box2D will notify you when a joint is implicitly destroyed.
		/// It is NOT called if you directly destroy a joint.
		/// DO NOT modify the Box2D world inside this callback.
		/// </summary>
		public delegate void NotifyJointDestroyed(Joint);
		
		/// <summary>
		/// Return true if collision calculations should be performed between shape1 and shape2
		/// Box2D has a default implementation for this, so only add a new delegate if you
		/// want to override the default behavior.
		/// </summary>
		public delegate bool CollisionFilter(Shape shape1, Shape shape2);
	}
}