# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CMeshMultiLodInstance Class Reference

An instance of CMeshMulitLod. More...

#include <mesh_multi_lod_instance.h>

Inheritance diagram for NL3D::CMeshMultiLodInstance:

NL3D::CMeshBaseInstance NL3D::CTransformShape NL3D::CTransform NL3D::IModel NL3D::ITransformable NLMISC::CRefCount NL3D::IAnimatable List of all members.

Public Types

enum  { Lod0Blend = 0x1, Coarse0Loaded = 0x2, Coarse1Loaded = 0x4 }

Public Methods

 CMeshMultiLodInstance ()
 Ctor. More...

 ~CMeshMultiLodInstance ()
 Dstructor. More...

virtual void changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest)
 Change MRM Distance setup. More...

void deleteCoarseInstances ()
 erase Coarses instances from coarseMesh Manager (if instances exist). More...

const CLightContributiongetLightContribution ()
void setCoarseMeshDist (float dist)
float getCoarseMeshDist () const
virtual float getNumTriangles (float distance)
 get an approximation of the number of triangles this instance want render for a fixed distance. More...


Static Public Methods

void registerBasic ()
 Call at the begining of the program, to register the model, and the basic observers. More...


Public Attributes

uint64 _LastLodMatrixDate [2]
 Last Matrix date for Lods. More...

sint64 _LastLodLightingDate [2]
 Last Lighting date for Lods. More...


Private Methods

CRGBA getCoarseMeshLighting ()
 get average color for Sun lighting. Get result from _LightContribution. More...


Static Private Methods

IModelcreator ()

Private Attributes

uint Lod0
 Computed first lod to display for this distance. More...

uint Lod1
uint Flags
 Active blending on lod 0. More...

uint64 CoarseMeshId [2]
 Coarse mesh id. More...

float PolygonCountLod0
 Computed polygon count for the load balancing result. More...

float PolygonCountLod1
float BlendFactor
 Alpha blending to use. More...

float _CoarseMeshDistance
 Corse mesh distance (-1 is the one for the mesh is used). More...


Friends

class CMeshMultiLod
class CMeshMultiLodBalancingObs

Detailed Description

An instance of CMeshMulitLod.

Author:
Cyril 'Hulud' Corvazier , Nevrax France
Date:
2001

Definition at line 51 of file mesh_multi_lod_instance.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
Lod0Blend 
Coarse0Loaded 
Coarse1Loaded 

Definition at line 71 of file mesh_multi_lod_instance.h.


Constructor & Destructor Documentation

NL3D::CMeshMultiLodInstance::CMeshMultiLodInstance  
 

Ctor.

Definition at line 42 of file mesh_multi_lod_instance.cpp.

References _CoarseMeshDistance, and Flags.

Referenced by creator.

NL3D::CMeshMultiLodInstance::~CMeshMultiLodInstance  
 

Dstructor.

Definition at line 51 of file mesh_multi_lod_instance.cpp.

References deleteCoarseInstances.


Member Function Documentation

void NL3D::CMeshMultiLodInstance::changeMRMDistanceSetup float    distanceFinest,
float    distanceMiddle,
float    distanceCoarsest
[virtual]
 

Change MRM Distance setup.

See CMeshBaseInstance::changeMRMDistanceSetup()

Reimplemented from NL3D::CMeshBaseInstance.

Definition at line 281 of file mesh_multi_lod_instance.cpp.

References CMeshMultiLod, and NL3D::CTransformShape::Shape.

IModel* NL3D::CMeshMultiLodInstance::creator   [inline, static, private]
 

Reimplemented from NL3D::CMeshBaseInstance.

Definition at line 120 of file mesh_multi_lod_instance.h.

References CMeshMultiLodInstance, and NL3D::IModel::IModel.

void NL3D::CMeshMultiLodInstance::deleteCoarseInstances  
 

erase Coarses instances from coarseMesh Manager (if instances exist).

Definition at line 69 of file mesh_multi_lod_instance.cpp.

References CMeshMultiLod, Coarse0Loaded, Coarse1Loaded, CoarseMeshId, Flags, NL3D::CMeshBaseInstance::getScene, and NL3D::CTransformShape::Shape.

Referenced by ~CMeshMultiLodInstance.

