Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Opcode::HybridModel Class Reference

#include <Opcode.h>

Inheritance diagram for Opcode::HybridModel:
Opcode::BaseModel

Public Member Functions

 HybridModel ()
 
virtual ~HybridModel ()
 
 override (BaseModel) bool Build(const OPCODECREATE &create)
 
 override (BaseModel) udword GetUsedBytes() const
 
 override (BaseModel) bool Refit()
 
inline_ const LeafTrianglesGetLeafTriangles () const
 
inline_ const udwordGetIndices () const
 
- Public Member Functions inherited from Opcode::BaseModel
 BaseModel ()
 
virtual ~BaseModel ()
 
virtual bool Build (const OPCODECREATE &create)=0
 
virtual udword GetUsedBytes () const =0
 
virtual bool Refit ()
 
inline_ const AABBTreeGetSourceTree () const
 
inline_ const AABBOptimizedTreeGetTree () const
 
inline_ AABBOptimizedTreeGetTree ()
 
inline_ udword GetNbNodes () const
 
inline_ BOOL HasLeafNodes () const
 
inline_ BOOL IsQuantized () const
 
inline_ BOOL HasSingleNode () const
 
inline_ udword GetModelCode () const
 
inline_ const MeshInterfaceGetMeshInterface () const
 
inline_ void SetMeshInterface (const MeshInterface *imesh)
 

Additional Inherited Members

- Protected Member Functions inherited from Opcode::BaseModel
void ReleaseBase ()
 
bool CreateTree (bool no_leaf, bool quantized)
 
- Protected Attributes inherited from Opcode::BaseModel
const MeshInterfacemIMesh
 User-defined mesh interface. More...
 
udword mModelCode
 Model code = combination of ModelFlag(s) More...
 
AABBTreemSource
 Original source tree. More...
 
AABBOptimizedTreemTree
 Optimized tree owned by the model. More...
 

Detailed Description

Definition at line 47 of file Opcode.h.

Constructor & Destructor Documentation

HybridModel::HybridModel ( )

Constructor.

Definition at line 96 of file OPC_HybridModel.cpp.

96  :
97  mNbLeaves (0),
98  mTriangles (null),
99  mNbPrimitives (0),
100  mIndices (null)
101 {
102 }
HybridModel::~HybridModel ( )
virtual

Destructor.

Definition at line 109 of file OPC_HybridModel.cpp.

110 {
111  Release();
112 }

Member Function Documentation

inline_ const udword* Opcode::HybridModel::GetIndices ( ) const
inline
inline_ const LeafTriangles* Opcode::HybridModel::GetLeafTriangles ( ) const
inline
Opcode::HybridModel::override ( BaseModel  ) const

Builds a collision model.

Parameters
create[in] model creation structure
Returns
true if success
Opcode::HybridModel::override ( BaseModel  ) const

Gets the number of bytes used by the tree.

Returns
amount of bytes used
Opcode::HybridModel::override ( BaseModel  )

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)
    Returns
    true if success

The documentation for this class was generated from the following files: