Panda3D
|
An instance of this class is send with contact reporting events. More...
#include "physxContactPair.h"
Public Member Functions | |
PhysxContactPair (const NxContactPair pair) | |
virtual TypeHandle | force_init_type () |
PhysxActor * | get_actor_a () const |
Returns the first of the two actors that makes up this pair. | |
PhysxActor * | get_actor_b () const |
Returns the second of the two actors that make up his pair. | |
PhysxContactPoint | get_contact_point (unsigned int idx) const |
Returns an instance of PhysxContactPoint, which represents a single entry of this pair's contact stream. | |
unsigned int | get_num_contact_points () |
Returns the total number of contact points reported in this pair's contact stream. | |
LVector3f | get_sum_friction_force () const |
Returns the total tangential force that was applied for this pair. | |
LVector3f | get_sum_normal_force () const |
Returns the total contact normal force that was applied for this pair, to maintain nonpenetration constraints. | |
virtual TypeHandle | get_type () const |
bool | is_deleted_a () const |
Returns true if the first of the two actors is deleted. | |
bool | is_deleted_b () const |
Returns true if the second of the two actors is deleted. | |
MAKE_SEQ (get_contact_points, get_num_contact_points, get_contact_point) | |
Static Public Member Functions | |
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. |
An instance of this class is send with contact reporting events.
It contains detailed information on the contact.
Definition at line 34 of file physxContactPair.h.
PhysxActor * PhysxContactPair::get_actor_a | ( | ) | const |
Returns the first of the two actors that makes up this pair.
Definition at line 29 of file physxContactPair.cxx.
PhysxActor * PhysxContactPair::get_actor_b | ( | ) | const |
Returns the second of the two actors that make up his pair.
Definition at line 47 of file physxContactPair.cxx.
PhysxContactPoint PhysxContactPair::get_contact_point | ( | unsigned int | idx | ) | const |
Returns an instance of PhysxContactPoint, which represents a single entry of this pair's contact stream.
This method is a helper for iterating over the pair's contact stream.
Definition at line 158 of file physxContactPair.cxx.
unsigned int PhysxContactPair::get_num_contact_points | ( | ) |
Returns the total number of contact points reported in this pair's contact stream.
This method is a helper for iterating over the pair's contact stream.
Definition at line 129 of file physxContactPair.cxx.
LVector3f PhysxContactPair::get_sum_friction_force | ( | ) | const |
Returns the total tangential force that was applied for this pair.
You should set the ContactPairFlag CPF_notify_forces in order to receive this value.
Definition at line 114 of file physxContactPair.cxx.
References PhysxManager::nxVec3_to_vec3().
LVector3f PhysxContactPair::get_sum_normal_force | ( | ) | const |
Returns the total contact normal force that was applied for this pair, to maintain nonpenetration constraints.
You should set the ContactPairFlag CPF_notify_forces in order to receive this value.
Definition at line 96 of file physxContactPair.cxx.
References PhysxManager::nxVec3_to_vec3().
static void PhysxContactPair::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from TypedReferenceCount.
Definition at line 62 of file physxContactPair.h.
References TypedReferenceCount::init_type().
bool PhysxContactPair::is_deleted_a | ( | ) | const |
Returns true if the first of the two actors is deleted.
Definition at line 65 of file physxContactPair.cxx.
bool PhysxContactPair::is_deleted_b | ( | ) | const |
Returns true if the second of the two actors is deleted.
Definition at line 77 of file physxContactPair.cxx.