C# 클래스 Box2D.Dynamics.World

The world class manages all physics entities, dynamic simulation, and asynchronous queries. The world also contains efficient memory management facilities.
파일 보기 프로젝트 열기: gerich-home/box2dnet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ActiveContacts int
ContactPoolCount int

보호된 프로퍼티들

프로퍼티 타입 설명
Flags int

공개 메소드들

메소드 설명
ClearForces ( ) : void

Call this after you are done with time steps to clear the forces. You normally call this after each call to Step, unless you are performing sub-steps. By default, forces will be automatically cleared, so you don't need to call this function.

CreateBody ( BodyDef def ) : Body

create a rigid body given a definition. No reference to the definition is retained.

CreateJoint ( JointDef def ) : Joint

create a joint to constrain bodies together. No reference to the definition is retained. This may cause the connected bodies to cease colliding.

DestroyBody ( Body body ) : void

destroy a rigid body given a definition. No reference to the definition is retained. This function is locked during callbacks.

DestroyJoint ( Joint j ) : void

destroy a joint. This may cause the connected bodies to begin colliding.

DrawDebugData ( ) : void

Call this to draw shapes and other debug draw data.

PopContact ( Fixture fixtureA, int indexA, Fixture fixtureB, int indexB ) : Contact
PushContact ( Contact contact ) : void
QueryAABB ( IQueryCallback callback, AABB aabb ) : void

Query the world for all fixtures that potentially overlap the provided AABB.

Raycast ( IRayCastCallback callback, Vec2 point1, Vec2 point2 ) : void

Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the starting point.

Step ( float dt, int velocityIterations, int positionIterations ) : void

Take a time step. This performs collision detection, integration, and constraint solution.

World ( Vec2 gravity ) : System
World ( Vec2 gravity, IWorldPool argPool ) : System

Construct a world object.

비공개 메소드들

메소드 설명
AddType ( IDynamicStack creator, ShapeType type1, ShapeType type2 ) : void
DrawJoint ( Joint joint ) : void
DrawShape ( Fixture fixture, Transform xf, Color3f color ) : void
InitializeRegisters ( ) : void
Solve ( TimeStep step ) : void
SolveToi ( TimeStep step ) : void

메소드 상세

ClearForces() 공개 메소드

Call this after you are done with time steps to clear the forces. You normally call this after each call to Step, unless you are performing sub-steps. By default, forces will be automatically cleared, so you don't need to call this function.
public ClearForces ( ) : void
리턴 void

CreateBody() 공개 메소드

create a rigid body given a definition. No reference to the definition is retained.
public CreateBody ( BodyDef def ) : Body
def BodyDef
리턴 Body

CreateJoint() 공개 메소드

create a joint to constrain bodies together. No reference to the definition is retained. This may cause the connected bodies to cease colliding.
public CreateJoint ( JointDef def ) : Joint
def Box2D.Dynamics.Joints.JointDef
리턴 Box2D.Dynamics.Joints.Joint

DestroyBody() 공개 메소드

destroy a rigid body given a definition. No reference to the definition is retained. This function is locked during callbacks.
public DestroyBody ( Body body ) : void
body Body
리턴 void

DestroyJoint() 공개 메소드

destroy a joint. This may cause the connected bodies to begin colliding.
public DestroyJoint ( Joint j ) : void
j Box2D.Dynamics.Joints.Joint
리턴 void

DrawDebugData() 공개 메소드

Call this to draw shapes and other debug draw data.
public DrawDebugData ( ) : void
리턴 void

PopContact() 공개 메소드

public PopContact ( Fixture fixtureA, int indexA, Fixture fixtureB, int indexB ) : Contact
fixtureA Fixture
indexA int
fixtureB Fixture
indexB int
리턴 Box2D.Dynamics.Contacts.Contact

PushContact() 공개 메소드

public PushContact ( Contact contact ) : void
contact Box2D.Dynamics.Contacts.Contact
리턴 void

QueryAABB() 공개 메소드

Query the world for all fixtures that potentially overlap the provided AABB.
public QueryAABB ( IQueryCallback callback, AABB aabb ) : void
callback IQueryCallback a user implemented callback class.
aabb Box2D.Collision.AABB the query box.
리턴 void

Raycast() 공개 메소드

Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the starting point.
public Raycast ( IRayCastCallback callback, Vec2 point1, Vec2 point2 ) : void
callback IRayCastCallback a user implemented callback class.
point1 Box2D.Common.Vec2 the ray starting point
point2 Box2D.Common.Vec2 the ray ending point
리턴 void

Step() 공개 메소드

Take a time step. This performs collision detection, integration, and constraint solution.
public Step ( float dt, int velocityIterations, int positionIterations ) : void
dt float the amount of time to simulate, this should not vary.
velocityIterations int for the velocity constraint solver.
positionIterations int for the position constraint solver.
리턴 void

World() 공개 메소드

public World ( Vec2 gravity ) : System
gravity Box2D.Common.Vec2
리턴 System

World() 공개 메소드

Construct a world object.
public World ( Vec2 gravity, IWorldPool argPool ) : System
gravity Box2D.Common.Vec2 the world gravity vector.
argPool IWorldPool
리턴 System

프로퍼티 상세

ActiveContacts 공개적으로 프로퍼티

public int ActiveContacts
리턴 int

ContactPoolCount 공개적으로 프로퍼티

public int ContactPoolCount
리턴 int

Flags 보호되어 있는 프로퍼티

protected int Flags
리턴 int