Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

BulletBodyNode Class Reference

Inheritance diagram for BulletBodyNode:
PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject MemoryBase MemoryBase MemoryBase BulletGhostNode BulletRigidBodyNode BulletSoftBodyNode

List of all members.

Public Member Functions

 BulletBodyNode (const char *name)
void add_shape (BulletShape *shape, CPT(TransformState) xform=NULL)
void add_shapes_from_collision_solids (CollisionNode *cnode)
bool check_collision_with (PandaNode *node)
virtual TypeHandle force_init_type ()
LVecBase3 get_anisotropic_friction () const
PN_stdfloat get_ccd_motion_threshold () const
PN_stdfloat get_ccd_swept_sphere_radius () const
bool get_collision_response () const
PN_stdfloat get_contact_processing_threshold () const
PN_stdfloat get_deactivation_time () const
PN_stdfloat get_friction () const
virtual CollideMask get_legal_collide_mask () const
 Returns the subset of CollideMask bits that may be set for this particular type of PandaNode.
int get_num_shapes () const
virtual btCollisionObject * get_object () const =0
PN_stdfloat get_restitution () const
BulletShapeget_shape (int idx) const
LMatrix4 get_shape_mat (int idx) const
LPoint3 get_shape_pos (int idx) const
virtual TypeHandle get_type () const
bool has_anisotropic_friction () const
bool has_contact_response () const
bool is_active () const
bool is_deactivation_enabled () const
bool is_debug_enabled () const
 Returns TRUE if the debug visualisation is enabled for this collision object, and FALSE if the debug visualisation is disabled.
bool is_kinematic () const
bool is_static () const
 MAKE_SEQ (get_shapes, get_num_shapes, get_shape)
bool notifies_collisions () const
void notify_collisions (bool value)
virtual void output (ostream &out) const
 Outputs the Namable.
void remove_shape (BulletShape *shape)
virtual bool safe_to_combine () const
 Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes of compatible type, adding children or whatever.
virtual bool safe_to_combine_children () const
 Returns true if it is generally safe to combine the children of this PandaNode with each other.
virtual bool safe_to_flatten () const
 Returns true if it is generally safe to flatten out this particular kind of Node by duplicating instances, false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).
virtual bool safe_to_flatten_below () const
 Returns true if a flatten operation may safely continue past this node, or false if nodes below this node may not be molested.
virtual bool safe_to_modify_transform () const
 Returns true if it is safe to automatically adjust the transform on this kind of node.
virtual bool safe_to_transform () const
 Returns true if it is generally safe to transform this particular kind of Node by calling the xform() method, false otherwise.
void set_active (bool active, bool force=false)
void set_anisotropic_friction (const LVecBase3 &friction)
void set_ccd_motion_threshold (PN_stdfloat threshold)
void set_ccd_swept_sphere_radius (PN_stdfloat radius)
void set_collision_response (bool value)
void set_contact_processing_threshold (PN_stdfloat threshold)
 The constraint solver can discard solving contacts, if the distance is above this threshold.
void set_deactivation_enabled (const bool enabled, const bool force=false)
void set_deactivation_time (PN_stdfloat dt)
void set_debug_enabled (const bool enabled)
 Enables or disables the debug visualisation for this collision object.
void set_friction (PN_stdfloat friction)
void set_into_collide_mask (CollideMask mask)
 Sets the "into" CollideMask.
void set_kinematic (bool value)
void set_restitution (PN_stdfloat restitution)
void set_static (bool value)

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

bool get_collision_flag (int flag) const
typedef PTA (PT(BulletShape)) BulletShapes
void set_collision_flag (int flag, bool value)

Protected Attributes

btCollisionShape * _shape
BulletShapes _shapes

Detailed Description

Definition at line 34 of file bulletBodyNode.h.


Member Function Documentation

CollideMask BulletBodyNode::get_legal_collide_mask ( ) const [virtual]

Returns the subset of CollideMask bits that may be set for this particular type of PandaNode.

For BodyNodes this returns all bits on.

Reimplemented from PandaNode.

Definition at line 50 of file bulletBodyNode.cxx.

References BitMask< WType, nbits >::all_on().

bool BulletBodyNode::is_debug_enabled ( ) const [inline]

Returns TRUE if the debug visualisation is enabled for this collision object, and FALSE if the debug visualisation is disabled.

Definition at line 275 of file bulletBodyNode.I.

void BulletBodyNode::output ( ostream &  out) const [virtual]

Outputs the Namable.

This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

Reimplemented from PandaNode.

Reimplemented in BulletRigidBodyNode.

Definition at line 152 of file bulletBodyNode.cxx.

bool BulletBodyNode::safe_to_combine ( ) const [virtual]

Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes of compatible type, adding children or whatever.

For instance, an LODNode should not be combined with any other PandaNode, because its set of children is meaningful.

Reimplemented from PandaNode.

Definition at line 113 of file bulletBodyNode.cxx.

bool BulletBodyNode::safe_to_combine_children ( ) const [virtual]

Returns true if it is generally safe to combine the children of this PandaNode with each other.

For instance, an LODNode's children should not be combined with each other, because the set of children is meaningful.

Reimplemented from PandaNode.

Definition at line 128 of file bulletBodyNode.cxx.

bool BulletBodyNode::safe_to_flatten ( ) const [virtual]

Returns true if it is generally safe to flatten out this particular kind of Node by duplicating instances, false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).

Reimplemented from PandaNode.

Definition at line 65 of file bulletBodyNode.cxx.

bool BulletBodyNode::safe_to_flatten_below ( ) const [virtual]

Returns true if a flatten operation may safely continue past this node, or false if nodes below this node may not be molested.

Reimplemented from PandaNode.

Definition at line 141 of file bulletBodyNode.cxx.

bool BulletBodyNode::safe_to_modify_transform ( ) const [virtual]

Returns true if it is safe to automatically adjust the transform on this kind of node.

Usually, this is only a bad idea if the user expects to find a particular transform on the node.

ModelNodes with the preserve_transform flag set are presently the only kinds of nodes that should not have their transform even adjusted.

Reimplemented from PandaNode.

Definition at line 97 of file bulletBodyNode.cxx.

bool BulletBodyNode::safe_to_transform ( ) const [virtual]

Returns true if it is generally safe to transform this particular kind of Node by calling the xform() method, false otherwise.

For instance, it's usually a bad idea to attempt to xform a Character.

Reimplemented from PandaNode.

Definition at line 79 of file bulletBodyNode.cxx.

void BulletBodyNode::set_contact_processing_threshold ( PN_stdfloat  threshold)

The constraint solver can discard solving contacts, if the distance is above this threshold.

Definition at line 529 of file bulletBodyNode.cxx.

void BulletBodyNode::set_debug_enabled ( const bool  enabled) [inline]

Enables or disables the debug visualisation for this collision object.

By default the debug visualisation is enabled.

Definition at line 262 of file bulletBodyNode.I.

void BulletBodyNode::set_into_collide_mask ( CollideMask  mask) [inline]

Sets the "into" CollideMask.

This specifies the set of bits that must be shared with a CollisionNode's "from" CollideMask in order for the CollisionNode to detect a collision with this particular node.

The actual CollideMask that will be set is masked by the return value from get_legal_collide_mask(). Thus, the into_collide_mask cannot be set to anything other than nonzero except for those types of nodes that can be collided into, such as CollisionNodes and GeomNodes.

Reimplemented from PandaNode.

Definition at line 37 of file bulletBodyNode.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations