My Project
TriangleStrip.h
1 #pragma once
2 #include "TerrainCommon.h"
3 #include "Terrain.h"
4 #include "TerrainBlock.h"
5 #include "VertexFVF.h"
6 
7 namespace ParaTerrain
8 {
10  {
11  public:
12  TriangleStrip();
13  TriangleStrip(const TriangleStrip& ts);
14  ~TriangleStrip();
15  void Render(Terrain * pTerrain);
16  inline int GetTriangleNum()
17  {
18  return (m_bEnabled) ? (m_NumberOfVertices-2) : 0;
19  }
20 
21  int BuildTriangles(Terrain * pTerrain, terrain_vertex * pIndices, int nStart);
22  int BuildTriangles(Terrain * pTerrain, terrain_vertex_normal * pIndices, int nStart);
23  inline bool IsEnabled(){return m_bEnabled;}
24  private:
25  uint32 m_pVertices[6]; // Indices into the terrain vertices
26  unsigned char m_NumberOfVertices;
27  float fOffsetTexU, fOffsetTexV;
28  // in range [0, 8*8)
29  int texture_group_id;
30  bool m_bEnabled;
31 
32  friend class TerrainBlock;
33  friend class Terrain;
34  friend class TerrainBuffer;
35  };
36 }
Definition: SceneObject.h:15
for terrain
Definition: VertexFVF.h:86
it contains all the necessary dynamic information to render the terrain for the current frame...
Definition: TerrainBuffer.h:31
it represents the quad tree node of LOD terrain data
Definition: TerrainBlock.h:22
This class represents a single, contiguous chunk of terrain and is the primary public interface to De...
Definition: Terrain.h:386
Definition: TriangleStrip.h:9
for terrain with normal
Definition: VertexFVF.h:95