Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

demeter::TerrainBlock Class Reference

Collaboration diagram for demeter::TerrainBlock:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TerrainBlock (TerrainBlock *pParent)
 TerrainBlock (int homeVertex, int stride, Terrain *pTerrain, TerrainBlock *pParent)
 ~TerrainBlock ()
void Tessellate (double *pMatrixModelview, double *pMatrixProjection, int *pViewport, TriangleStrip *pTriangleStrips, TriangleFan *pTriangleFans, int *pCountStrips, int *pCountFans, Terrain *pTerrain)
void Write (FILE *file)
void Read (FILE *file, Terrain *pTerrain)
void DummyFunc (Terrain *pTerrain)
bool IsActive ()
void RepairCracks (Terrain *pTerrain, TriangleStrip *pTriangleStrips, TriangleFan *pTriangleFans, int *pCountStrips, int *pCountFans)
TerrainBlockGetParent ()
int GetStride ()
void EnableStrip (bool bEnabled)
int GetHomeIndex ()
void CalculateGeometry (Terrain *pTerrain)
void IntersectRay (Ray &ray, Vector &intersectionPoint, float &lowestDistance, Terrain *pTerrain)

Friends

class Terrain

Constructor & Destructor Documentation

TerrainBlock::TerrainBlock TerrainBlock pParent  ) 
 

Definition at line 98 of file CLODTerrainRenderer.cpp.

Referenced by Read(), and TerrainBlock().

TerrainBlock::TerrainBlock int  homeVertex,
int  stride,
Terrain pTerrain,
TerrainBlock pParent
 

Definition at line 108 of file CLODTerrainRenderer.cpp.

References CalculateGeometry(), demeter::Terrain::GetElevation(), demeter::Settings::GetInstance(), demeter::Terrain::GetWidthVertices(), hashDelta, demeter::Settings::IsVerbose(), demeter::Terrain::m_OffsetX, demeter::Terrain::m_OffsetY, demeter::Terrain::m_pVertices, TerrainBlock(), demeter::Vector::x, demeter::Vector::y, and demeter::Vector::z.

TerrainBlock::~TerrainBlock  ) 
 

Definition at line 166 of file CLODTerrainRenderer.cpp.


Member Function Documentation

void TerrainBlock::CalculateGeometry Terrain pTerrain  ) 
 

Definition at line 472 of file CLODTerrainRenderer.cpp.

References demeter::Terrain::GetVertexSpacing(), demeter::Terrain::GetWidthVertices(), demeter::Box::m_Max, demeter::Box::m_Min, demeter::Terrain::m_pVertices, demeter::Vector::x, demeter::Vector::y, and demeter::Vector::z.

Referenced by Read(), and TerrainBlock().

void TerrainBlock::DummyFunc Terrain pTerrain  ) 
 

Definition at line 507 of file CLODTerrainRenderer.cpp.

References f, demeter::Terrain::GetElevation(), demeter::Terrain::GetHeight(), demeter::Terrain::GetHeightVertices(), demeter::Settings::GetInstance(), demeter::Settings::GetScreenHeight(), demeter::Settings::GetScreenWidth(), demeter::Terrain::GetVertexSpacing(), and demeter::Terrain::GetWidth().

void TerrainBlock::EnableStrip bool  bEnabled  ) 
 

Definition at line 322 of file CLODTerrainRenderer.cpp.

References demeter::TriangleStrip::m_bEnabled.

Referenced by RepairCracks().

int TerrainBlock::GetHomeIndex  )  [inline]
 

Definition at line 337 of file CLODTerrainRenderer.cpp.

TerrainBlock * TerrainBlock::GetParent  )  [inline]
 

Definition at line 332 of file CLODTerrainRenderer.cpp.

int TerrainBlock::GetStride  )  [inline]
 

Definition at line 327 of file CLODTerrainRenderer.cpp.

void demeter::TerrainBlock::IntersectRay Ray ray,
Vector intersectionPoint,
float &  lowestDistance,
Terrain pTerrain
 

bool TerrainBlock::IsActive  ) 
 

Definition at line 181 of file CLODTerrainRenderer.cpp.

void TerrainBlock::Read FILE *  file,
Terrain pTerrain
 

Definition at line 532 of file CLODTerrainRenderer.cpp.

References CalculateGeometry(), and TerrainBlock().

void TerrainBlock::RepairCracks Terrain pTerrain,
TriangleStrip pTriangleStrips,
TriangleFan pTriangleFans,
int *  pCountStrips,
int *  pCountFans
 

Definition at line 342 of file CLODTerrainRenderer.cpp.

References Assert, EnableStrip(), demeter::Terrain::GetVertexStatus(), demeter::Terrain::GetWidthVertices(), demeter::TriangleFan::m_NumberOfVertices, demeter::TriangleFan::m_pVertices, and MAX_VERTICES_PER_FAN.

Referenced by demeter::Terrain::ModelViewMatrixChanged(), and demeter::TerrainLattice::Tessellate().

void TerrainBlock::Tessellate double *  pMatrixModelview,
double *  pMatrixProjection,
int *  pViewport,
TriangleStrip pTriangleStrips,
TriangleFan pTriangleFans,
int *  pCountStrips,
int *  pCountFans,
Terrain pTerrain
 

Definition at line 186 of file CLODTerrainRenderer.cpp.

References demeter::Terrain::CubeInFrustum(), demeter::Terrain::GetDetailThreshold(), demeter::Terrain::GetWidthVertices(), demeter::TriangleStrip::m_bEnabled, demeter::Terrain::m_MaximumVisibleBlockSize, demeter::Terrain::m_MaxNumberOfPrimitives, demeter::TriangleStrip::m_NumberOfVertices, demeter::TriangleStrip::m_pVertices, demeter::Terrain::SetVertexStatus(), demeter::Vector::x, demeter::Vector::y, and demeter::Vector::z.

Referenced by demeter::Terrain::Tessellate().

void TerrainBlock::Write FILE *  file  ) 
 

Definition at line 519 of file CLODTerrainRenderer.cpp.


Friends And Related Function Documentation

friend class Terrain [friend]
 

Definition at line 443 of file CLODTerrainRenderer.


The documentation for this class was generated from the following files:
Generated on Thu Jul 29 16:39:46 2004 for OpenSim by doxygen 1.3.6