Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
BaseHeightMapRenderObjClass Class Referenceabstract

Custom render object that draws the heightmap and handles intersection tests. More...

#include <BaseHeightMap.h>

Inherits RenderObjClass, DX8_CleanupHook, and Snapshot.

Inherited by FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Classes

struct  shoreLineTileInfo
 
struct  shoreLineTileSortInfo
 

Public Member Functions

 BaseHeightMapRenderObjClass (void)
 
virtual ~BaseHeightMapRenderObjClass (void)
 
virtual void ReleaseResources (void)
 Release all dx8 resources so the device can be reset.
 
virtual void ReAcquireResources (void)
 Reacquire all resources after device reset.
 
virtual RenderObjClassClone (void) const
 
virtual int Class_ID (void) const
 
virtual void Render (RenderInfoClass &rinfo)=0
 
virtual bool Cast_Ray (RayCollisionTestClass &raytest)
 
virtual void Get_Obj_Space_Bounding_Sphere (SphereClass &sphere) const
 
virtual void Get_Obj_Space_Bounding_Box (AABoxClass &aabox) const
 
virtual void On_Frame_Update (void)
 
virtual void Notify_Added (SceneClass *scene)
 
virtual int initHeightData (Int width, Int height, WorldHeightMap *pMap, RefRenderObjListIterator *pLightsIterator, Bool updateExtraPassTiles=TRUE)
 allocate resources needed to render heightmap
 
virtual Int freeMapResources (void)
 free resources used to render heightmap
 
virtual void updateCenter (CameraClass *camera, RefRenderObjListIterator *pLightsIterator)
 
virtual void adjustTerrainLOD (Int adj)
 
virtual void doPartialUpdate (const IRegion2D &partialRange, WorldHeightMap *htMap, RefRenderObjListIterator *pLightsIterator)=0
 
virtual void staticLightingChanged (void)
 
virtual void oversizeTerrain (Int tilesToOversize)
 
virtual void reset (void)
 
void redirectToHeightmap (WorldHeightMap *pMap)
 
UnsignedByte getClipHeight (Int x, Int y) const
 
void setTextureLOD (Int lod)
 Update the macro texture (pass 3).
 
void updateMacroTexture (AsciiString textureName)
 
void doTextures (Bool flag)
 
void doTheLight (VERTEX_FORMAT *vb, Vector3 *light, Vector3 *normal, RefRenderObjListIterator *pLightsIterator, UnsignedByte alpha)
 Update the diffuse value from static light info for one vertex.
 
void addScorch (Vector3 location, Real radius, Scorches type)
 
void addTree (DrawableID id, Coord3D location, Real scale, Real angle, Real randomScaleAmount, const W3DTreeDrawModuleData *data)
 
void removeAllTrees (void)
 
void removeTree (DrawableID id)
 
Bool updateTreePosition (DrawableID id, Coord3D location, Real angle)
 
void renderTrees (CameraClass *camera)
 renders the tree buffer.
 
void addProp (Int id, Coord3D location, Real angle, Real scale, const AsciiString &modelName)
 
void removeProp (Int id)
 
void removeAllProps (void)
 
void unitMoved (Object *unit)
 
void notifyShroudChanged (void)
 
void removeTreesAndPropsForConstruction (const Coord3D *pos, const GeometryInfo &geom, Real angle)
 
void addTerrainBib (Vector3 corners[4], ObjectID id, Bool highlight)
 Add a bib at location.
 
void addTerrainBibDrawable (Vector3 corners[4], DrawableID id, Bool highlight)
 
void removeTerrainBib (ObjectID id)
 Remove a bib.
 
void removeTerrainBibDrawable (DrawableID id)
 
void removeAllTerrainBibs (void)
 Removes all bibs.
 
void removeTerrainBibHighlighting (void)
 Remove all highlighting.
 
W3DShroudgetShroud ()
 
void updateShorelineTiles (Int minX, Int minY, Int maxX, Int maxY, WorldHeightMap *pMap)
 figure out which tiles on this map cross water plane
 
void updateShorelineTile (Int X, Int Y, Int Border, WorldHeightMap *pMap)
 figure out which tiles on this map cross water plane
 
void recordShoreLineSortInfos (void)
 
void updateViewImpassableAreas (Bool partial=FALSE, Int minX=0, Int maxX=0, Int minY=0, Int maxY=0)
 
void clearAllScorches (void)
 
void setTimeOfDay (TimeOfDay tod)
 
void loadRoadsAndBridges (W3DTerrainLogic *pTerrainLogic, Bool saveGame)
 Load the roads from the map objects.
 
void worldBuilderUpdateBridgeTowers (W3DAssetManager *assetManager, SimpleSceneClass *scene)
 for the editor updating of bridge tower visuals
 
Int getStaticDiffuse (Int x, Int y)
 Gets the diffuse terrain lighting value for a point on the mesh.
 
virtual Int getNumExtraBlendTiles (Bool visible)
 
Int getNumShoreLineTiles (Bool visible)
 
void setShoreLineDetail (void)
 update shoreline tiles in case the feature was toggled by user.
 
Bool getMaximumVisibleBox (const FrustumClass &frustum, AABoxClass *box, Bool ignoreMaxHeight)
 3d extent of visible terrain.
 
Real getHeightMapHeight (Real x, Real y, Coord3D *normal) const
 return height and normal at given point
 
Bool isCliffCell (Real x, Real y)
 return height and normal at given point
 
Real getMinHeight (void) const
 return minimum height of entire terrain
 
Real getMaxHeight (void) const
 return maximum height of entire terrain
 
Real getMaxCellHeight (Real x, Real y) const
 returns maximum height of the 4 cell corners.
 
WorldHeightMapgetMap (void)
 returns object holding the heightmap samples - need this for fast access.
 
Bool isClearLineOfSight (const Coord3D &pos, const Coord3D &posOther) const
 
Bool getShowImpassableAreas (void)
 
void setShowImpassableAreas (Bool show)
 
Bool showAsVisibleCliff (Int xIndex, Int yIndex) const
 
Bool evaluateAsVisibleCliff (Int xIndex, Int yIndex, Real valuesGreaterThanRad)
 
Real getViewImpassableAreaSlope (void) const
 
void setViewImpassableAreaSlope (Real viewSlope)
 
Bool doesNeedFullUpdate (void)
 
virtual int updateBlock (Int x0, Int y0, Int x1, Int y1, WorldHeightMap *pMap, RefRenderObjListIterator *pLightsIterator)=0
 
- Public Member Functions inherited from RenderObjClass
 RenderObjClass (void)
 
 RenderObjClass (const RenderObjClass &src)
 
RenderObjClassoperator= (const RenderObjClass &)
 
virtual ~RenderObjClass (void)
 
virtual const char * Get_Name (void) const
 
virtual void Set_Name (const char *name)
 
virtual const char * Get_Base_Model_Name (void) const
 
virtual void Set_Base_Model_Name (const char *name)
 
virtual int Get_Num_Polys (void) const
 
virtual void Special_Render (SpecialRenderInfoClass &rinfo)
 
virtual void Restart (void)
 
virtual void Add (SceneClass *scene)
 
virtual void Remove (void)
 
virtual SceneClassGet_Scene (void)
 
virtual SceneClassPeek_Scene (void)
 
virtual void Set_Container (RenderObjClass *con)
 
virtual void Validate_Transform (void) const
 
