Panda3D
Public Member Functions

PhysxShapeDesc Class Reference

Abstract base class for shape descriptors. More...

#include "physxShapeDesc.h"

Inheritance diagram for PhysxShapeDesc:
PhysxEnums ReferenceCount MemoryBase PhysxBoxShapeDesc PhysxCapsuleShapeDesc PhysxConvexShapeDesc PhysxHeightFieldShapeDesc PhysxPlaneShapeDesc PhysxSphereShapeDesc PhysxTriangleMeshShapeDesc PhysxWheelShapeDesc

List of all members.

Public Member Functions

float get_density () const
unsigned short get_group () const
LMatrix4f get_local_mat () const
LPoint3f get_local_pos () const
float get_mass () const
unsigned short get_material_index () const
const char * get_name () const
bool get_shape_flag (const PhysxShapeFlag flag) const
float get_skin_width () const
virtual bool is_valid () const =0
virtual NxShapeDesc * ptr () const =0
void set_density (float density)
 Sets the density of this individual shape when computing mass inertial properties for a rigidbody (unless a valid mass >0.0 is provided).
void set_group (unsigned short group)
void set_local_hpr (float h, float p, float r)
void set_local_mat (const LMatrix4f &mat)
void set_local_pos (const LPoint3f &pos)
void set_mass (float mass)
 Sets the mass of this individual shape when computing mass inertial properties for a rigidbody.
void set_material (const PhysxMaterial &material)
void set_material_index (unsigned short index)
void set_name (const char *name)
 Sets a possible debug name.
void set_shape_flag (const PhysxShapeFlag flag, bool value)
void set_skin_width (float skinWidth)
 Specifies by how much shapes can interpenetrate.
virtual void set_to_default ()=0
void set_trigger (bool value)
 This shape will become a trigger shape if this parameter is set to TRUE.

Detailed Description

Abstract base class for shape descriptors.

Descriptors for all the different shape types are derived from this class.

Definition at line 32 of file physxShapeDesc.h.


Member Function Documentation

void PhysxShapeDesc::set_density ( float  density)

Sets the density of this individual shape when computing mass inertial properties for a rigidbody (unless a valid mass >0.0 is provided).

Note that this will only be used if the body has a zero inertia tensor, or if you call PhysxActor::update_mass_from_shapes explicitly.

Definition at line 164 of file physxShapeDesc.cxx.

void PhysxShapeDesc::set_mass ( float  mass)

Sets the mass of this individual shape when computing mass inertial properties for a rigidbody.

When mass<=0.0 then density and volume determine the mass. Note that this will only be used if the body has a zero inertia tensor, or if you call PhysxActor::update_mass_from_shapes explicitly.

Definition at line 148 of file physxShapeDesc.cxx.

void PhysxShapeDesc::set_name ( const char *  name)
void PhysxShapeDesc::set_skin_width ( float  skinWidth)

Specifies by how much shapes can interpenetrate.

Two shapes will interpenetrate by the sum of their skin widths. This means that their graphical representations should be adjusted so that they just touch when the shapes are interpenetrating.

The default skin width is the 'physx-skin-width' parameter.

A skin width sum of zero for two bodies is not permitted because it will lead to an unstable simulation.

If your simulation jitters because resting bodies occasionally lose contact, increasing the size of your collision volumes and the skin width may improve things.

Definition at line 115 of file physxShapeDesc.cxx.

void PhysxShapeDesc::set_trigger ( bool  value)

This shape will become a trigger shape if this parameter is set to TRUE.

It won't take part in collisions, but trigger events if some other shape passes through it.

Definition at line 40 of file physxShapeDesc.cxx.


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