#include <OPC_BaseModel.h>
Public Member Functions | |
BaseModel () | |
virtual bool | Build (const OPCODECREATE &create)=0 |
inline_ const MeshInterface * | GetMeshInterface () const |
inline_ udword | GetModelCode () const |
inline_ udword | GetNbNodes () const |
inline_ const AABBTree * | GetSourceTree () const |
inline_ const AABBOptimizedTree * | GetTree () const |
inline_ AABBOptimizedTree * | GetTree () |
virtual udword | GetUsedBytes () const =0 |
inline_ BOOL | HasLeafNodes () const |
inline_ BOOL | HasSingleNode () const |
inline_ BOOL | IsQuantized () const |
virtual bool | Refit () |
inline_ void | SetMeshInterface (const MeshInterface *imesh) |
virtual | ~BaseModel () |
Protected Member Functions | |
bool | CreateTree (bool no_leaf, bool quantized) |
void | ReleaseBase () |
Protected Attributes | |
const MeshInterface * | mIMesh |
User-defined mesh interface. More... | |
udword | mModelCode |
Model code = combination of ModelFlag(s) More... | |
AABBTree * | mSource |
Original source tree. More... | |
AABBOptimizedTree * | mTree |
Optimized tree owned by the model. More... | |
The base class for collision models.
Definition at line 50 of file OPC_BaseModel.h.
BaseModel::BaseModel | ( | ) |
|
virtual |
|
pure virtual |
Builds a collision model.
create | [in] model creation structure |
|
protected |
|
inline |
Gets the number of nodes in the tree. Should be 2*N-1 for normal trees and N-1 for optimized ones.
Definition at line 115 of file OPC_BaseModel.h.
|
inline |
|
inline |
|
pure virtual |
Gets the number of bytes used by the tree.
Checks whether the tree has leaf nodes or not.
Definition at line 123 of file OPC_BaseModel.h.
Checks whether the model has a single node or not. This special case must be handled separately.
Definition at line 139 of file OPC_BaseModel.h.
Checks whether the tree is quantized or not.
Definition at line 131 of file OPC_BaseModel.h.
|
virtual |
Refits the collision model. This can be used to handle dynamic meshes. Usage is:
|
protected |
|
inline |
Sets the mesh interface.
imesh | [in] mesh interface |
Definition at line 163 of file OPC_BaseModel.h.
|
protected |
User-defined mesh interface.
Definition at line 166 of file OPC_BaseModel.h.
|
protected |
Model code = combination of ModelFlag(s)
Definition at line 167 of file OPC_BaseModel.h.
|
protected |
Original source tree.
Definition at line 168 of file OPC_BaseModel.h.
|
protected |
Optimized tree owned by the model.
Definition at line 169 of file OPC_BaseModel.h.