Cafu Engine
cf::SceneGraph::TerrainNodeT Class Reference
Inheritance diagram for cf::SceneGraph::TerrainNodeT:

Public Member Functions

 TerrainNodeT ()
 The constructor. More...
 
 TerrainNodeT (const BoundingBox3dT &BB_, const TerrainT &Terrain_, unsigned long TerrainShareID_, const std::string &MaterialName_, const float LightMapPatchSize)
 Constructor for creating a TerrainNodeT from parameters. More...
 
 ~TerrainNodeT ()
 The destructor. More...
 
void WriteTo (std::ostream &OutFile, aux::PoolT &Pool) const
 
const BoundingBox3T< double > & GetBoundingBox () const
 Returns the bounding box of the contents of this scene node. More...
 
bool IsOpaque () const
 TODO / FIXME: This method is a hot-fix for getting the render order with translucent Bezier Patches right. More...
 
void DrawAmbientContrib (const Vector3dT &ViewerPos) const
 Draws the contents of this scene node. More...
 
void DrawStencilShadowVolumes (const Vector3dT &LightPos, const float LightRadius) const
 
void DrawLightSourceContrib (const Vector3dT &ViewerPos, const Vector3dT &LightPos) const
 
void DrawTranslucentContrib (const Vector3dT &ViewerPos) const
 
- Public Member Functions inherited from cf::SceneGraph::GenericNodeT
virtual ~GenericNodeT ()
 The virtual destructor, so that derived classes can safely be deleted via a GenericNodeT (base class) pointer. More...
 
virtual void InitDefaultLightMaps (const float LightMapPatchSize)
 If this NodeT uses lightmaps, this methods initializes default (full-bright) lightmaps for it at the proper size. More...
 
virtual void CreatePatchMeshes (ArrayT< PatchMeshT > &PatchMeshes, ArrayT< ArrayT< ArrayT< Vector3dT > > > &SampleCoords, const float LightMapPatchSize) const
 Creates the patch meshes for this NodeT for the purpose of radiosity computations (CaLight). More...
 
virtual void BackToLightMap (const PatchMeshT &PatchMesh, const float LightMapPatchSize)
 Takes the patches of the given patch mesh back into the lightmap of this node. More...
 

Static Public Member Functions

static TerrainNodeTCreateFromFile_cw (std::istream &InFile, aux::PoolT &Pool, LightMapManT &LMM, SHLMapManT &SMM, const ArrayT< const TerrainT * > &ShTe)
 Named constructor. More...
 
- Static Public Member Functions inherited from cf::SceneGraph::GenericNodeT
static GenericNodeTCreateFromFile_cw (std::istream &InFile, aux::PoolT &Pool, LightMapManT &LMM, SHLMapManT &SMM, PlantDescrManT &PDM, const ArrayT< const TerrainT * > &ShTe, ModelManagerT &ModelMan)
 Reads a GenericNodeT from InFile. More...
 

Constructor & Destructor Documentation

TerrainNodeT::TerrainNodeT ( )

The constructor.

TerrainNodeT::TerrainNodeT ( const BoundingBox3dT BB_,
const TerrainT Terrain_,
unsigned long  TerrainShareID_,
const std::string &  MaterialName_,
const float  LightMapPatchSize 
)

Constructor for creating a TerrainNodeT from parameters.

Parameters
BB_The bounding box of the terrain node.
Terrain_The TerrainT instance to create the TerrainNodeT from.
TerrainShareID_Used for sharing common TerrainT instances across several TerrainNodeT's. (TODO: Needs better documentation!)
MaterialName_Name of the material that is applied to this terrain.
LightMapPatchSizeThe size of the lightmap patches.
TerrainNodeT::~TerrainNodeT ( )

The destructor.

Member Function Documentation

TerrainNodeT * TerrainNodeT::CreateFromFile_cw ( std::istream &  InFile,
aux::PoolT Pool,
LightMapManT LMM,
SHLMapManT SMM,
const ArrayT< const TerrainT * > &  ShTe 
)
static

Named constructor.

void TerrainNodeT::DrawAmbientContrib ( const Vector3dT ViewerPos) const
virtual

Draws the contents of this scene node.

Parameters
ViewerPosPosition of the viewer.

Reimplemented from cf::SceneGraph::GenericNodeT.

const BoundingBox3T< double > & TerrainNodeT::GetBoundingBox ( ) const
virtual

Returns the bounding box of the contents of this scene node.

Reimplemented from cf::SceneGraph::GenericNodeT.

bool TerrainNodeT::IsOpaque ( ) const
virtual

TODO / FIXME: This method is a hot-fix for getting the render order with translucent Bezier Patches right.

It should be removed again and the whole system should be replaced with something as in the Q3 renderer!

Reimplemented from cf::SceneGraph::GenericNodeT.


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