#include <Opcode.h>
Definition at line 51 of file Opcode.h.
◆ BaseModel()
◆ ~BaseModel()
BaseModel::~BaseModel |
( |
| ) |
|
|
virtual |
◆ Build()
Builds a collision model.
- Parameters
-
create | [in] model creation structure |
- Returns
- true if success
◆ CreateTree()
bool BaseModel::CreateTree |
( |
bool |
no_leaf, |
|
|
bool |
quantized |
|
) |
| |
|
protected |
Creates an optimized tree according to user-settings, and setups mModelCode.
- Parameters
-
no_leaf | [in] true for "no leaf" tree |
quantized | [in] true for quantized tree |
- Returns
- true if success
Definition at line 92 of file OPC_BaseModel.cpp.
◆ GetMeshInterface()
Gets the mesh interface.
- Returns
- mesh interface
Definition at line 156 of file Opcode.h.
◆ GetModelCode()
Gets the model's code.
- Returns
- model's code
Definition at line 148 of file Opcode.h.
◆ GetNbNodes()
Gets the number of nodes in the tree. Should be 2*N-1 for normal trees and N-1 for optimized ones.
- Returns
- number of nodes
Definition at line 116 of file Opcode.h.
◆ GetSourceTree()
Gets the source tree.
- Returns
- generic tree
Definition at line 91 of file Opcode.h.
◆ GetTree() [1/2]
Gets the tree.
- Returns
- the collision tree
Definition at line 99 of file Opcode.h.
◆ GetTree() [2/2]
Gets the tree.
- Returns
- the collision tree
Definition at line 107 of file Opcode.h.
◆ GetUsedBytes()
virtual udword Opcode::BaseModel::GetUsedBytes |
( |
| ) |
const |
|
pure virtual |
Gets the number of bytes used by the tree.
- Returns
- amount of bytes used
◆ HasLeafNodes()
Checks whether the tree has leaf nodes or not.
- Returns
- true if the tree has leaf nodes (normal tree), else false (optimized tree)
Definition at line 124 of file Opcode.h.
◆ HasSingleNode()
inline_ BOOL Opcode::BaseModel::HasSingleNode |
( |
| ) |
const |
|
inline |
Checks whether the model has a single node or not. This special case must be handled separately.
- Returns
- true if the model has only 1 node
Definition at line 140 of file Opcode.h.
◆ IsQuantized()
Checks whether the tree is quantized or not.
- Returns
- true if the tree is quantized
Definition at line 132 of file Opcode.h.
◆ Refit()
bool BaseModel::Refit |
( |
| ) |
|
|
virtual |
Refits the collision model. This can be used to handle dynamic meshes. Usage is:
- modify your mesh vertices (keep the topology constant!)
- refit the tree (call this method)
- Returns
- true if success
Definition at line 127 of file OPC_BaseModel.cpp.
◆ ReleaseBase()
void BaseModel::ReleaseBase |
( |
| ) |
|
|
protected |
◆ SetMeshInterface()
Sets the mesh interface.
- Parameters
-
Definition at line 164 of file Opcode.h.
◆ mIMesh
User-defined mesh interface.
Definition at line 167 of file Opcode.h.
◆ mModelCode
udword Opcode::BaseModel::mModelCode |
|
protected |
Model code = combination of ModelFlag(s)
Definition at line 168 of file Opcode.h.
◆ mSource
Original source tree.
Definition at line 169 of file Opcode.h.
◆ mTree
Optimized tree owned by the model.
Definition at line 170 of file Opcode.h.
The documentation for this class was generated from the following files: