#include <Opcode.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. | |
udword | mModelCode |
Model code = combination of ModelFlag(s) | |
AABBTree * | mSource |
Original source tree. | |
AABBOptimizedTree * | mTree |
Optimized tree owned by the model. |
Constructor.
Definition at line 59 of file OPC_BaseModel.cpp.
BaseModel::~BaseModel | ( | ) | [virtual] |
Destructor.
Definition at line 68 of file OPC_BaseModel.cpp.
virtual bool Opcode::BaseModel::Build | ( | const OPCODECREATE & | create | ) | [pure virtual] |
Builds a collision model.
create | [in] model creation structure |
bool BaseModel::CreateTree | ( | bool | no_leaf, |
bool | quantized | ||
) | [protected] |
Creates an optimized tree according to user-settings, and setups mModelCode.
no_leaf | [in] true for "no leaf" tree |
quantized | [in] true for quantized tree |
Definition at line 92 of file OPC_BaseModel.cpp.
inline_ const MeshInterface* Opcode::BaseModel::GetMeshInterface | ( | ) | const [inline] |
inline_ udword Opcode::BaseModel::GetModelCode | ( | ) | const [inline] |
inline_ udword Opcode::BaseModel::GetNbNodes | ( | ) | const [inline] |
inline_ const AABBTree* Opcode::BaseModel::GetSourceTree | ( | ) | const [inline] |
inline_ const AABBOptimizedTree* Opcode::BaseModel::GetTree | ( | ) | const [inline] |
inline_ AABBOptimizedTree* Opcode::BaseModel::GetTree | ( | ) | [inline] |
virtual udword Opcode::BaseModel::GetUsedBytes | ( | ) | const [pure virtual] |
Gets the number of bytes used by the tree.
inline_ BOOL Opcode::BaseModel::HasLeafNodes | ( | ) | const [inline] |
inline_ BOOL Opcode::BaseModel::HasSingleNode | ( | ) | const [inline] |
inline_ BOOL Opcode::BaseModel::IsQuantized | ( | ) | const [inline] |
bool BaseModel::Refit | ( | ) | [virtual] |
Refits the collision model. This can be used to handle dynamic meshes. Usage is: 1. modify your mesh vertices (keep the topology constant!) 2. refit the tree (call this method)
Definition at line 127 of file OPC_BaseModel.cpp.
void BaseModel::ReleaseBase | ( | ) | [protected] |
Releases everything.
Definition at line 78 of file OPC_BaseModel.cpp.
inline_ void Opcode::BaseModel::SetMeshInterface | ( | const MeshInterface * | imesh | ) | [inline] |
const MeshInterface* Opcode::BaseModel::mIMesh [protected] |
udword Opcode::BaseModel::mModelCode [protected] |
AABBTree* Opcode::BaseModel::mSource [protected] |
AABBOptimizedTree* Opcode::BaseModel::mTree [protected] |