29 #ifndef __Ogre_TerrainQuadTreeNode_H__
30 #define __Ogre_TerrainQuadTreeNode_H__
42 class HardwareVertexBufferSharedPtr;
110 uint16 getLodCount()
const;
151 LodLevel() : gpuIndexData(0), maxHeightDelta(0), calcMaxHeightDelta(0),
152 lastTransitionDist(0), lastCFactor(0) {}
167 void preDeltaCalculation(
const Rect& rect);
174 void postDeltaCalculation(
const Rect& rect);
179 void finaliseDeltaValues(
const Rect& rect);
197 void updateVertexData(
bool positions,
bool deltas,
const Rect& rect,
bool cpuData);
207 void mergeIntoBounds(
long x,
long y,
const Vector3& pos);
211 void resetBounds(
const Rect& rect);
217 bool rectIntersectsNode(
const Rect& rect);
222 bool rectContainsNode(
const Rect& rect);
227 bool pointIntersectsNode(
long x,
long y);
232 Real getBoundingRadius()
const;
236 Real getMinHeight()
const;
238 Real getMaxHeight()
const;
245 bool calculateCurrentLod(
const Camera* cam,
Real cFactor);
250 bool isRenderedAtCurrentLod()
const;
252 bool isSelfOrChildRenderedAtCurrentLod()
const;
254 void setCurrentLod(
int lod);
258 void setLodTransition(
float t);
308 : cpuVertexData(0), gpuVertexData(0), resolution(res), size(sz),
309 treeLevels(lvls), gpuVertexDataDirty(false) {}
343 const String& getMovableType(
void)
const;
345 Real getBoundingRadius(
void)
const;
348 bool isVisible(
void)
const;
349 uint32 getVisibilityFlags(
void)
const;
350 uint32 getQueryFlags(
void)
const;
351 bool getCastShadows(
void)
const;
370 void getWorldTransforms(
Matrix4* xform)
const;
371 Real getSquaredViewDepth(
const Camera* cam)
const;
373 bool getCastsShadows(
void)
const;
386 void getWorldTransforms(
Matrix4* xform)
const;
387 Real getSquaredViewDepth(
const Camera* cam)
const;
389 bool getCastsShadows(
void)
const;
393 void createCpuVertexData();
398 void destroyCpuVertexData();
400 void createGpuVertexData();
401 void destroyGpuVertexData();
402 void updateGpuVertexData();
403 void createGpuIndexData();
404 void destroyGpuIndexData();
407 void writePosVertex(
bool compress,
uint16 x,
uint16 y,
float height,
const Vector3& pos,
float uvScale,
float** ppPos);
408 void writeDeltaVertex(
bool compress,
uint16 x,
uint16 y,
float delta,
float deltaThresh,
float** ppDelta);
410 uint16 calcSkirtVertexIndex(
uint16 mainIndex,
bool isCol);