RenderObjClassGet_Container (void) const
 
virtual void Set_Transform (const Matrix3D &m)
 
virtual void Set_Position (const Vector3 &v)
 
const Matrix3DGet_Transform (void) const
 
const Matrix3DGet_Transform (bool &is_transform_identity) const
 
const Matrix3DGet_Transform_No_Validity_Check (void) const
 
const Matrix3DGet_Transform_No_Validity_Check (bool &is_transform_identity) const
 
bool Is_Transform_Identity () const
 
bool Is_Transform_Identity_No_Validity_Check () const
 
Vector3 Get_Position (void) const
 
virtual void Notify_Removed (SceneClass *scene)
 
virtual int Get_Num_Sub_Objects (void) const
 
virtual RenderObjClassGet_Sub_Object (int index) const
 
virtual int Add_Sub_Object (RenderObjClass *subobj)
 
virtual int Remove_Sub_Object (RenderObjClass *robj)
 
virtual RenderObjClassGet_Sub_Object_By_Name (const char *name, int *index=NULL) const
 
virtual int Get_Num_Sub_Objects_On_Bone (int boneindex) const
 
virtual RenderObjClassGet_Sub_Object_On_Bone (int index, int boneindex) const
 
virtual int Get_Sub_Object_Bone_Index (RenderObjClass *subobj) const
 
virtual int Get_Sub_Object_Bone_Index (int LodIndex, int ModelIndex) const
 
virtual int Add_Sub_Object_To_Bone (RenderObjClass *subobj, int bone_index)
 
virtual int Add_Sub_Object_To_Bone (RenderObjClass *subobj, const char *bname)
 
virtual int Remove_Sub_Objects_From_Bone (int boneindex)
 
virtual int Remove_Sub_Objects_From_Bone (const char *bname)
 
virtual void Update_Sub_Object_Transforms (void)
 
virtual void Set_Animation (void)
 
virtual void Set_Animation (HAnimClass *motion, float frame, int anim_mode=ANIM_MODE_MANUAL)
 
virtual void Set_Animation (HAnimClass *motion0, float frame0, HAnimClass *motion1, float frame1, float percentage)
 
virtual void Set_Animation (HAnimComboClass *anim_combo)
 
virtual HAnimClassPeek_Animation (void)
 
virtual int Get_Num_Bones (void)
 
virtual const char * Get_Bone_Name (int bone_index)
 
virtual int Get_Bone_Index (const char *bonename)
 
virtual const Matrix3DGet_Bone_Transform (const char *bonename)
 
virtual const Matrix3DGet_Bone_Transform (int boneindex)
 
virtual void Capture_Bone (int bindex)
 
virtual void Release_Bone (int bindex)
 
virtual bool Is_Bone_Captured (int bindex) const
 
virtual void Control_Bone (int bindex, const Matrix3D &objtm, bool world_space_translation=false)
 
virtual const HTreeClassGet_HTree (void) const
 
virtual bool Cast_AABox (AABoxCollisionTestClass &boxtest)
 
virtual bool Cast_OBBox (OBBoxCollisionTestClass &boxtest)
 
virtual bool Intersect_AABox (AABoxIntersectionTestClass &boxtest)
 
virtual bool Intersect_OBBox (OBBoxIntersectionTestClass &boxtest)
 
virtual bool Intersect (IntersectionClass *Intersection, IntersectionResultClass *Final_Result)
 
virtual bool Intersect_Sphere (IntersectionClass *Intersection, IntersectionResultClass *Final_Result)
 
virtual bool Intersect_Sphere_Quick (IntersectionClass *Intersection, IntersectionResultClass *Final_Result)
 
virtual const SphereClassGet_Bounding_Sphere (void) const
 
virtual const AABoxClassGet_Bounding_Box (void) const
 
virtual void Update_Obj_Space_Bounding_Volumes (void)
 
virtual void Prepare_LOD (CameraClass &camera)
 
virtual void Recalculate_Static_LOD_Factors (void)
 
virtual void Increment_LOD (void)
 
virtual void Decrement_LOD (void)
 
virtual float Get_Cost (void) const
 
virtual float Get_Value (void) const
 
virtual float Get_Post_Increment_Value (void) const
 
virtual void Set_LOD_Level (int lod)
 
virtual int Get_LOD_Level (void) const
 
virtual int Get_LOD_Count (void) const
 
virtual void Set_LOD_Bias (float bias)
 
virtual int Calculate_Cost_Value_Arrays (float screen_area, float *values, float *costs) const
 
virtual RenderObjClassGet_Current_LOD (void)
 
virtual bool Build_Dependency_List (DynamicVectorClass< StringClass > &file_list, bool recursive=true)
 
virtual bool Build_Texture_List (DynamicVectorClass< StringClass > &texture_file_list, bool recursive=true)
 
virtual void Create_Decal (DecalGeneratorClass *generator)
 
virtual void Delete_Decal (uint32 decal_id)
 
virtual MaterialInfoClassGet_Material_Info (void)
 
virtual void Set_User_Data (void *value, bool recursive=false)
 
virtual void * Get_User_Data ()
 
virtual int Get_Num_Snap_Points (void)
 
virtual void Get_Snap_Point (int index, Vector3 *set)
 
virtual float Get_Screen_Size (CameraClass &camera)
 
virtual void Scale (float scale)
 
virtual void Scale (float scalex, float scaley, float scalez)
 
virtual void Set_ObjectScale (float scale)
 
const float Get_ObjectScale (void) const
 
void Set_ObjectColor (unsigned int color)
 
const unsigned int Get_ObjectColor (void) const
 
virtual int Get_Sort_Level (void) const
 
virtual void Set_Sort_Level (int level)
 
virtual int Is_Really_Visible (void)
 
virtual int Is_Not_Hidden_At_All (void)
 
virtual int Is_Visible (void) const
 
virtual void Set_Visible (int onoff)
 
virtual int Is_Hidden (void) const
 
virtual void Set_Hidden (int onoff)
 
virtual int Is_Animation_Hidden (void) const
 
virtual void Set_Animation_Hidden (int onoff)
 
virtual int Is_Force_Visible (void) const
 
virtual void Set_Force_Visible (int onoff)
 
virtual int Is_Translucent (void) const
 
virtual void Set_Translucent (int onoff)
 
virtual int Is_Alpha (void) const
 
virtual void Set_Alpha (int onoff)
 
virtual int Is_Additive (void) const
 
virtual void Set_Additive (int onoff)
 
virtual int Get_Collision_Type (void) const
 
virtual void Set_Collision_Type (int type)
 
virtual bool Is_Complete (void)
 
virtual bool Is_In_Scene (void)
 
virtual float Get_Native_Screen_Size (void) const
 
virtual void Set_Native_Screen_Size (float screensize)
 
void Set_Sub_Objects_Match_LOD (int onoff)
 
int Is_Sub_Objects_Match_LOD_Enabled (void)
 
void Set_Sub_Object_Transforms_Dirty (bool onoff)
 
bool Are_Sub_Object_Transforms_Dirty (void)
 
void Set_Ignore_LOD_Cost (bool onoff)
 
bool Is_Ignoring_LOD_Cost (void)
 
void Set_Is_Self_Shadowed ()
 
void Unset_Is_Self_Shadowed ()
 
int Is_Self_Shadowed () const
 
virtual const PersistFactoryClassGet_Factory (void) const
 
