Panda3D
|
Abstract base class for force field shapes. More...
#include "physxForceFieldShape.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
PhysxForceField * | get_force_field () const |
Returns the owning force field if this is a shape of an include group, else NULL will be returned. | |
LMatrix4f | get_mat () const |
Returns the force field shape's transform. | |
const char * | get_name () const |
Returns the name string. | |
LPoint3f | get_pos () const |
Returns the force field shape's translation. | |
PhysxForceFieldShapeGroup * | get_shape_group () const |
Returns the owning force field shape group. | |
virtual TypeHandle | get_type () const |
virtual void | link (NxForceFieldShape *shapePtr)=0 |
void | ls (ostream &out, int indent_level=0) const |
void | ls () const |
virtual NxForceFieldShape * | ptr () const =0 |
void | release () |
void | set_mat (const LMatrix4f &mat) |
Sets the force field shape's transform. | |
void | set_name (const char *name) |
Sets a name string for this object. | |
void | set_pos (const LPoint3f &pos) |
Sets the force field shape's translation. | |
virtual void | unlink ()=0 |
Static Public Member Functions | |
static PhysxForceFieldShape * | factory (NxShapeType shapeType) |
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. |
Abstract base class for force field shapes.
Definition at line 33 of file physxForceFieldShape.h.
PhysxForceField * PhysxForceFieldShape::get_force_field | ( | ) | const |
Returns the owning force field if this is a shape of an include group, else NULL will be returned.
Definition at line 74 of file physxForceFieldShape.cxx.
LMatrix4f PhysxForceFieldShape::get_mat | ( | ) | const |
Returns the force field shape's transform.
Definition at line 143 of file physxForceFieldShape.cxx.
References PhysxManager::nxMat34_to_mat4(), and LMatrix4f::zeros_mat().
const char * PhysxForceFieldShape::get_name | ( | ) | const |
Returns the name string.
Definition at line 118 of file physxForceFieldShape.cxx.
LPoint3f PhysxForceFieldShape::get_pos | ( | ) | const |
Returns the force field shape's translation.
Definition at line 171 of file physxForceFieldShape.cxx.
References PhysxManager::nxVec3_to_point3(), and LPoint3f::zero().
PhysxForceFieldShapeGroup * PhysxForceFieldShape::get_shape_group | ( | ) | const |
Returns the owning force field shape group.
Definition at line 91 of file physxForceFieldShape.cxx.
static void PhysxForceFieldShape::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 PhysxObject.
Reimplemented in PhysxBoxForceFieldShape, PhysxCapsuleForceFieldShape, PhysxConvexForceFieldShape, and PhysxSphereForceFieldShape.
Definition at line 71 of file physxForceFieldShape.h.
References PhysxObject::init_type().
Referenced by PhysxSphereForceFieldShape::init_type(), PhysxConvexForceFieldShape::init_type(), PhysxCapsuleForceFieldShape::init_type(), and PhysxBoxForceFieldShape::init_type().
void PhysxForceFieldShape::set_mat | ( | const LMatrix4f & | mat | ) |
Sets the force field shape's transform.
Definition at line 130 of file physxForceFieldShape.cxx.
References PhysxManager::mat4_to_nxMat34().
void PhysxForceFieldShape::set_name | ( | const char * | name | ) |
Sets a name string for this object.
The name can be retrieved again with get_name().
Definition at line 104 of file physxForceFieldShape.cxx.
void PhysxForceFieldShape::set_pos | ( | const LPoint3f & | pos | ) |
Sets the force field shape's translation.
Definition at line 156 of file physxForceFieldShape.cxx.
References PhysxManager::point3_to_nxVec3().