Panda3D
Public Types | Public Member Functions | Static Public Member Functions | List of all members
BulletWorld Class Reference
Inheritance diagram for BulletWorld:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

Public Types

enum  BroadphaseAlgorithm { BA_sweep_and_prune = 0, BA_dynamic_aabb_tree = 1 }
 Configuration. More...
 
enum  FilterAlgorithm { FA_mask = 0, FA_groups_mask = 1, FA_callback = 2 }
 

Public Member Functions

 __init__ ()
 
 attach (TypedObject object)
 
 attachCharacter (BulletBaseCharacterControllerNode node)
 Deprecated! Please use BulletWorld::attach. More...
 
 attachConstraint (BulletConstraint constraint, bool linked_collision)
 Attaches a single constraint to a world. Collision checks between the linked objects will be disabled if the second parameter is set to TRUE. More...
 
 attachGhost (BulletGhostNode node)
 Deprecated! Please use BulletWorld::attach. More...
 
 attachRigidBody (BulletRigidBodyNode node)
 Deprecated! Please use BulletWorld::attach. More...
 
 attachSoftBody (BulletSoftBodyNode node)
 Deprecated! Please use BulletWorld::attach. More...
 
 attachVehicle (BulletVehicle vehicle)
 Deprecated! Please use BulletWorld::attach. More...
 
 clearContactAddedCallback ()
 
 clearDebugNode ()
 
 clearFilterCallback ()
 
 clearTickCallback ()
 
BulletContactResult contactTest (PandaNode node, bool use_filter)
 Performas a test for all bodies which are currently in contact with the given body. The test returns a BulletContactResult object which may contain zero, one or more contacts. More...
 
BulletContactResult contactTestPair (PandaNode node0, PandaNode node1)
 Performas a test if the two bodies given as parameters are in contact or not. The test returns a BulletContactResult object which may contain zero or one contacts. More...
 
int doPhysics (float dt, int max_substeps, float stepsize)
 
bool filterTest (PandaNode node0, PandaNode node1)
 Performs a test if two bodies should collide or not, based on the collision filter setting. More...
 
BulletBaseCharacterControllerNode getCharacter (int idx)
 
list getCharacters ()
 
BulletConstraint getConstraint (int idx)
 
list getConstraints ()
 
BulletDebugNode getDebugNode ()
 
BulletGhostNode getGhost (int idx)
 
list getGhosts ()
 
const LVector3 getGravity ()
 
bool getGroupCollisionFlag (unsigned int group1, unsigned int group2)
 
BulletPersistentManifold getManifold (int idx)
 
list getManifolds ()
 
int getNumCharacters ()
 
int getNumConstraints ()
 
int getNumGhosts ()
 
int getNumManifolds ()
 
int getNumRigidBodies ()
 
int getNumSoftBodies ()
 
int getNumVehicles ()
 
list getRigidBodies ()
 
BulletRigidBodyNode getRigidBody (int idx)
 
list getSoftBodies ()
 
BulletSoftBodyNode getSoftBody (int idx)
 
BulletVehicle getVehicle (int idx)
 
list getVehicles ()
 
BulletSoftBodyWorldInfo getWorldInfo ()
 
BulletAllHitsRayResult rayTestAll (const LPoint3 from_pos, const LPoint3 to_pos, const CollideMask mask)
 
BulletClosestHitRayResult rayTestClosest (const LPoint3 from_pos, const LPoint3 to_pos, const CollideMask mask)
 
 remove (TypedObject object)
 
 removeCharacter (BulletBaseCharacterControllerNode node)
 Deprecated.! Please use BulletWorld::remove. More...
 
 removeConstraint (BulletConstraint constraint)
 Deprecated.! Please use BulletWorld::remove. More...
 
 removeGhost (BulletGhostNode node)
 Deprecated.! Please use BulletWorld::remove. More...
 
 removeRigidBody (BulletRigidBodyNode node)
 Deprecated.! Please use BulletWorld::remove. More...
 
 removeSoftBody (BulletSoftBodyNode node)
 Deprecated.! Please use BulletWorld::remove. More...
 
 removeVehicle (BulletVehicle vehicle)
 Deprecated.! Please use BulletWorld::remove. More...
 
 setContactAddedCallback (CallbackObject obj)
 
 setDebugNode (BulletDebugNode node)
 
 setFilterCallback (CallbackObject obj)
 
 setGravity (const LVector3 gravity)
 
 setGravity (float gx, float gy, float gz)
 
 setGroupCollisionFlag (unsigned int group1, unsigned int group2, bool enable)
 
 setTickCallback (CallbackObject obj, bool is_pretick)
 
BulletClosestHitSweepResult sweepTestClosest (BulletShape shape, const TransformState from_ts, const TransformState to_ts, const CollideMask mask, float penetration)
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 Derived classes should override this function to return get_class_type(). More...
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 
- Public Member Functions inherited from ReferenceCount
int getRefCount ()
 Returns the current reference count. More...
 
 ref ()
 Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More...
 
bool unref ()
 Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle getClassType ()
 

Member Enumeration Documentation

◆ BroadphaseAlgorithm

Configuration.

Enumerator
BA_sweep_and_prune 
BA_dynamic_aabb_tree 

◆ FilterAlgorithm

Enumerator
FA_mask 
FA_groups_mask 
FA_callback 

Member Function Documentation

◆ __init__()

__init__ ( )

◆ attach()

attach ( TypedObject  object)

◆ attachCharacter()

attachCharacter ( BulletBaseCharacterControllerNode  node)

Deprecated! Please use BulletWorld::attach.

◆ attachConstraint()

attachConstraint ( BulletConstraint  constraint,
bool  linked_collision 
)

