Public Member Functions | Protected Member Functions | Protected Attributes
BaseModel Class Reference

#include <OPC_BaseModel.h>

Inheritance diagram for BaseModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 BaseModel ()
virtual bool Build (const OPCODECREATE &create)=0
inline_ const MeshInterfaceGetMeshInterface () const
inline_ udword GetModelCode () const
inline_ udword GetNbNodes () const
inline_ const AABBTreeGetSourceTree () const
inline_ const AABBOptimizedTreeGetTree () const
inline_ AABBOptimizedTreeGetTree ()
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 MeshInterfacemIMesh
 User-defined mesh interface.
udword mModelCode
 Model code = combination of ModelFlag(s)
AABBTreemSource
 Original source tree.
AABBOptimizedTreemTree
 Optimized tree owned by the model.

Detailed Description

The base class for collision models.

Author:
Pierre Terdiman
Version:
1.3
Date:
May, 18, 2003

Definition at line 50 of file OPC_BaseModel.h.


Constructor & Destructor Documentation

virtual BaseModel::~BaseModel ( ) [virtual]

Member Function Documentation

virtual bool BaseModel::Build ( const OPCODECREATE create) [pure virtual]

Builds a collision model.

Parameters:
create[in] model creation structure
Returns:
true if success
bool BaseModel::CreateTree ( bool  no_leaf,
bool  quantized 
) [protected]

Gets the mesh interface.

Returns:
mesh interface

Definition at line 155 of file OPC_BaseModel.h.

Gets the model's code.

Returns:
model's code

Definition at line 147 of file OPC_BaseModel.h.

inline_ udword BaseModel::GetNbNodes ( ) const [inline]

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 115 of file OPC_BaseModel.h.

Gets the source tree.

Returns:
generic tree

Definition at line 90 of file OPC_BaseModel.h.

Gets the tree.

Returns:
the collision tree

Definition at line 98 of file OPC_BaseModel.h.

Gets the tree.

Returns:
the collision tree

Definition at line 106 of file OPC_BaseModel.h.

virtual udword BaseModel::GetUsedBytes ( ) const [pure virtual]

Gets the number of bytes used by the tree.

Returns:
amount of bytes used
inline_ BOOL BaseModel::HasLeafNodes ( ) const [inline]

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 123 of file OPC_BaseModel.h.

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 139 of file OPC_BaseModel.h.

inline_ BOOL BaseModel::IsQuantized ( ) const [inline]

Checks whether the tree is quantized or not.

Returns:
true if the tree is quantized

Definition at line 131 of file OPC_BaseModel.h.

virtual 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)

Returns:
true if success
void BaseModel::ReleaseBase ( ) [protected]

Sets the mesh interface.

Parameters:
imesh[in] mesh interface

Definition at line 163 of file OPC_BaseModel.h.


Member Data Documentation

User-defined mesh interface.

Definition at line 166 of file OPC_BaseModel.h.

Model code = combination of ModelFlag(s)

Definition at line 167 of file OPC_BaseModel.h.

Original source tree.

Definition at line 168 of file OPC_BaseModel.h.

Optimized tree owned by the model.

Definition at line 169 of file OPC_BaseModel.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:43:59