float NL3D::CMeshMultiLodInstance::getCoarseMeshDist   const [inline]
 

Definition at line 93 of file mesh_multi_lod_instance.h.

References _CoarseMeshDistance.

CRGBA NL3D::CMeshMultiLodInstance::getCoarseMeshLighting   [private]
 

get average color for Sun lighting. Get result from _LightContribution.

Definition at line 106 of file mesh_multi_lod_instance.cpp.

References getLightContribution, NL3D::CMeshBaseInstance::getScene, and nlassert.

const CLightContribution& NL3D::CMeshMultiLodInstance::getLightContribution   [inline]
 

Reimplemented from NL3D::CTransformShape.

Definition at line 89 of file mesh_multi_lod_instance.h.

References NL3D::CTransform::_LightContribution.

Referenced by getCoarseMeshLighting.

float NL3D::CMeshMultiLodInstance::getNumTriangles float    distance [virtual]
 

get an approximation of the number of triangles this instance want 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.

Reimplemented from NL3D::CTransformShape.

Definition at line 294 of file mesh_multi_lod_instance.cpp.

References _CoarseMeshDistance, CMeshMultiLod, and NL3D::CTransformShape::Shape.

void NL3D::CMeshMultiLodInstance::registerBasic   [static]
 

Call at the begining of the program, to register the model, and the basic observers.

Reimplemented from NL3D::CMeshBaseInstance.

Definition at line 60 of file mesh_multi_lod_instance.cpp.

References NL3D::ClipTravId, NL3D::LoadBalancingTravId, NL3D::MeshBaseInstanceId, and NL3D::MeshMultiLodInstanceId.

void NL3D::CMeshMultiLodInstance::setCoarseMeshDist float    dist [inline]
 

Definition at line 92 of file mesh_multi_lod_instance.h.

References _CoarseMeshDistance.


Friends And Related Function Documentation

friend class CMeshMultiLod [friend]
 

Definition at line 121 of file mesh_multi_lod_instance.h.

Referenced by changeMRMDistanceSetup, deleteCoarseInstances, and getNumTriangles.

friend class CMeshMultiLodBalancingObs [friend]
 

Definition at line 122 of file mesh_multi_lod_instance.h.


Member Data Documentation

float NL3D::CMeshMultiLodInstance::_CoarseMeshDistance [private]
 

Corse mesh distance (-1 is the one for the mesh is used).

Definition at line 118 of file mesh_multi_lod_instance.h.

Referenced by CMeshMultiLodInstance, getCoarseMeshDist, getNumTriangles, and setCoarseMeshDist.

sint64 NL3D::CMeshMultiLodInstance::_LastLodLightingDate[2]
 

Last Lighting date for Lods.

Definition at line 85 of file mesh_multi_lod_instance.h.

uint64 NL3D::CMeshMultiLodInstance::_LastLodMatrixDate[2]
 

Last Matrix date for Lods.

Definition at line 82 of file mesh_multi_lod_instance.h.

float NL3D::CMeshMultiLodInstance::BlendFactor [private]
 

Alpha blending to use.

Definition at line 115 of file mesh_multi_lod_instance.h.

uint64 NL3D::CMeshMultiLodInstance::CoarseMeshId[2] [private]
 

Coarse mesh id.

Definition at line 108 of file mesh_multi_lod_instance.h.

Referenced by deleteCoarseInstances.

uint NL3D::CMeshMultiLodInstance::Flags [private]
 

Active blending on lod 0.

Definition at line 105 of file mesh_multi_lod_instance.h.

Referenced by CMeshMultiLodInstance, and deleteCoarseInstances.

uint NL3D::CMeshMultiLodInstance::Lod0 [private]
 

Computed first lod to display for this distance.

Definition at line 101 of file mesh_multi_lod_instance.h.

uint NL3D::CMeshMultiLodInstance::Lod1 [private]
 

Definition at line 102 of file mesh_multi_lod_instance.h.

float NL3D::CMeshMultiLodInstance::PolygonCountLod0 [private]
 

Computed polygon count for the load balancing result.

Definition at line 111 of file mesh_multi_lod_instance.h.

float NL3D::CMeshMultiLodInstance::PolygonCountLod1 [private]
 

Definition at line 112 of file mesh_multi_lod_instance.h.


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