Attaches a single constraint to a world. Collision checks between the linked objects will be disabled if the second parameter is set to TRUE.

◆ attachGhost()

attachGhost ( BulletGhostNode  node)

Deprecated! Please use BulletWorld::attach.

◆ attachRigidBody()

attachRigidBody ( BulletRigidBodyNode  node)

Deprecated! Please use BulletWorld::attach.

◆ attachSoftBody()

attachSoftBody ( BulletSoftBodyNode  node)

Deprecated! Please use BulletWorld::attach.

◆ attachVehicle()

attachVehicle ( BulletVehicle  vehicle)

Deprecated! Please use BulletWorld::attach.

◆ clearContactAddedCallback()

clearContactAddedCallback ( )

◆ clearDebugNode()

clearDebugNode ( )

◆ clearFilterCallback()

clearFilterCallback ( )

◆ clearTickCallback()

clearTickCallback ( )

◆ contactTest()

BulletContactResult contactTest ( PandaNode  node,
bool  use_filter 
)

Performas a test for all bodies which are currently in contact with the given body. The test returns a BulletContactResult object which may contain zero, one or more contacts.

If the optional parameter use_filter is set to TRUE this test will consider filter settings. Otherwise all objects in contact are reported, no matter if they would collide or not.

◆ contactTestPair()

BulletContactResult contactTestPair ( PandaNode  node0,
PandaNode  node1 
)

Performas a test if the two bodies given as parameters are in contact or not. The test returns a BulletContactResult object which may contain zero or one contacts.

◆ doPhysics()

int doPhysics ( float  dt,
int  max_substeps,
float  stepsize 
)

◆ filterTest()

bool filterTest ( PandaNode  node0,
PandaNode  node1 
)

Performs a test if two bodies should collide or not, based on the collision filter setting.

◆ getCharacter()

BulletBaseCharacterControllerNode getCharacter ( int  idx)

◆ getCharacters()

list getCharacters ( )

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getConstraint()

BulletConstraint getConstraint ( int  idx)

◆ getConstraints()

list getConstraints ( )

◆ getDebugNode()

BulletDebugNode getDebugNode ( )

◆ getGhost()

BulletGhostNode getGhost ( int  idx)

◆ getGhosts()

list getGhosts ( )

◆ getGravity()

const LVector3 getGravity ( )

◆ getGroupCollisionFlag()

bool getGroupCollisionFlag ( unsigned int  group1,
unsigned int  group2 
)

◆ getManifold()

BulletPersistentManifold getManifold ( int  idx)

◆ getManifolds()

list getManifolds ( )

◆ getNumCharacters()

int getNumCharacters ( )

◆ getNumConstraints()

int getNumConstraints ( )

◆ getNumGhosts()

int getNumGhosts ( )

◆ getNumManifolds()

int getNumManifolds ( )

◆ getNumRigidBodies()

int getNumRigidBodies ( )

◆ getNumSoftBodies()

int getNumSoftBodies ( )

◆ getNumVehicles()

int getNumVehicles ( )

◆ getRigidBodies()

list getRigidBodies ( )

◆ getRigidBody()

BulletRigidBodyNode getRigidBody ( int  idx)

◆ getSoftBodies()

list getSoftBodies ( )

◆ getSoftBody()

BulletSoftBodyNode getSoftBody ( int  idx)

◆ getVehicle()

BulletVehicle getVehicle ( int  idx)

◆ getVehicles()

list getVehicles ( )

◆ getWorldInfo()

BulletSoftBodyWorldInfo getWorldInfo ( )

◆ rayTestAll()

BulletAllHitsRayResult rayTestAll ( const LPoint3  from_pos,
const LPoint3  to_pos,
const CollideMask  mask 
)

◆ rayTestClosest()

BulletClosestHitRayResult rayTestClosest ( const LPoint3  from_pos,
const LPoint3  to_pos,
const CollideMask  mask 
)

◆ remove()

remove ( TypedObject  object)

◆ removeCharacter()

removeCharacter ( BulletBaseCharacterControllerNode  node)

Deprecated.! Please use BulletWorld::remove.

◆ removeConstraint()

removeConstraint ( BulletConstraint  constraint)

Deprecated.! Please use BulletWorld::remove.

◆ removeGhost()

removeGhost ( BulletGhostNode  node)

Deprecated.! Please use BulletWorld::remove.

◆ removeRigidBody()

removeRigidBody ( BulletRigidBodyNode  node)

Deprecated.! Please use BulletWorld::remove.

◆ removeSoftBody()

removeSoftBody ( BulletSoftBodyNode  node)

Deprecated.! Please use BulletWorld::remove.

◆ removeVehicle()

removeVehicle ( BulletVehicle  vehicle)

Deprecated.! Please use BulletWorld::remove.

◆ setContactAddedCallback()

setContactAddedCallback ( CallbackObject  obj)

◆ setDebugNode()

setDebugNode ( BulletDebugNode  node)

◆ setFilterCallback()

setFilterCallback ( CallbackObject  obj)

◆ setGravity() [1/2]

setGravity ( const LVector3  gravity)

◆ setGravity() [2/2]

setGravity ( float  gx,
float  gy,
float  gz 
)

◆ setGroupCollisionFlag()

setGroupCollisionFlag ( unsigned int  group1,
unsigned int  group2,
bool  enable 
)

◆ setTickCallback()

setTickCallback ( CallbackObject  obj,
bool  is_pretick 
)

◆ sweepTestClosest()

BulletClosestHitSweepResult sweepTestClosest ( BulletShape  shape,
const TransformState  from_ts,
const TransformState  to_ts,
const CollideMask  mask,
float  penetration 
)