Panda3D
Public Member Functions | Static Public Member Functions
PhysxBoxShape Class Reference

A box shaped collision detection primitive. More...

#include "physxBoxShape.h"

Inheritance diagram for PhysxBoxShape:
PhysxShape PhysxObject PhysxEnums TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
LVector3f get_dimensions () const
 Retrieves the dimensions of the box.
virtual TypeHandle get_type () const
void link (NxShape *shapePtr)
NxShape * ptr () const
void save_to_desc (PhysxBoxShapeDesc &shapeDesc) const
 Saves the state of the shape object to a descriptor.
void set_dimensions (const LVector3f &dimensions)
 Sets the box dimensions.
void unlink ()

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.

Detailed Description

A box shaped collision detection primitive.

Each shape is owned by the actor which it is attached to.

An instance can be created by calling the createShape() method of the PhysxActor object that will own it, with a PhysxBoxShapeDesc object as the parameter, or by adding the shape descriptor to the PhysxActorDesc class before creating the actor.

The shape is deleted by calling release() on the shape itself.

Definition at line 41 of file physxBoxShape.h.


Member Function Documentation

Retrieves the dimensions of the box.

The dimensions are the 'radii' of the box, meaning 1/2 extents in x dimension, 1/2 extents in y dimension, 1/2 extents in z dimension.

Definition at line 93 of file physxBoxShape.cxx.

References PhysxManager::nxVec3_to_vec3(), and LVector3f::zero().

static void PhysxBoxShape::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 PhysxShape.

Definition at line 67 of file physxBoxShape.h.

References PhysxShape::init_type().

void PhysxBoxShape::save_to_desc ( PhysxBoxShapeDesc shapeDesc) const

Saves the state of the shape object to a descriptor.

Definition at line 61 of file physxBoxShape.cxx.

Sets the box dimensions.

The dimensions are the 'radii' of the box, meaning 1/2 extents in x dimension, 1/2 extents in y dimension, 1/2 extents in z dimension.

Definition at line 77 of file physxBoxShape.cxx.

References PhysxManager::vec3_to_nxVec3().


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