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

Public Types

enum  BroadphaseAlgorithm { BA_sweep_and_prune = 0, BA_dynamic_aabb_tree = 1 }
 
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. 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 ()
 Removes a debug node that has been assigned to this BulletWorld. More...
 
 clearFilterCallback ()
 
 clearTickCallback ()
 
BulletContactResult contactTest (PandaNode node, bool use_filter)
 Performas a test for all bodies which are currently in contact with the given body. More...
 
BulletContactResult contactTestPair (PandaNode node0, PandaNode node1)
 Performas a test if the two bodies given as parameters are in contact or not. 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 ()
 
bool getForceUpdateAllAabbs ()
 
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 ()
 
bool hasDebugNode ()
 
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. More...
 
 removeConstraint (BulletConstraint constraint)
 Deprecated. More...
 
 removeGhost (BulletGhostNode node)
 Deprecated. More...
 
 removeRigidBody (BulletRigidBodyNode node)
 Deprecated. More...
 
 removeSoftBody (BulletSoftBodyNode node)
 Deprecated. More...
 
 removeVehicle (BulletVehicle vehicle)
 Deprecated. More...
 
 setContactAddedCallback (CallbackObject obj)
 
 setDebugNode (BulletDebugNode node)
 
 setFilterCallback (CallbackObject obj)
 
 setForceUpdateAllAabbs (bool force)
 
 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)
 Performs a sweep test against all other shapes that match the given group mask. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. 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. More...
 
bool testRefCountIntegrity ()
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool testRefCountNonzero ()
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
bool unref ()
 Explicitly decrements the reference count. 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 ()
 

Public Attributes

BulletBaseCharacterControllerNode characters []
 
BulletConstraint constraints []
 
BulletDebugNode debug_node
 
bool force_update_all_aabbs
 
BulletGhostNode ghosts []
 
LVector3 gravity
 
BulletPersistentManifold manifolds []
 
BulletRigidBodyNode rigid_bodies []
 
BulletSoftBodyNode soft_bodies []
 
BulletVehicle vehicles []
 
BulletSoftBodyWorldInfo world_info
 
- Public Attributes inherited from TypedObject
TypeHandle type
 Returns the TypeHandle representing this object's type. More...
 
- Public Attributes inherited from ReferenceCount
int ref_count
 The current reference count. More...
 

Member Enumeration Documentation

◆ BroadphaseAlgorithm

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 ( )

Removes a debug node that has been assigned to this BulletWorld.

◆ 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 ( )

◆ getForceUpdateAllAabbs()

bool getForceUpdateAllAabbs ( )

◆ 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 ( )

◆ hasDebugNode()

bool hasDebugNode ( )

◆ 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)

◆ setForceUpdateAllAabbs()

setForceUpdateAllAabbs ( bool  force)

◆ 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 
)

Performs a sweep test against all other shapes that match the given group mask.

The provided shape must be a convex shape; it is an error to invoke this method using a non-convex shape.

Member Data Documentation

◆ characters

◆ constraints

BulletConstraint constraints[]

◆ debug_node

BulletDebugNode debug_node

◆ force_update_all_aabbs

bool force_update_all_aabbs

◆ ghosts

BulletGhostNode ghosts[]

◆ gravity

LVector3 gravity

◆ manifolds

◆ rigid_bodies

BulletRigidBodyNode rigid_bodies[]

◆ soft_bodies

BulletSoftBodyNode soft_bodies[]

◆ vehicles

BulletVehicle vehicles[]

◆ world_info