virtual bool Save (ChunkSaveClass &csave)
 
virtual bool Load (ChunkLoadClass &cload)
 
RenderHookClassGet_Render_Hook (void)
 
void Set_Render_Hook (RenderHookClass *hook)
 
- Public Member Functions inherited from RefCountClass
 RefCountClass (void)
 
 RefCountClass (const RefCountClass &)
 
void Add_Ref (void) const
 
WWINLINE void Release_Ref (void) const
 
int Num_Refs (void) const
 
virtual void Delete_This (void)
 
- Public Member Functions inherited from PostLoadableClass
 PostLoadableClass (void)
 
virtual ~PostLoadableClass (void)
 
virtual void On_Post_Load (void)
 
bool Is_Post_Load_Registered (void)
 
void Set_Post_Load_Registered (bool onoff)
 
- Public Member Functions inherited from MultiListObjectClass
 MultiListObjectClass (void)
 
virtual ~MultiListObjectClass (void)
 
MultiListNodeClassGet_List_Node () const
 
void Set_List_Node (MultiListNodeClass *node)
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Types

enum  {
  MAX_SCORCH_VERTEX =8194 , MAX_SCORCH_INDEX =6*8194 , MAX_SCORCH_MARKS =500 , SCORCH_MARKS_IN_TEXTURE =9 ,
  SCORCH_PER_ROW = 3
}
 
- Protected Types inherited from RenderObjClass
enum  {
  COLL_TYPE_MASK = 0x000000FF , IS_VISIBLE = 0x00000100 , IS_NOT_HIDDEN = 0x00000200 , IS_NOT_ANIMATION_HIDDEN = 0x00000400 ,
  IS_FORCE_VISIBLE = 0x00000800 , BOUNDING_VOLUMES_VALID = 0x00002000 , IS_TRANSLUCENT = 0x00004000 , IGNORE_LOD_COST = 0x00008000 ,
  SUBOBJS_MATCH_LOD = 0x00010000 , SUBOBJ_TRANSFORMS_DIRTY = 0x00020000 , IS_ALPHA = 0x00040000 , IS_ADDITIVE = 0x00100000 ,
  IS_SELF_SHADOWED = 0x00080000 , IS_CHEATER = 0x00100000 , IS_REALLY_VISIBLE = IS_VISIBLE | IS_NOT_HIDDEN | IS_NOT_ANIMATION_HIDDEN , IS_NOT_HIDDEN_AT_ALL = IS_NOT_HIDDEN | IS_NOT_ANIMATION_HIDDEN ,
  DEFAULT_BITS = COLL_TYPE_ALL | IS_NOT_HIDDEN | IS_NOT_ANIMATION_HIDDEN
}
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
void updateScorches (void)
 Update m_vertexScorch and m_indexScorch so all scorches will be drawn.
 
void allocateScorchBuffers (void)
 allocate static buffers for drawing scorch marks.
 
void freeScorchBuffers (void)
 frees up scorch buffers.
 
void drawScorches (void)
 Draws the scorch mark polygons in m_vertexScorch.
 
void initDestAlphaLUT (void)
 initialize water depth LUT stored in m_destAlphaTexture
 
void renderShoreLines (CameraClass *pCamera)
 re-render parts of terrain that need custom blending into water edge
 
void renderShoreLinesSorted (CameraClass *pCamera)
 optimized version for game usage.
 
- Protected Member Functions inherited from RenderObjClass
virtual void Add_Dependencies_To_List (DynamicVectorClass< StringClass > &file_list, bool textures_only=false)
 
virtual void Update_Cached_Bounding_Volumes (void) const
 
virtual void Update_Sub_Object_Bits (void)
 
bool Bounding_Volumes_Valid (void) const
 
void Invalidate_Cached_Bounding_Volumes (void) const
 
void Validate_Cached_Bounding_Volumes (void) const
 
- Protected Member Functions inherited from RefCountClass
virtual ~RefCountClass (void)
 

Protected Attributes

Int m_x
 dimensions of heightmap
 
Int m_y
 dimensions of heightmap
 
DX8VertexBufferClassm_vertexScorch
 Scorch vertex buffer.
 
DX8IndexBufferClassm_indexScorch
 indices defining a triangles for the scorch drawing.
 
TextureClassm_scorchTexture
 Scorch mark texture.
 
Int m_curNumScorchVertices
 number of vertices used in m_vertexScorch.
 
Int m_curNumScorchIndices
 number of indices used in m_indexScorch.
 
TScorch m_scorches [MAX_SCORCH_MARKS]
 
Int m_numScorches
 
Int m_scorchesInBuffer
 how many are in the buffers. If less than numScorches, we need to update
 
Real m_curImpassableSlope
 
WorldHeightMapm_map
 
Bool m_useDepthFade
 fade terrain lighting under water
 
Bool m_updating
 
Vector3 m_depthFade
 depth based fall off values for r,g,b
 
Bool m_disableTextures
 
Bool m_needFullUpdate
 True if lighting changed, and we need to update all instead of what moved.
 
Bool m_doXNextTime
 True if we updated y scroll, and need to do x scroll next frame.
 
Real m_minHeight
 minimum value of height samples in heightmap
 
Real m_maxHeight
 maximum value of height samples in heightmap
 
Bool m_showImpassableAreas
 If true, shade impassable areas.
 
std::vector< boolm_showAsVisibleCliff
 
ShaderClass m_shaderClass
 shader or rendering state for heightmap
 
VertexMaterialClassm_vertexMaterialClass
 vertex shader (lighting) for terrain
 
TextureClassm_stageZeroTexture
 primary texture
 
TextureClassm_stageOneTexture
 transparent edging texture
 
CloudMapTerrainTextureClassm_stageTwoTexture
 Cloud map texture.
 
TextureClassm_stageThreeTexture
 light/noise map texture
 
AsciiString m_macroTextureName
 Name for stage 3 texture.
 
TextureClassm_destAlphaTexture
 Texture holding destination alpha LUT for water depth.
 
W3DTreeBufferm_treeBuffer
 Class for drawing trees and other alpha objects.
 
W3DPropBufferm_propBuffer
 Class for drawing trees and other alpha objects.
 
W3DBibBufferm_bibBuffer
 Class for drawing trees and other alpha objects.
 
W3DWaypointBufferm_waypointBuffer
 Draws waypoints.
 
W3DRoadBufferm_roadBuffer
 Class for drawing roads.
 
W3DBridgeBufferm_bridgeBuffer
 
W3DShroudm_shroud
 Class for drawing the shroud over terrain.
 
shoreLineTileInfom_shoreLineTilePositions
 array holding x,y tile positions of all shoreline terrain.
 
Int m_numShoreLineTiles
 number of tiles in m_shoreLineTilePositions.
 
Int m_numVisibleShoreLineTiles
 number of visible tiles.
 
Int m_shoreLineTilePositionsSize
 total size of array including unused memory.
 
Real m_currentMinWaterOpacity
 current value inside the gradient lookup texture.
 
shoreLineTileSortInfom_shoreLineSortInfos
 
Int m_shoreLineSortInfosSize
 
Int m_shoreLineSortInfosXMajor
 
Int m_shoreLineTileSortMaxCoordinate
 keep track of coordinate range along axis used for m_shoreLineSortInfos
 
Int m_shoreLineTileSortMinCoordinate
 
