Panda3D
Public Member Functions | Public Attributes | List of all members
PhysxActorDesc Class Reference

Descriptor for PhysxActor. More...

#include "physxActorDesc.h"

Public Member Functions

void add_shape (PhysxShapeDesc &desc)
 Adds a shape to the list of collision shapes composing this actor. More...
 
PhysxBodyDesc get_body () const
 Gets the body descriptor for this actor. More...
 
float get_density () const
 Returns the actor's density. More...
 
LMatrix4f get_global_mat () const
 Returns the actor's transform in global space. More...
 
LPoint3f get_global_pos () const
 Returns the actor's position in global space. More...
 
const char * get_name () const
 Returns the optional debug name for this actor. More...
 
bool is_valid () const
 Returns true if the descriptor is valid. More...
 
void set_body (PhysxBodyDesc &desc)
 Sets the body descriptor for this actor. More...
 
void set_density (float density)
 Set the density used during mass/intertia computation. More...
 
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. More...
 
void set_global_mat (const LMatrix4f &mat)
 Set the position and orientation of the actor in global space. More...
 
void set_global_pos (const LPoint3f &pos)
 Set the position of the actor in global space. More...
 
void set_name (const char *name)
 Sets the optional debug name for the actor. More...
 
void set_to_default ()
 (re)sets the structure to the default. More...
 

Public Attributes

NxActorDesc _desc
 

Detailed Description

Descriptor for PhysxActor.

Definition at line 28 of file physxActorDesc.h.

Member Function Documentation

◆ add_shape()

void PhysxActorDesc::add_shape ( PhysxShapeDesc desc)

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

Definition at line 22 of file physxActorDesc.cxx.

◆ get_body()

PhysxBodyDesc PhysxActorDesc::get_body ( ) const

Gets the body descriptor for this actor.

Definition at line 97 of file physxActorDesc.cxx.

◆ get_density()

float PhysxActorDesc::get_density ( ) const

Returns the actor's density.

Definition at line 117 of file physxActorDesc.cxx.

◆ get_global_mat()

LMatrix4f PhysxActorDesc::get_global_mat ( ) const

Returns the actor's transform in global space.

Definition at line 135 of file physxActorDesc.cxx.

References PhysxManager::nxMat34_to_mat4().

◆ get_global_pos()

LPoint3f PhysxActorDesc::get_global_pos ( ) const

Returns the actor's position in global space.

Definition at line 126 of file physxActorDesc.cxx.

References PhysxManager::nxVec3_to_point3().

◆ get_name()

const char * PhysxActorDesc::get_name ( ) const

Returns the optional debug name for this actor.

Definition at line 108 of file physxActorDesc.cxx.

◆ is_valid()

bool PhysxActorDesc::is_valid ( ) const
inline

Returns true if the descriptor is valid.

Definition at line 45 of file physxActorDesc.I.

◆ set_body()

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 88 of file physxActorDesc.cxx.

◆ set_density()

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 42 of file physxActorDesc.cxx.

◆ set_global_hpr()

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 71 of file physxActorDesc.cxx.

References PhysxManager::mat3_to_nxMat33().

◆ set_global_mat()

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 61 of file physxActorDesc.cxx.

◆ set_global_pos()

void PhysxActorDesc::set_global_pos ( const LPoint3f &  pos)

Set the position of the actor in global space.

Definition at line 51 of file physxActorDesc.cxx.

References PhysxManager::point3_to_nxVec3().

◆ set_name()

void PhysxActorDesc::set_name ( const char *  name)

Sets the optional debug name for the actor.

Definition at line 31 of file physxActorDesc.cxx.

Referenced by set_to_default().

◆ set_to_default()

void PhysxActorDesc::set_to_default ( )
inline

(re)sets the structure to the default.

Definition at line 35 of file physxActorDesc.I.

References set_name().


The documentation for this class was generated from the following files: