Panda3D
|
Public Types | |
enum | BroadphaseAlgorithm { BA_sweep_and_prune , BA_dynamic_aabb_tree } |
enum | FilterAlgorithm { FA_mask , FA_groups_mask , FA_callback } |
Public Member Functions | |
BulletPersistentManifold | __get_manifold (int idx) const |
void | attach (TypedObject *object) |
void | attach_character (BulletBaseCharacterControllerNode *node) |
void | attach_constraint (BulletConstraint *constraint, bool linked_collision=false) |
Attaches a single constraint to a world. | |
void | attach_ghost (BulletGhostNode *node) |
void | attach_rigid_body (BulletRigidBodyNode *node) |
void | attach_soft_body (BulletSoftBodyNode *node) |
void | attach_vehicle (BulletVehicle *vehicle) |
void | clear_contact_added_callback () |
void | clear_debug_node () |
void | clear_filter_callback () |
void | clear_tick_callback () |
BulletContactResult | contact_test (PandaNode *node, bool use_filter=false) const |
Performas a test for all bodies which are currently in contact with the given body. | |
BulletContactResult | contact_test_pair (PandaNode *node0, PandaNode *node1) const |
Performas a test if the two bodies given as parameters are in contact or not. | |
int | do_physics (PN_stdfloat dt, int max_substeps=1, PN_stdfloat stepsize=1.0f/60.0f) |
bool | filter_test (PandaNode *node0, PandaNode *node1) const |
Performs a test if two bodies should collide or not, based on the collision filter setting. | |
virtual TypeHandle | force_init_type () |
btBroadphaseInterface * | get_broadphase () const |
BulletBaseCharacterControllerNode * | get_character (int idx) const |
BulletConstraint * | get_constraint (int idx) const |
BulletDebugNode * | get_debug_node () const |
btDispatcher * | get_dispatcher () const |
bool | get_force_update_all_aabbs () const |
BulletGhostNode * | get_ghost (int idx) const |
const LVector3 | get_gravity () const |
bool | get_group_collision_flag (unsigned int group1, unsigned int group2) const |
BulletPersistentManifold * | get_manifold (int idx) const |
int | get_num_characters () const |
int | get_num_constraints () const |
int | get_num_ghosts () const |
int | get_num_manifolds () const |
int | get_num_rigid_bodies () const |
int | get_num_soft_bodies () const |
int | get_num_vehicles () const |
BulletRigidBodyNode * | get_rigid_body (int idx) const |
BulletSoftBodyNode * | get_soft_body (int idx) const |
virtual TypeHandle | get_type () const |
BulletVehicle * | get_vehicle (int idx) const |
btDynamicsWorld * | get_world () const |
BulletSoftBodyWorldInfo | get_world_info () |
bool | has_debug_node () const |
BulletAllHitsRayResult | ray_test_all (const LPoint3 &from_pos, const LPoint3 &to_pos, const CollideMask &mask=CollideMask::all_on()) const |
BulletClosestHitRayResult | ray_test_closest (const LPoint3 &from_pos, const LPoint3 &to_pos, const CollideMask &mask=CollideMask::all_on()) const |
void | remove (TypedObject *object) |
void | remove_character (BulletBaseCharacterControllerNode *node) |
void | remove_constraint (BulletConstraint *constraint) |
void | remove_ghost (BulletGhostNode *node) |
void | remove_rigid_body (BulletRigidBodyNode *node) |
void | remove_soft_body (BulletSoftBodyNode *node) |
void | remove_vehicle (BulletVehicle *vehicle) |
void | set_contact_added_callback (CallbackObject *obj) |
void | set_debug_node (BulletDebugNode *node) |
void | set_filter_callback (CallbackObject *obj) |
void | set_force_update_all_aabbs (bool force) |
void | set_gravity (const LVector3 &gravity) |
void | set_gravity (PN_stdfloat gx, PN_stdfloat gy, PN_stdfloat gz) |
void | set_group_collision_flag (unsigned int group1, unsigned int group2, bool enable) |
void | set_tick_callback (CallbackObject *obj, bool is_pretick=false) |
BulletClosestHitSweepResult | sweep_test_closest (BulletShape *shape, const TransformState &from_ts, const TransformState &to_ts, const CollideMask &mask=CollideMask::all_on(), PN_stdfloat penetration=0.0f) const |
Performs a sweep test against all other shapes that match the given group mask. | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static btCollisionObject * | get_collision_object (PandaNode *node) |
static LightMutex & | get_global_lock () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
__get_manifold | |
clear_debug_node | |
Removes a debug node that has been assigned to this BulletWorld. | |
get_character | |
get_constraint | |
get_debug_node | |
get_force_update_all_aabbs | |
get_ghost | |
get_gravity | |
get_num_characters | |
get_num_constraints | |
get_num_ghosts | |
get_num_manifolds | |
get_num_rigid_bodies | |
get_num_soft_bodies | |
get_num_vehicles | |
get_rigid_body | |
get_soft_body | |
get_vehicle | |
get_world_info | |
has_debug_node | |
set_debug_node | |
set_force_update_all_aabbs | |
set_gravity | |
![]() | |
get_type | |
![]() | |
get_ref_count | |
Returns the current reference count. | |
Definition at line 51 of file bulletWorld.h.
enum BulletWorld::BroadphaseAlgorithm |
Definition at line 152 of file bulletWorld.h.
enum BulletWorld::FilterAlgorithm |
Definition at line 157 of file bulletWorld.h.
BulletWorld::BulletWorld | ( | ) |
Definition at line 46 of file bulletWorld.cxx.
|
inline |
Definition at line 17 of file bulletWorld.I.
void BulletWorld::attach | ( | TypedObject * | object | ) |
Definition at line 308 of file bulletWorld.cxx.
void BulletWorld::attach_character | ( | BulletBaseCharacterControllerNode * | node | ) |
Definition at line 428 of file bulletWorld.cxx.
void BulletWorld::attach_constraint | ( | BulletConstraint * | constraint, |
bool | linked_collision = false ) |
Attaches a single constraint to a world.
Collision checks between the linked objects will be disabled if the second parameter is set to TRUE.
Definition at line 469 of file bulletWorld.cxx.
void BulletWorld::attach_ghost | ( | BulletGhostNode * | node | ) |
Definition at line 408 of file bulletWorld.cxx.
void BulletWorld::attach_rigid_body | ( | BulletRigidBodyNode * | node | ) |
Definition at line 368 of file bulletWorld.cxx.
void BulletWorld::attach_soft_body | ( | BulletSoftBodyNode * | node | ) |
Definition at line 388 of file bulletWorld.cxx.
void BulletWorld::attach_vehicle | ( | BulletVehicle * | vehicle | ) |
Definition at line 448 of file bulletWorld.cxx.
void BulletWorld::clear_contact_added_callback | ( | ) |
Definition at line 1168 of file bulletWorld.cxx.
void BulletWorld::clear_filter_callback | ( | ) |
Definition at line 1242 of file bulletWorld.cxx.
void BulletWorld::clear_tick_callback | ( | ) |
Definition at line 1194 of file bulletWorld.cxx.
BulletContactResult BulletWorld::contact_test | ( | PandaNode * | node, |
bool | use_filter = false ) const |
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.
Definition at line 1017 of file bulletWorld.cxx.
BulletContactResult BulletWorld::contact_test_pair | ( | PandaNode * | node0, |
PandaNode * | node1 ) const |
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.
Definition at line 1043 of file bulletWorld.cxx.
int BulletWorld::do_physics | ( | PN_stdfloat | dt, |
int | max_substeps = 1, | ||
PN_stdfloat | stepsize = 1.0f/60.0f ) |
Definition at line 221 of file bulletWorld.cxx.
Performs a test if two bodies should collide or not, based on the collision filter setting.
Definition at line 985 of file bulletWorld.cxx.
|
inlinevirtual |
Reimplemented from TypedReferenceCount.
Definition at line 300 of file bulletWorld.h.
|
inline |
Definition at line 83 of file bulletWorld.I.
|
inlinestatic |
Definition at line 289 of file bulletWorld.h.
|
static |
Definition at line 1089 of file bulletWorld.cxx.
|
inline |
Definition at line 92 of file bulletWorld.I.
|
static |
Definition at line 135 of file bulletWorld.cxx.
bool BulletWorld::get_group_collision_flag | ( | unsigned int | group1, |
unsigned int | group2 ) const |
Definition at line 1126 of file bulletWorld.cxx.
BulletPersistentManifold * BulletWorld::get_manifold | ( | int | idx | ) | const |
Definition at line 1063 of file bulletWorld.cxx.
|
inlinevirtual |
Reimplemented from TypedReferenceCount.
Definition at line 297 of file bulletWorld.h.
|
inline |
Definition at line 74 of file bulletWorld.I.
|
inlinestatic |
Definition at line 292 of file bulletWorld.h.
BulletAllHitsRayResult BulletWorld::ray_test_all | ( | const LPoint3 & | from_pos, |
const LPoint3 & | to_pos, | ||
const CollideMask & | mask = CollideMask::all_on() ) const |
Definition at line 939 of file bulletWorld.cxx.
BulletClosestHitRayResult BulletWorld::ray_test_closest | ( | const LPoint3 & | from_pos, |
const LPoint3 & | to_pos, | ||
const CollideMask & | mask = CollideMask::all_on() ) const |
Definition at line 921 of file bulletWorld.cxx.
void BulletWorld::remove | ( | TypedObject * | object | ) |
Definition at line 338 of file bulletWorld.cxx.
void BulletWorld::remove_character | ( | BulletBaseCharacterControllerNode * | node | ) |
Definition at line 438 of file bulletWorld.cxx.
void BulletWorld::remove_constraint | ( | BulletConstraint * | constraint | ) |
Definition at line 479 of file bulletWorld.cxx.
void BulletWorld::remove_ghost | ( | BulletGhostNode * | node | ) |
Definition at line 418 of file bulletWorld.cxx.
void BulletWorld::remove_rigid_body | ( | BulletRigidBodyNode * | node | ) |
Definition at line 378 of file bulletWorld.cxx.
void BulletWorld::remove_soft_body | ( | BulletSoftBodyNode * | node | ) |
Definition at line 398 of file bulletWorld.cxx.
void BulletWorld::remove_vehicle | ( | BulletVehicle * | vehicle | ) |
Definition at line 458 of file bulletWorld.cxx.
void BulletWorld::set_contact_added_callback | ( | CallbackObject * | obj | ) |
Definition at line 1154 of file bulletWorld.cxx.
void BulletWorld::set_filter_callback | ( | CallbackObject * | obj | ) |
Definition at line 1226 of file bulletWorld.cxx.
void BulletWorld::set_group_collision_flag | ( | unsigned int | group1, |
unsigned int | group2, | ||
bool | enable ) |
Definition at line 1111 of file bulletWorld.cxx.
void BulletWorld::set_tick_callback | ( | CallbackObject * | obj, |
bool | is_pretick = false ) |
Definition at line 1182 of file bulletWorld.cxx.
BulletClosestHitSweepResult BulletWorld::sweep_test_closest | ( | BulletShape * | shape, |
const TransformState & | from_ts, | ||
const TransformState & | to_ts, | ||
const CollideMask & | mask = CollideMask::all_on(), | ||
PN_stdfloat | penetration = 0.0f ) const |
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.
Definition at line 959 of file bulletWorld.cxx.
References BulletClosestHitSweepResult::empty(), TransformState::get_mat, TransformState::get_pos, and TransformState::is_invalid().
BulletPersistentManifold BulletWorld::__get_manifold |
Definition at line 132 of file bulletWorld.h.
void BulletWorld::clear_debug_node |
Removes a debug node that has been assigned to this BulletWorld.
Definition at line 165 of file bulletWorld.h.
BulletBaseCharacterControllerNode * BulletWorld::get_character |
Definition at line 94 of file bulletWorld.h.
BulletConstraint * BulletWorld::get_constraint |
Definition at line 103 of file bulletWorld.h.
|
inline |
Definition at line 165 of file bulletWorld.h.
bool BulletWorld::get_force_update_all_aabbs |
Definition at line 174 of file bulletWorld.h.
BulletGhostNode * BulletWorld::get_ghost |
Definition at line 79 of file bulletWorld.h.
const LVector3 BulletWorld::get_gravity |
Definition at line 163 of file bulletWorld.h.
int BulletWorld::get_num_characters |
Definition at line 94 of file bulletWorld.h.
int BulletWorld::get_num_constraints |
Definition at line 103 of file bulletWorld.h.
int BulletWorld::get_num_ghosts |
Definition at line 79 of file bulletWorld.h.
int BulletWorld::get_num_manifolds |
Definition at line 132 of file bulletWorld.h.
int BulletWorld::get_num_rigid_bodies |
Definition at line 84 of file bulletWorld.h.
int BulletWorld::get_num_soft_bodies |
Definition at line 89 of file bulletWorld.h.
int BulletWorld::get_num_vehicles |
Definition at line 98 of file bulletWorld.h.
BulletRigidBodyNode * BulletWorld::get_rigid_body |
Definition at line 84 of file bulletWorld.h.
BulletSoftBodyNode * BulletWorld::get_soft_body |
Definition at line 89 of file bulletWorld.h.
BulletVehicle * BulletWorld::get_vehicle |
Definition at line 98 of file bulletWorld.h.
BulletSoftBodyWorldInfo BulletWorld::get_world_info |
Definition at line 164 of file bulletWorld.h.
|
inline |
Definition at line 165 of file bulletWorld.h.
void BulletWorld::set_debug_node |
Definition at line 165 of file bulletWorld.h.
void BulletWorld::set_force_update_all_aabbs |
Definition at line 174 of file bulletWorld.h.
void BulletWorld::set_gravity |
Definition at line 163 of file bulletWorld.h.