- Protected Attributes inherited from RenderObjClass
unsigned long Bits
 
Matrix3D Transform
 
float ObjectScale
 
unsigned int ObjectColor
 
SphereClass CachedBoundingSphere
 
AABoxClass CachedBoundingBox
 
float NativeScreenSize
 
bool IsTransformIdentity
 
SceneClassScene
 
RenderObjClassContainer
 
void * User_Data
 
RenderHookClassRenderHook
 

Additional Inherited Members

- Public Types inherited from RenderObjClass
enum  { USER_DATA_MATERIAL_OVERRIDE = 0x01234567 }
 
enum  {
  CLASSID_UNKNOWN = 0xFFFFFFFF , CLASSID_MESH = 0 , CLASSID_HMODEL , CLASSID_DISTLOD ,
  CLASSID_PREDLODGROUP , CLASSID_TILEMAP , CLASSID_IMAGE3D , CLASSID_LINE3D ,
  CLASSID_BITMAP2D , CLASSID_CAMERA , CLASSID_DYNAMESH , CLASSID_DYNASCREENMESH ,
  CLASSID_TEXTDRAW , CLASSID_FOG , CLASSID_LAYERFOG , CLASSID_LIGHT ,
  CLASSID_PARTICLEEMITTER , CLASSID_PARTICLEBUFFER , CLASSID_SCREENPOINTGROUP , CLASSID_VIEWPOINTGROUP ,
  CLASSID_WORLDPOINTGROUP , CLASSID_TEXT2D , CLASSID_TEXT3D , CLASSID_NULL ,
  CLASSID_COLLECTION , CLASSID_FLARE , CLASSID_HLOD , CLASSID_AABOX ,
  CLASSID_OBBOX , CLASSID_SEGLINE , CLASSID_SPHERE , CLASSID_RING ,
  CLASSID_BOUNDFOG , CLASSID_DAZZLE , CLASSID_SOUND , CLASSID_SEGLINETRAIL ,
  CLASSID_LAND , CLASSID_SHDMESH , CLASSID_LAST = 0x0000FFFF
}
 
enum  AnimMode {
  ANIM_MODE_MANUAL = 0 , ANIM_MODE_LOOP , ANIM_MODE_ONCE , ANIM_MODE_LOOP_PINGPONG ,
  ANIM_MODE_LOOP_BACKWARDS , ANIM_MODE_ONCE_BACKWARDS
}
 
- Static Public Member Functions inherited from RefCountClass
static int Total_Refs (void)
 
static RefCountClassAdd_Active_Ref (RefCountClass *obj)
 
static RefCountClassSet_Ref_Owner (RefCountClass *obj, char *file, int line)
 
static void Remove_Active_Ref (RefCountClass *obj)
 
static bool Validate_Active_Ref (RefCountClass *obj)
 
- Public Attributes inherited from RefCountClass
RefCountNodeClass ActiveRefNode
 
ActiveRefStruct ActiveRefInfo
 
- Static Public Attributes inherited from RenderObjClass
static const float AT_MIN_LOD = FLT_MAX
 
static const float AT_MAX_LOD = -1.0f
 
- Static Public Attributes inherited from RefCountClass
static RefCountListClass ActiveRefList
 

Detailed Description

Custom render object that draws the heightmap and handles intersection tests.

Custom W3D render object that's used to process the terrain. It handles virtually everything to do with the terrain, including: drawing, lighting, scorchmarks and intersection tests.

Definition at line 94 of file BaseHeightMap.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_SCORCH_VERTEX 
MAX_SCORCH_INDEX 
MAX_SCORCH_MARKS 
SCORCH_MARKS_IN_TEXTURE 
SCORCH_PER_ROW 

Definition at line 245 of file BaseHeightMap.h.

Constructor & Destructor Documentation

◆ BaseHeightMapRenderObjClass()

BaseHeightMapRenderObjClass::BaseHeightMapRenderObjClass ( void )

Constructor. Mostly nulls out the member variables.

Definition at line 256 of file BaseHeightMap.cpp.

◆ ~BaseHeightMapRenderObjClass()

BaseHeightMapRenderObjClass::~BaseHeightMapRenderObjClass ( void )
virtual

Destructor. Releases w3d assets.

Definition at line 206 of file BaseHeightMap.cpp.

Member Function Documentation

◆ addProp()

void BaseHeightMapRenderObjClass::addProp ( Int id,
Coord3D location,
Real angle,
Real scale,
const AsciiString & modelName )

Adds a prop to the prop buffer.

Definition at line 2249 of file BaseHeightMap.cpp.

◆ addScorch()

void BaseHeightMapRenderObjClass::addScorch ( Vector3 location,
Real radius,
Scorches type )

Adds a scorch mark.

Definition at line 2052 of file BaseHeightMap.cpp.

◆ addTerrainBib()

void BaseHeightMapRenderObjClass::addTerrainBib ( Vector3 corners[4],
ObjectID id,
Bool highlight )

Add a bib at location.

Adds a terrainBib to the bib buffer.

Definition at line 2299 of file BaseHeightMap.cpp.

◆ addTerrainBibDrawable()

void BaseHeightMapRenderObjClass::addTerrainBibDrawable ( Vector3 corners[4],
DrawableID id,
Bool highlight )

Adds a terrainBib to the bib buffer.

Definition at line 2310 of file BaseHeightMap.cpp.

◆ addTree()

void BaseHeightMapRenderObjClass::addTree ( DrawableID id,
Coord3D location,
Real scale,
Real angle,
Real randomScaleAmount,
const W3DTreeDrawModuleData * data )

Adds a tree to the tree buffer.

Definition at line 2199 of file BaseHeightMap.cpp.

◆ adjustTerrainLOD()

void BaseHeightMapRenderObjClass::adjustTerrainLOD ( Int adj)
virtual

Adjust the terrain Level Of Detail. If adj > 0 , increases LOD 1 step, if adj < 0 decreases it one step, if adj==0, then just sets up for the current LOD

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 341 of file BaseHeightMap.cpp.

◆ allocateScorchBuffers()

void BaseHeightMapRenderObjClass::allocateScorchBuffers ( void )
protected

allocate static buffers for drawing scorch marks.

Allocates the vertex buffer and texture for scorches.

Definition at line 1890 of file BaseHeightMap.cpp.

◆ Cast_Ray()

bool BaseHeightMapRenderObjClass::Cast_Ray ( RayCollisionTestClass & raytest)
virtual
Todo
: Ray intersection needs to be optimized with some sort of grid-tracing (ala line drawing). We should also try making the search in a front->back order relative to the ray so we can early exit as soon as we have a hit.

BaseHeightMapRenderObjClass::Cast_Ray

