Panda3D
Public Member Functions | Public Attributes

PhysxActorDesc Class Reference

Descriptor for PhysxActor. More...

#include "physxActorDesc.h"

List of all members.

Public Member Functions

void add_shape (PhysxShapeDesc &desc)
 Adds a shape to the list of collision shapes composing this actor.
PhysxBodyDesc get_body () const
 Gets the body descriptor for this actor.
float get_density () const
 Returns the actor's density.
LMatrix4f get_global_mat () const
 Returns the actor's transform in global space.
LPoint3f get_global_pos () const
 Returns the actor's position in global space.
const char * get_name () const
 Returns the optional debug name for this actor.
bool is_valid () const
 Returns true if the descriptor is valid.
void set_body (PhysxBodyDesc &desc)
 Sets the body descriptor for this actor.
void set_density (float density)
 Set the density used during mass/intertia computation.
void set_global_hpr (float h, float p, float r)
 Sets the orientation of the actor in global space by providing angles for heading, pitch and roll.
void set_global_mat (const LMatrix4f &mat)
 Set the position and orientation of the actor in global space.
void set_global_pos (const LPoint3f &pos)
 Set the position of the actor in global space.
void set_name (const char *name)
 Sets the optional debug name for the actor.
void set_to_default ()
 (re)sets the structure to the default.

Public Attributes

NxActorDesc _desc

Detailed Description

Descriptor for PhysxActor.

Definition at line 30 of file physxActorDesc.h.


Member Function Documentation

void PhysxActorDesc::add_shape ( PhysxShapeDesc desc)

Adds a shape to the list of collision shapes composing this actor.

Definition at line 26 of file physxActorDesc.cxx.

PhysxBodyDesc PhysxActorDesc::get_body ( ) const

Gets the body descriptor for this actor.

Definition at line 119 of file physxActorDesc.cxx.

float PhysxActorDesc::get_density ( ) const

Returns the actor's density.

Definition at line 145 of file physxActorDesc.cxx.

LMatrix4f PhysxActorDesc::get_global_mat ( ) const

Returns the actor's transform in global space.

Definition at line 167 of file physxActorDesc.cxx.

References PhysxManager::nxMat34_to_mat4().

LPoint3f PhysxActorDesc::get_global_pos ( ) const

Returns the actor's position in global space.

Definition at line 156 of file physxActorDesc.cxx.

References PhysxManager::nxVec3_to_point3().

const char * PhysxActorDesc::get_name ( ) const

Returns the optional debug name for this actor.

Definition at line 134 of file physxActorDesc.cxx.

bool PhysxActorDesc::is_valid ( ) const [inline]

Returns true if the descriptor is valid.

Definition at line 56 of file physxActorDesc.I.

void PhysxActorDesc::set_body ( PhysxBodyDesc desc)

Sets the body descriptor for this actor.

The actor will be dynmaic if a body descriptor is set, and static if no body descriptor is set.

Definition at line 108 of file physxActorDesc.cxx.

void PhysxActorDesc::set_density ( float  density)

Set the density used during mass/intertia computation.

This value is used if the actor's shapes do not have a mass asigned.

Definition at line 51 of file physxActorDesc.cxx.

void PhysxActorDesc::set_global_hpr ( float  h,
float  p,
float  r 
)

Sets the orientation of the actor in global space by providing angles for heading, pitch and roll.

Definition at line 88 of file physxActorDesc.cxx.

References LQuaternionf::extract_to_matrix(), PhysxManager::mat3_to_nxMat33(), and LQuaternionf::set_hpr().

void PhysxActorDesc::set_global_mat ( const LMatrix4f mat)

Set the position and orientation of the actor in global space.

Scaling and shear arenot supported, even if the matrix contains a scale or shear.

Definition at line 76 of file physxActorDesc.cxx.

References PhysxManager::mat4_to_nxMat34().

void PhysxActorDesc::set_global_pos ( const LPoint3f pos)

Set the position of the actor in global space.

Definition at line 62 of file physxActorDesc.cxx.

References PhysxManager::point3_to_nxVec3().

void PhysxActorDesc::set_name ( const char *  name)

Sets the optional debug name for the actor.

Definition at line 37 of file physxActorDesc.cxx.

Referenced by set_to_default().

void PhysxActorDesc::set_to_default ( ) [inline]

(re)sets the structure to the default.

Definition at line 44 of file physxActorDesc.I.

References set_name().


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