#include <OPC_Model.h>
Public Member Functions | |
Model () | |
override (BaseModel) bool Build(const OPCODECREATE &create) | |
override (BaseModel) udword GetUsedBytes() const | |
virtual | ~Model () |
Public Member Functions inherited from BaseModel | |
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 () |
Private Member Functions | |
void | Release () |
Additional Inherited Members | |
Protected Member Functions inherited from BaseModel | |
bool | CreateTree (bool no_leaf, bool quantized) |
void | ReleaseBase () |
Protected Attributes inherited from BaseModel | |
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 main collision wrapper, for all trees. Supported trees are:
Usage:
1) Create a static mesh interface using callbacks or pointers. (see OPC_MeshInterface.cpp). Keep it around in your app, since a pointer to this interface is saved internally and used until you release the collision structures.
2) Build a Model using a creation structure:
3) Create a tree collider and set it up:
4) Perform a collision query
5) Stats
Definition at line 23 of file OPC_Model.h.
Model::Model | ( | ) |
|
virtual |
Model::override | ( | BaseModel | ) | const |
Builds a collision model.
create | [in] model creation structure |
Model::override | ( | BaseModel | ) | const |
Gets the number of bytes used by the tree.
|
private |