/** Return intersection of a ray with the heightmap mesh. This is a quick version that just checks every polygon inside a 2D bounding rectangle of the ray projected onto the heightfield plane. For most of our view-picking cases the ray in almost perpendicular to the map plane so this is very quick (small bounding box). But it can become slow for arbitrary rays such as those used in AI visbility checks.(2 units on opposite corners of the map would check every polygon in the map).

Todo
: WW3D uses this to return dirt, grass, etc. Do we need this?

Reimplemented from RenderObjClass.

Reimplemented in WBHeightMap.

Definition at line 691 of file BaseHeightMap.cpp.

◆ Class_ID()

Int BaseHeightMapRenderObjClass::Class_ID ( void ) const
virtual

returns the class id, so the scene can tell what kind of render object it has.

Reimplemented from RenderObjClass.

Definition at line 1431 of file BaseHeightMap.cpp.

◆ clearAllScorches()

void BaseHeightMapRenderObjClass::clearAllScorches ( void )

Removes all scorches.

Definition at line 2039 of file BaseHeightMap.cpp.

◆ Clone()

RenderObjClass * BaseHeightMapRenderObjClass::Clone ( void ) const
virtual

Not used, but required virtual method.

Implements RenderObjClass.

Definition at line 1441 of file BaseHeightMap.cpp.

◆ crc()

void BaseHeightMapRenderObjClass::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 2991 of file BaseHeightMap.cpp.

◆ doesNeedFullUpdate()

Bool BaseHeightMapRenderObjClass::doesNeedFullUpdate ( void )
inline

Definition at line 229 of file BaseHeightMap.h.

◆ doPartialUpdate()

virtual void BaseHeightMapRenderObjClass::doPartialUpdate ( const IRegion2D & partialRange,
WorldHeightMap * htMap,
RefRenderObjListIterator * pLightsIterator )
pure virtual

◆ doTextures()

void BaseHeightMapRenderObjClass::doTextures ( Bool flag)
inline

Definition at line 161 of file BaseHeightMap.h.

◆ doTheLight()

void BaseHeightMapRenderObjClass::doTheLight ( VERTEX_FORMAT * vb,
Vector3 * light,
Vector3 * normal,
RefRenderObjListIterator * pLightsIterator,
UnsignedByte alpha )

Update the diffuse value from static light info for one vertex.

Calculates the diffuse lighting for a vertex in the terrain, taking all of the static lights into account as well. It is possible to just use the normal in the vertex and let D3D do the lighting, but it is slower to render, and can only handle 4 lights at this point.

Definition at line 516 of file BaseHeightMap.cpp.

◆ drawScorches()

void BaseHeightMapRenderObjClass::drawScorches ( void )
protected

Draws the scorch mark polygons in m_vertexScorch.

Draws the scorch marks.

Definition at line 178 of file BaseHeightMap.cpp.

◆ evaluateAsVisibleCliff()

Bool BaseHeightMapRenderObjClass::evaluateAsVisibleCliff ( Int xIndex,
Int yIndex,
Real valuesGreaterThanRad )

Definition at line 1297 of file BaseHeightMap.cpp.

◆ freeMapResources()

Int BaseHeightMapRenderObjClass::freeMapResources ( void )
virtual

free resources used to render heightmap

Frees the w3d resources used to draw the terrain.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 156 of file BaseHeightMap.cpp.

◆ freeScorchBuffers()

void BaseHeightMapRenderObjClass::freeScorchBuffers ( void )
protected

frees up scorch buffers.

Frees the vertex buffers for scorches.

Definition at line 1878 of file BaseHeightMap.cpp.

◆ Get_Obj_Space_Bounding_Box()

void BaseHeightMapRenderObjClass::Get_Obj_Space_Bounding_Box ( AABoxClass & box) const
virtual

WW3D method that returns object bounding box used in collision detection

Reimplemented from RenderObjClass.

Definition at line 1376 of file BaseHeightMap.cpp.

◆ Get_Obj_Space_Bounding_Sphere()

void BaseHeightMapRenderObjClass::Get_Obj_Space_Bounding_Sphere ( SphereClass & sphere) const
virtual

WW3D method that returns object bounding sphere used in frustum culling

Reimplemented from RenderObjClass.

Definition at line 1354 of file BaseHeightMap.cpp.

◆ getClipHeight()

UnsignedByte BaseHeightMapRenderObjClass::getClipHeight ( Int x,
Int y ) const
inline

Definition at line 140 of file BaseHeightMap.h.

◆ getHeightMapHeight()

Real BaseHeightMapRenderObjClass::getHeightMapHeight ( Real x,
Real y,
Coord3D * normal ) const

return height and normal at given point

return the height and normal of the triangle plane containing given location within heightmap.

Definition at line 860 of file BaseHeightMap.cpp.

◆ getMap()

WorldHeightMap * BaseHeightMapRenderObjClass::getMap ( void )
inline

returns object holding the heightmap samples - need this for fast access.

Definition at line 216 of file BaseHeightMap.h.

◆ getMaxCellHeight()

Real BaseHeightMapRenderObjClass::getMaxCellHeight ( Real x,
Real y ) const

returns maximum height of the 4 cell corners.

Returns maximum height of the 4 corners containing the given point

Definition at line 1204 of file BaseHeightMap.cpp.

◆ getMaxHeight()

Real BaseHeightMapRenderObjClass::getMaxHeight ( void ) const
inline

return maximum height of entire terrain

Definition at line 214 of file BaseHeightMap.h.

◆ getMaximumVisibleBox()

Bool BaseHeightMapRenderObjClass::getMaximumVisibleBox ( const FrustumClass & frustum,
AABoxClass * box,
Bool ignoreMaxHeight )

3d extent of visible terrain.

Get the 3D extent of the terrain visible through the camera. Return value is false if no part of terrain is visible. This function returns a worse case bounding volume based on lowest/highest points in entire terrain. It does not optimize the volume to heights actually visible. Unlike some of the other methods, this function is guaranteed not to miss any visible polygons. The ignoreMaxHeight flag is used to return a box that uses the camera position as the maximum height instead of the terrain - good for getting a volume enclosing things that can float above terrain.

Definition at line 1401 of file BaseHeightMap.cpp.

◆ getMinHeight()

Real BaseHeightMapRenderObjClass::getMinHeight ( void ) const
inline

return minimum height of entire terrain

Definition at line 213 of file BaseHeightMap.h.

◆ getNumExtraBlendTiles()

virtual Int BaseHeightMapRenderObjClass::getNumExtraBlendTiles ( Bool visible)
inlinevirtual

Reimplemented in HeightMapRenderObjClass.

Definition at line 207 of file BaseHeightMap.h.

◆ getNumShoreLineTiles()

Int BaseHeightMapRenderObjClass::getNumShoreLineTiles ( Bool visible)
inline

Definition at line 208 of file BaseHeightMap.h.

◆ getShowImpassableAreas()

Bool BaseHeightMapRenderObjClass::getShowImpassableAreas ( void )
inline

Definition at line 219 of file BaseHeightMap.h.

◆ getShroud()

W3DShroud * BaseHeightMapRenderObjClass::getShroud ( )
inline

Definition at line 196 of file BaseHeightMap.h.

◆ getStaticDiffuse()

Int BaseHeightMapRenderObjClass::getStaticDiffuse ( Int x,
Int y )

Gets the diffuse terrain lighting value for a point on the mesh.

Gets the static diffuse color value for a terrain vertex.

Definition at line 2088 of file BaseHeightMap.cpp.

◆ getViewImpassableAreaSlope()

Real BaseHeightMapRenderObjClass::getViewImpassableAreaSlope ( void ) const
inline

Definition at line 226 of file BaseHeightMap.h.

◆ initDestAlphaLUT()

void BaseHeightMapRenderObjClass::initDestAlphaLUT ( void )
protected

initialize water depth LUT stored in m_destAlphaTexture

Generate a lookup table which can be used to generate an alpha value from a given set of uv coordinates. Currently used for smoothing water/terrain border

Definition at line 1742 of file BaseHeightMap.cpp.

◆ initHeightData()

Int BaseHeightMapRenderObjClass::initHeightData ( Int x,
Int y,
WorldHeightMap * pMap,
RefRenderObjListIterator * pLightsIteratork,
Bool updateExtraPassTiles = TRUE )
virtual

allocate resources needed to render heightmap

Allocate a heightmap of x by y vertices and fill with initial height values. Also allocates all rendering resources such as vertex buffers, index buffers, shaders, and materials.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 1785 of file BaseHeightMap.cpp.

◆ isClearLineOfSight()

Bool BaseHeightMapRenderObjClass::isClearLineOfSight ( const Coord3D & pos,
const Coord3D & posOther ) const

Definition at line 1011 of file BaseHeightMap.cpp.

◆ isCliffCell()

Bool BaseHeightMapRenderObjClass::isCliffCell ( Real x,
Real y )

return height and normal at given point

Returns true if the cell containing the point is a cliff cell

Definition at line 1256 of file BaseHeightMap.cpp.

◆ loadPostProcess()

void BaseHeightMapRenderObjClass::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 3018 of file BaseHeightMap.cpp.

◆ loadRoadsAndBridges()

void BaseHeightMapRenderObjClass::loadRoadsAndBridges ( W3DTerrainLogic * pTerrainLogic,
Bool saveGame )

Load the roads from the map objects.

Loads the roads from the map objects.

Definition at line 1452 of file BaseHeightMap.cpp.

◆ Notify_Added()

void BaseHeightMapRenderObjClass::Notify_Added ( SceneClass * scene)
virtual

W3D render object method, we use it to add ourselves to tthe update list, so On_Frame_Update gets called.

Reimplemented from RenderObjClass.

Definition at line 2390 of file BaseHeightMap.cpp.

◆ notifyShroudChanged()

void BaseHeightMapRenderObjClass::notifyShroudChanged ( void )

Notifies that the local shroud changed.

Definition at line 2287 of file BaseHeightMap.cpp.

◆ On_Frame_Update()

void BaseHeightMapRenderObjClass::On_Frame_Update ( void )
virtual

Updates the diffuse color values in the vertices as affected by the dynamic lights.

Reimplemented from RenderObjClass.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 2162 of file BaseHeightMap.cpp.

◆ oversizeTerrain()

void BaseHeightMapRenderObjClass::oversizeTerrain ( Int tilesToOversize)
virtual

Sets the terrain oversize amount.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 1342 of file BaseHeightMap.cpp.

◆ ReAcquireResources()

void BaseHeightMapRenderObjClass::ReAcquireResources ( void )
virtual

Reacquire all resources after device reset.

Reallocates all W3D assets after a reset..

Implements DX8_CleanupHook.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 452 of file BaseHeightMap.cpp.

◆ recordShoreLineSortInfos()

void BaseHeightMapRenderObjClass::recordShoreLineSortInfos ( void )

This is an extra pre-process of shoreline data to make it more efficient for runtime culling. It is not used by the world builder since it modifies the terrain too frequently. The function also assumes that updateShoreLineTiles() was previously called and inserted the tiles in the correctly sorted order. WARNING!!! Current version assumes we always sort the entire map! So don't set parameters to partial updates!

Definition at line 1498 of file BaseHeightMap.cpp.

◆ redirectToHeightmap()

void BaseHeightMapRenderObjClass::redirectToHeightmap ( WorldHeightMap * pMap)
inline

Definition at line 133 of file BaseHeightMap.h.

◆ ReleaseResources()

void BaseHeightMapRenderObjClass::ReleaseResources ( void )
virtual

Release all dx8 resources so the device can be reset.

Releases all w3d assets, to prepare for Reset device call.

Implements DX8_CleanupHook.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 400 of file BaseHeightMap.cpp.

◆ removeAllProps()

void BaseHeightMapRenderObjClass::removeAllProps ( void )

Adds a prop to the prop buffer.

Definition at line 2275 of file BaseHeightMap.cpp.

◆ removeAllTerrainBibs()

void BaseHeightMapRenderObjClass::removeAllTerrainBibs ( void )

Removes all bibs.

Removes all terrainBibs from the bib buffer.

Definition at line 2331 of file BaseHeightMap.cpp.

◆ removeAllTrees()

void BaseHeightMapRenderObjClass::removeAllTrees ( void )

Adds a tree to the tree buffer.

Definition at line 2224 of file BaseHeightMap.cpp.

◆ removeProp()

void BaseHeightMapRenderObjClass::removeProp ( Int id)

Adds a prop to the prop buffer.

Definition at line 2263 of file BaseHeightMap.cpp.

◆ removeTerrainBib()

void BaseHeightMapRenderObjClass::removeTerrainBib ( ObjectID id)

Remove a bib.

Removes a terrainBib from the bib buffer.

Definition at line 2341 of file BaseHeightMap.cpp.

◆ removeTerrainBibDrawable()

void BaseHeightMapRenderObjClass::removeTerrainBibDrawable ( DrawableID id)

Removes a terrainBib from the bib buffer.

Definition at line 2351 of file BaseHeightMap.cpp.

◆ removeTerrainBibHighlighting()

void BaseHeightMapRenderObjClass::removeTerrainBibHighlighting ( void )

Remove all highlighting.

Removes all terrainBib highlighting from the bib buffer.

Definition at line 2321 of file BaseHeightMap.cpp.

◆ removeTree()

void BaseHeightMapRenderObjClass::removeTree ( DrawableID id)

Adds a tree to the tree buffer.

Definition at line 2212 of file BaseHeightMap.cpp.

◆ removeTreesAndPropsForConstruction()

void BaseHeightMapRenderObjClass::removeTreesAndPropsForConstruction ( const Coord3D * pos,
const GeometryInfo & geom,
Real angle )

Tell that a unit moved.

Definition at line 2184 of file BaseHeightMap.cpp.

◆ Render()

void BaseHeightMapRenderObjClass::Render ( RenderInfoClass & rinfo)
pure virtual

Renders (draws) the terrain.

Implements RenderObjClass.

Implemented in FlatHeightMapRenderObjClass, HeightMapRenderObjClass, and WBHeightMap.

Definition at line 2443 of file BaseHeightMap.cpp.

◆ renderShoreLines()

void BaseHeightMapRenderObjClass::renderShoreLines ( CameraClass * pCamera)
protected

re-render parts of terrain that need custom blending into water edge

Render parts of terrain that are along the coast line and have vertices directly under the water plane. Applying a custom render to these polygons allows for a smoother land->water transition

Definition at line 2451 of file BaseHeightMap.cpp.

◆ renderShoreLinesSorted()

void BaseHeightMapRenderObjClass::renderShoreLinesSorted ( CameraClass * pCamera)
protected

optimized version for game usage.

Render parts of terrain that are along the coast line and have vertices directly under the water plane. Applying a custom render to these polygons allows for a smoother land->water transition. This version is exactly like the one above but optimized for the case where tiles are assumed to be sorted. Not used by World Builder.

Definition at line 2624 of file BaseHeightMap.cpp.

◆ renderTrees()

void BaseHeightMapRenderObjClass::renderTrees ( CameraClass * camera)

renders the tree buffer.

Renders (draws) the trees. Since the trees are transparent, this has to be called after flush.

Definition at line 2969 of file BaseHeightMap.cpp.

◆ reset()

void BaseHeightMapRenderObjClass::reset ( void )
virtual

Updates the macro noise/lightmap texture (pass 3)

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 642 of file BaseHeightMap.cpp.

◆ setShoreLineDetail()

void BaseHeightMapRenderObjClass::setShoreLineDetail ( void )

update shoreline tiles in case the feature was toggled by user.

Definition at line 1482 of file BaseHeightMap.cpp.

◆ setShowImpassableAreas()

void BaseHeightMapRenderObjClass::setShowImpassableAreas ( Bool show)
inline

Definition at line 220 of file BaseHeightMap.h.

◆ setTextureLOD()

void BaseHeightMapRenderObjClass::setTextureLOD ( Int lod)

Update the macro texture (pass 3).

change the maximum mip-level sent to the hardware.

Definition at line 327 of file BaseHeightMap.cpp.

◆ setTimeOfDay()

void BaseHeightMapRenderObjClass::setTimeOfDay ( TimeOfDay tod)

When the time of day changes, the lighting changes and we need to update.

Definition at line 2379 of file BaseHeightMap.cpp.

◆ setViewImpassableAreaSlope()

void BaseHeightMapRenderObjClass::setViewImpassableAreaSlope ( Real viewSlope)
inline

Definition at line 227 of file BaseHeightMap.h.

◆ showAsVisibleCliff()

Bool BaseHeightMapRenderObjClass::showAsVisibleCliff ( Int xIndex,
Int yIndex ) const

Definition at line 1283 of file BaseHeightMap.cpp.

◆ staticLightingChanged()

void BaseHeightMapRenderObjClass::staticLightingChanged ( void )
virtual

Notification that all lighting needs to be recalculated.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 2361 of file BaseHeightMap.cpp.

◆ unitMoved()

void BaseHeightMapRenderObjClass::unitMoved ( Object * unit)

Tell that a unit moved.

Definition at line 2172 of file BaseHeightMap.cpp.

◆ updateBlock()

virtual int BaseHeightMapRenderObjClass::updateBlock ( Int x0,
Int y0,
Int x1,
Int y1,
WorldHeightMap * pMap,
RefRenderObjListIterator * pLightsIterator )
pure virtual

◆ updateCenter()

void BaseHeightMapRenderObjClass::updateCenter ( CameraClass * camera,
RefRenderObjListIterator * pLightsIterator )
virtual

Updates the positioning of the drawn portion of the height map in the heightmap. As the view slides around, this determines what is the actually rendered portion of the terrain. Only a 96x96 section is rendered at any time, even though maps can be up to 1024x1024. This function determines which subset is rendered.

Reimplemented in FlatHeightMapRenderObjClass, and HeightMapRenderObjClass.

Definition at line 2405 of file BaseHeightMap.cpp.

◆ updateMacroTexture()

void BaseHeightMapRenderObjClass::updateMacroTexture ( AsciiString textureName)

Updates the macro noise/lightmap texture (pass 3)

Definition at line 628 of file BaseHeightMap.cpp.

◆ updateScorches()

void BaseHeightMapRenderObjClass::updateScorches ( void )
protected

Update m_vertexScorch and m_indexScorch so all scorches will be drawn.

Builds the vertex buffer data for drawing the scorches.

Definition at line 1913 of file BaseHeightMap.cpp.

◆ updateShorelineTile()

void BaseHeightMapRenderObjClass::updateShorelineTile ( Int X,
Int Y,
Int Border,
WorldHeightMap * pMap )

figure out which tiles on this map cross water plane

Definition at line 1597 of file BaseHeightMap.cpp.

◆ updateShorelineTiles()

void BaseHeightMapRenderObjClass::updateShorelineTiles ( Int minX,
Int minY,
Int maxX,
Int maxY,
WorldHeightMap * pMap )

figure out which tiles on this map cross water plane

Scan through our map and record all tiles which cross a water plane and are within visible depth under water.

Definition at line 1653 of file BaseHeightMap.cpp.

◆ updateTreePosition()

Bool BaseHeightMapRenderObjClass::updateTreePosition ( DrawableID id,
Coord3D location,
Real angle )

Updates a tree's position and angle in the tree buffer.

Definition at line 2236 of file BaseHeightMap.cpp.

◆ updateViewImpassableAreas()

void BaseHeightMapRenderObjClass::updateViewImpassableAreas ( Bool partial = FALSE,
Int minX = 0,
Int maxX = 0,
Int minY = 0,
Int maxY = 0 )

Generate a lookup table for arbitrary angled impassable area viewing.

Definition at line 1715 of file BaseHeightMap.cpp.

◆ worldBuilderUpdateBridgeTowers()

void BaseHeightMapRenderObjClass::worldBuilderUpdateBridgeTowers ( W3DAssetManager * assetManager,
SimpleSceneClass * scene )

for the editor updating of bridge tower visuals

The worldbuilder has it's own method here to update the visual representation of the bridge towers

Definition at line 1473 of file BaseHeightMap.cpp.

◆ xfer()

void BaseHeightMapRenderObjClass::xfer ( Xfer * xfer)
protectedvirtual

Xfer Version Info: 1: Initial version

Implements Snapshot.

Definition at line 3001 of file BaseHeightMap.cpp.

Member Data Documentation

◆ m_bibBuffer

W3DBibBuffer* BaseHeightMapRenderObjClass::m_bibBuffer
protected

Class for drawing trees and other alpha objects.

Definition at line 294 of file BaseHeightMap.h.

◆ m_bridgeBuffer

W3DBridgeBuffer* BaseHeightMapRenderObjClass::m_bridgeBuffer
protected

Definition at line 299 of file BaseHeightMap.h.

◆ m_curImpassableSlope

Real BaseHeightMapRenderObjClass::m_curImpassableSlope
protected

Definition at line 261 of file BaseHeightMap.h.

◆ m_curNumScorchIndices

Int BaseHeightMapRenderObjClass::m_curNumScorchIndices
protected

number of indices used in m_indexScorch.

Definition at line 254 of file BaseHeightMap.h.

◆ m_curNumScorchVertices

Int BaseHeightMapRenderObjClass::m_curNumScorchVertices
protected

number of vertices used in m_vertexScorch.

Definition at line 253 of file BaseHeightMap.h.

◆ m_currentMinWaterOpacity

Real BaseHeightMapRenderObjClass::m_currentMinWaterOpacity
protected

current value inside the gradient lookup texture.

Definition at line 322 of file BaseHeightMap.h.

◆ m_depthFade

Vector3 BaseHeightMapRenderObjClass::m_depthFade
protected

depth based fall off values for r,g,b

Definition at line 271 of file BaseHeightMap.h.

◆ m_destAlphaTexture

TextureClass* BaseHeightMapRenderObjClass::m_destAlphaTexture
protected

Texture holding destination alpha LUT for water depth.

Definition at line 290 of file BaseHeightMap.h.

◆ m_disableTextures

Bool BaseHeightMapRenderObjClass::m_disableTextures
protected

Definition at line 272 of file BaseHeightMap.h.

◆ m_doXNextTime

Bool BaseHeightMapRenderObjClass::m_doXNextTime
protected

True if we updated y scroll, and need to do x scroll next frame.

Definition at line 274 of file BaseHeightMap.h.

◆ m_indexScorch

DX8IndexBufferClass* BaseHeightMapRenderObjClass::m_indexScorch
protected

indices defining a triangles for the scorch drawing.

Definition at line 251 of file BaseHeightMap.h.

◆ m_macroTextureName

AsciiString BaseHeightMapRenderObjClass::m_macroTextureName
protected

Name for stage 3 texture.

Definition at line 289 of file BaseHeightMap.h.

◆ m_map

WorldHeightMap* BaseHeightMapRenderObjClass::m_map
protected

Definition at line 268 of file BaseHeightMap.h.

◆ m_maxHeight

Real BaseHeightMapRenderObjClass::m_maxHeight
protected

maximum value of height samples in heightmap

Definition at line 276 of file BaseHeightMap.h.

◆ m_minHeight

Real BaseHeightMapRenderObjClass::m_minHeight
protected

minimum value of height samples in heightmap

Definition at line 275 of file BaseHeightMap.h.

◆ m_needFullUpdate

Bool BaseHeightMapRenderObjClass::m_needFullUpdate
protected

True if lighting changed, and we need to update all instead of what moved.

Definition at line 273 of file BaseHeightMap.h.

◆ m_numScorches

Int BaseHeightMapRenderObjClass::m_numScorches
protected

Definition at line 256 of file BaseHeightMap.h.

◆ m_numShoreLineTiles

Int BaseHeightMapRenderObjClass::m_numShoreLineTiles
protected

number of tiles in m_shoreLineTilePositions.

Definition at line 319 of file BaseHeightMap.h.

◆ m_numVisibleShoreLineTiles

Int BaseHeightMapRenderObjClass::m_numVisibleShoreLineTiles
protected

number of visible tiles.

Definition at line 320 of file BaseHeightMap.h.

◆ m_propBuffer

W3DPropBuffer* BaseHeightMapRenderObjClass::m_propBuffer
protected

Class for drawing trees and other alpha objects.

Definition at line 293 of file BaseHeightMap.h.

◆ m_roadBuffer

W3DRoadBuffer* BaseHeightMapRenderObjClass::m_roadBuffer
protected

Class for drawing roads.

Definition at line 297 of file BaseHeightMap.h.

◆ m_scorches

TScorch BaseHeightMapRenderObjClass::m_scorches[MAX_SCORCH_MARKS]
protected

Definition at line 255 of file BaseHeightMap.h.

◆ m_scorchesInBuffer

Int BaseHeightMapRenderObjClass::m_scorchesInBuffer
protected

how many are in the buffers. If less than numScorches, we need to update

Definition at line 258 of file BaseHeightMap.h.

◆ m_scorchTexture

TextureClass* BaseHeightMapRenderObjClass::m_scorchTexture
protected

Scorch mark texture.

Definition at line 252 of file BaseHeightMap.h.

◆ m_shaderClass

ShaderClass BaseHeightMapRenderObjClass::m_shaderClass
protected

shader or rendering state for heightmap

Definition at line 283 of file BaseHeightMap.h.

◆ m_shoreLineSortInfos

shoreLineTileSortInfo* BaseHeightMapRenderObjClass::m_shoreLineSortInfos
protected

Definition at line 323 of file BaseHeightMap.h.

◆ m_shoreLineSortInfosSize

Int BaseHeightMapRenderObjClass::m_shoreLineSortInfosSize
protected

Definition at line 324 of file BaseHeightMap.h.

◆ m_shoreLineSortInfosXMajor

Int BaseHeightMapRenderObjClass::m_shoreLineSortInfosXMajor
protected

Definition at line 325 of file BaseHeightMap.h.

◆ m_shoreLineTilePositions

shoreLineTileInfo* BaseHeightMapRenderObjClass::m_shoreLineTilePositions
protected

array holding x,y tile positions of all shoreline terrain.

Definition at line 318 of file BaseHeightMap.h.

◆ m_shoreLineTilePositionsSize

Int BaseHeightMapRenderObjClass::m_shoreLineTilePositionsSize
protected

total size of array including unused memory.

Definition at line 321 of file BaseHeightMap.h.

◆ m_shoreLineTileSortMaxCoordinate

Int BaseHeightMapRenderObjClass::m_shoreLineTileSortMaxCoordinate
protected

keep track of coordinate range along axis used for m_shoreLineSortInfos

Definition at line 326 of file BaseHeightMap.h.

◆ m_shoreLineTileSortMinCoordinate

Int BaseHeightMapRenderObjClass::m_shoreLineTileSortMinCoordinate
protected

Definition at line 327 of file BaseHeightMap.h.

◆ m_showAsVisibleCliff

std::vector<bool> BaseHeightMapRenderObjClass::m_showAsVisibleCliff
protected

Definition at line 280 of file BaseHeightMap.h.

◆ m_showImpassableAreas

Bool BaseHeightMapRenderObjClass::m_showImpassableAreas
protected

If true, shade impassable areas.

Definition at line 277 of file BaseHeightMap.h.

◆ m_shroud

W3DShroud* BaseHeightMapRenderObjClass::m_shroud
protected

Class for drawing the shroud over terrain.

Definition at line 300 of file BaseHeightMap.h.

◆ m_stageOneTexture

TextureClass* BaseHeightMapRenderObjClass::m_stageOneTexture
protected

transparent edging texture

Definition at line 286 of file BaseHeightMap.h.

◆ m_stageThreeTexture

TextureClass* BaseHeightMapRenderObjClass::m_stageThreeTexture
protected

light/noise map texture

Definition at line 288 of file BaseHeightMap.h.

◆ m_stageTwoTexture

CloudMapTerrainTextureClass* BaseHeightMapRenderObjClass::m_stageTwoTexture
protected

Cloud map texture.

Definition at line 287 of file BaseHeightMap.h.

◆ m_stageZeroTexture

TextureClass* BaseHeightMapRenderObjClass::m_stageZeroTexture
protected

primary texture

Definition at line 285 of file BaseHeightMap.h.

◆ m_treeBuffer

W3DTreeBuffer* BaseHeightMapRenderObjClass::m_treeBuffer
protected

Class for drawing trees and other alpha objects.

Definition at line 292 of file BaseHeightMap.h.

◆ m_updating

Bool BaseHeightMapRenderObjClass::m_updating
protected

Definition at line 270 of file BaseHeightMap.h.

◆ m_useDepthFade

Bool BaseHeightMapRenderObjClass::m_useDepthFade
protected

fade terrain lighting under water

Definition at line 269 of file BaseHeightMap.h.

◆ m_vertexMaterialClass

VertexMaterialClass* BaseHeightMapRenderObjClass::m_vertexMaterialClass
protected

vertex shader (lighting) for terrain

Definition at line 284 of file BaseHeightMap.h.

◆ m_vertexScorch

DX8VertexBufferClass* BaseHeightMapRenderObjClass::m_vertexScorch
protected

Scorch vertex buffer.

Definition at line 250 of file BaseHeightMap.h.

◆ m_waypointBuffer

W3DWaypointBuffer* BaseHeightMapRenderObjClass::m_waypointBuffer
protected

Draws waypoints.

Definition at line 295 of file BaseHeightMap.h.

◆ m_x

Int BaseHeightMapRenderObjClass::m_x
protected

dimensions of heightmap

Definition at line 241 of file BaseHeightMap.h.

◆ m_y

Int BaseHeightMapRenderObjClass::m_y
protected

dimensions of heightmap

Definition at line 242 of file BaseHeightMap.h.


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