|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::IMeshGeom Class ReferenceInterface for MeshGeom.
More...
#include <mesh_geom.h>
Inheritance diagram for NL3D::IMeshGeom:
List of all members.
Mesh Block Render access |
sint32 | _RootInstanceId |
| This is the head of the list of instances to render in the CMeshBlockManager. -1 if NULL. More...
|
CMeshBlockManager * | _MeshBlockManager |
| The manager which owns our VBHeap data. NULL means manager must try to setup VBHeap. More...
|
uint | _MeshVBHeapId |
| This is the Heap Id setuped in CMeshBlockManager::allocateMeshVBHeap(). More...
|
uint | _MeshVBHeapIndexStart |
| Delta of index for mesh into VBHeap. More...
|
class | CMeshBlockManager |
Public Types |
enum | TRenderFlag {
RenderOpaqueMaterial = 1,
RenderTransparentMaterial = 2,
RenderPassOpaque = 4,
RenderGlobalAlpha = 8,
RenderGADisableZWrite = 16
} |
| Render Flags, used in render. More...
|
Public Methods |
| IMeshGeom () |
| Constructor. More...
|
virtual | ~IMeshGeom () |
| dtor. More...
|
virtual void | initInstance (CMeshBaseInstance *mbi)=0 |
| store usefull information for this meshGeom in the instance. More...
|
virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
| clip this shape with a pyramid. More...
|
virtual void | render (IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)=0 |
| render() this meshGeom in a driver, with the specified TransformShape instance information. More...
|
virtual void | renderSkin (CTransformShape *trans, float alphaMRM)=0 |
| render this meshGeom as a skin, with the specified TransformShape instance information (which gives the driver) NB: trans->isSkinned() is ensured to be true. More...
|
|
virtual float | getNumTriangles (float distance)=0 |
| get an approximation of the number of triangles this instance will render for a fixed distance. More...
|
virtual const NLMISC::CAABBoxExt & | getBoundingBox () const=0 |
| get the extended axis aligned bounding box of the mesh. More...
|
|
virtual bool | supportMeshBlockRendering () const=0 |
| true if this meshGeom support meshBlock rendering. More...
|
virtual bool | sortPerMaterial () const=0 |
| true if the sort criterion must be by material. More...
|
virtual uint | getNumRdrPasses () const=0 |
| return the number of renderPasses for this mesh. More...
|
virtual void | beginMesh (CMeshGeomRenderContext &rdrCtx)=0 |
| The framework call this method when he will render instances of this meshGeom soon. More...
|
virtual void | activeInstance (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount)=0 |
| The framework call this method any time a change of instance occurs. More...
|
virtual void | renderPass (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount, uint rdrPass)=0 |
| The framework call this method to render the current renderPass, with the current instance NB: if the material is blended, DON'T render it!! More...
|
virtual void | endMesh (CMeshGeomRenderContext &rdrCtx)=0 |
| The framework call this method when it has done with this meshGeom. More...
|
virtual bool | getVBHeapInfo (uint &vertexFormat, uint &numVertices) |
| The framework call this method to know if the mesh can fit in VBHeap. More...
|
virtual void | computeMeshVBHeap (void *dst, uint indexStart) |
| When the framework succes to allocate a VBHeap space, it call this method to fill this space and compute shifted Primitive block. More...
|
Detailed Description
Interface for MeshGeom.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 77 of file mesh_geom.h.
Member Enumeration Documentation
enum NL3D::IMeshGeom::TRenderFlag
|
|
|
Render Flags, used in render.
-
Enumeration values:
-
RenderOpaqueMaterial |
|
RenderTransparentMaterial |
|
RenderPassOpaque |
|
RenderGlobalAlpha |
|
RenderGADisableZWrite |
|
Definition at line 82 of file mesh_geom.h. |
Constructor & Destructor Documentation
NL3D::IMeshGeom::IMeshGeom |
( |
|
) |
|
|
NL3D::IMeshGeom::~IMeshGeom |
( |
|
) |
[virtual] |
|
Member Function Documentation
|
The framework call this method any time a change of instance occurs.
Implemented in NL3D::CMeshGeom. |
|
The framework call this method when he will render instances of this meshGeom soon.
Implemented in NL3D::CMeshGeom. |
virtual bool NL3D::IMeshGeom::clip |
( |
const std::vector< CPlane > & |
pyramid, |
|
|
const CMatrix & |
worldMatrix |
|
) |
[inline, virtual] |
|
|
clip this shape with a pyramid.
the pyramid is given in world space.The world matrix of the object is given. -
Parameters:
-
pyramid |
the clipping polytope, planes are normalized. |
worldMatrix |
the world matrix of the instance. |
-
Returns:
-
true if the object is visible, false otherwise. The default behavior is to return true (never clipped).
Reimplemented in NL3D::CMeshGeom.
Definition at line 110 of file mesh_geom.h. |
virtual void NL3D::IMeshGeom::computeMeshVBHeap |
( |
void * |
dst, |
|
|
uint |
indexStart |
|
) |
[inline, virtual] |
|
|
When the framework succes to allocate a VBHeap space, it call this method to fill this space and compute shifted Primitive block.
-
Parameters:
-
the |
dest VertexBuffer. NB: start to fill at dst[0] |
indexStart |
used to shift primitive block. |
Reimplemented in NL3D::CMeshGeom.
Definition at line 195 of file mesh_geom.h. |
|
The framework call this method when it has done with this meshGeom.
Implemented in NL3D::CMeshGeom. |
virtual const NLMISC::CAABBoxExt& NL3D::IMeshGeom::getBoundingBox |
( |
|
) |
const [pure virtual] |
|
|
get the extended axis aligned bounding box of the mesh.
Implemented in NL3D::CMeshGeom. |
virtual uint NL3D::IMeshGeom::getNumRdrPasses |
( |
|
) |
const [pure virtual] |
|
|
return the number of renderPasses for this mesh.
Implemented in NL3D::CMeshGeom. |
virtual float NL3D::IMeshGeom::getNumTriangles |
( |
float |
distance |
) |
[pure virtual] |
|
|
get an approximation of the number of triangles this instance will render for a fixed distance.
-
Parameters:
-
distance |
is the distance of the shape from the eye. |
-
Returns:
-
the approximate number of triangles this instance will render at this distance. This number can be a float. The function MUST be decreasing or constant with the distance but don't have to be continus.
Implemented in NL3D::CMeshGeom. |
virtual bool NL3D::IMeshGeom::getVBHeapInfo |
( |
uint & |
vertexFormat, |
|
|
uint & |
numVertices |
|
) |
[inline, virtual] |
|
|
The framework call this method to know if the mesh can fit in VBHeap.
if yes, deriver must return mesh vertexFormat and num of vertices.
Reimplemented in NL3D::CMeshGeom.
Definition at line 188 of file mesh_geom.h. |
virtual void NL3D::IMeshGeom::initInstance |
( |
CMeshBaseInstance * |
mbi |
) |
[pure virtual] |
|
virtual void NL3D::IMeshGeom::render |
( |
IDriver * |
drv, |
|
|
CTransformShape * |
trans, |
|
|
float |
polygonCount, |
|
|
uint32 |
rdrFlags, |
|
|
float |
globalAlpha |
|
) |
[pure virtual] |
|
|
render() this meshGeom in a driver, with the specified TransformShape instance information.
NB: the meshGeom is ensured to not be skinned to a skeleton, but CMeshGeom may still have skin information.
Implemented in NL3D::CMeshGeom. |
|
The framework call this method to render the current renderPass, with the current instance NB: if the material is blended, DON'T render it!!
Implemented in NL3D::CMeshGeom. |
virtual void NL3D::IMeshGeom::renderSkin |
( |
CTransformShape * |
trans, |
|
|
float |
alphaMRM |
|
) |
[pure virtual] |
|
|
render this meshGeom as a skin, with the specified TransformShape instance information (which gives the driver) NB: trans->isSkinned() is ensured to be true.
All the materials must be rendered.
Implemented in NL3D::CMeshGeom. |
virtual bool NL3D::IMeshGeom::sortPerMaterial |
( |
|
) |
const [pure virtual] |
|
|
true if the sort criterion must be by material.
Else, sort per instance.
Implemented in NL3D::CMeshGeom. |
virtual bool NL3D::IMeshGeom::supportMeshBlockRendering |
( |
|
) |
const [pure virtual] |
|
|
true if this meshGeom support meshBlock rendering.
eg: return false if skinned/meshMorphed.
Implemented in NL3D::CMeshGeom. |
Friends And Related Function Documentation
friend class CMeshBlockManager [friend]
|
|
Member Data Documentation
|
The manager which owns our VBHeap data. NULL means manager must try to setup VBHeap.
Definition at line 211 of file mesh_geom.h.
Referenced by IMeshGeom, and ~IMeshGeom. |
uint NL3D::IMeshGeom::_MeshVBHeapId [private]
|
|
uint NL3D::IMeshGeom::_MeshVBHeapIndexStart [private]
|
|
|
Delta of index for mesh into VBHeap.
Definition at line 215 of file mesh_geom.h. |
sint32 NL3D::IMeshGeom::_RootInstanceId [private]
|
|
The documentation for this class was generated from the following files:
|
|