Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
vtTiledGeom Class Reference

#include <TiledGeom.h>

Inheritance diagram for vtTiledGeom:
vtDynGeom vtHeightField3d vtGeode vtHeightField NodeExtension

Public Member Functions

bool ReadTileList (const char *dataset_fname_elev, const char *dataset_fname_image, bool bThreading, bool bGradual)
 
void SetVerticalExag (float fExag)
 
float GetVerticalExag () const
 
void SetVertexTarget (int iVertices)
 
int GetVertexTarget ()
 
FPoint2 GetWorldSpacingAtPoint (const DPoint2 &p)
 
void SetTexLODFactor (float factor)
 
void DoRender ()
 
void DoCalcBoundBox (FBox3 &box)
 
void DoCull (const vtCamera *pCam)
 
bool FindAltitudeOnEarth (const DPoint2 &p, float &fAltitude, bool bTrue=false) const
 
bool FindAltitudeAtPoint (const FPoint3 &p3, float &fAltitude, bool bTrue=false, int iCultureFlags=0, FPoint3 *vNormal=NULL) const
 
bool CastRayToSurface (const FPoint3 &point, const FPoint3 &dir, FPoint3 &result) const
 Find the intersection point of a ray with the heightfield.
 
databuf FetchTile (const char *fname)
 
class miniload * GetMiniLoad ()
 
class minitile * GetMiniTile ()
 
class datacloud * GetDataCloud ()
 
void SetPagingRange (float val)
 
float GetPagingRange ()
 
bool CheckMapFile (const char *mapfile, bool bIsTexture)
 
void SetProgressCallback (ProgFuncPtrType progress_callback)
 
void SetBaseURL (const char *url)
 
- Public Member Functions inherited from vtDynGeom
int IsVisible (const FSphere &sphere) const
 
int IsVisible (const FPoint3 &point0, const FPoint3 &point1, const FPoint3 &point2, const float fTolerance=0.0f) const
 
int IsVisible (const FPoint3 &point, float radius)
 
bool IsVisible (const FPoint3 &point) const
 
void ApplyMaterial (vtMaterial *mat)
 
- Public Member Functions inherited from vtGeode
vtGeodeCloneGeode ()
 
void CloneFromGeode (const vtGeode *rhs)
 
void AddMesh (vtMesh *pMesh, int iMatIdx)
 
void RemoveMesh (vtMesh *pMesh)
 
void AddTextMesh (vtTextMesh *pMesh, int iMatIdx)
 
uint GetNumMeshes () const
 
vtMeshGetMesh (int i) const
 
vtTextMeshGetTextMesh (int i) const
 
virtual void SetMaterials (const class vtMaterialArray *mats)
 
const vtMaterialArrayGetMaterials () const
 
vtMaterialGetMaterial (int idx)
 
void SetMeshMatIndex (vtMesh *pMesh, int iMatIdx)
 
- Public Member Functions inherited from NodeExtension
void SetEnabled (bool bOn)
 
bool GetEnabled () const
 
void SetCastShadow (bool b)
 Set this node to cast a shadow, if it is under a vtShadow node. Default is false.
 
bool GetCastShadow ()
 Get whether this node casts a shadow.
 
void GetBoundSphere (FSphere &sphere, bool bGlobal=false)
 Get the Bounding Sphere of the node.
 
void SetOsgNode (osg::Node *n)
 
- Public Member Functions inherited from vtHeightField3d
void Initialize (const LinearUnits units, const DRECT &earthextents, float fMinHeight, float fMaxHeight)
 
virtual void SetEarthExtents (const DRECT &ext)
 
int PointIsAboveTerrain (const FPoint3 &p) const
 
bool ConvertEarthToSurfacePoint (const DPoint2 &epos, FPoint3 &p3, int iCultureFlags=0, bool bTrue=false)
 
bool ContainsWorldPoint (float x, float z)
 
void GetCenter (FPoint3 &center)
 
void SetCulture (CultureExtension *ext)
 
- Public Member Functions inherited from vtHeightField
void Initialize (const DRECT &extents, float fMinHeight, float fMaxHeight)
 
bool ContainsEarthPoint (const DPoint2 &p, bool bInclusive=false) const
 
DRECTGetEarthExtents ()
 
const DRECTGetEarthExtents () const
 
void GetHeightExtents (float &fMinHeight, float &fMaxHeight) const
 

Public Attributes

vtProjection m_proj
 
float m_fResolution
 
float m_fHResolution
 
float m_fLResolution
 
int m_iVertexTarget
 
int m_iVertexCount
 
int m_iFrame
 
int m_iTileLoads
 
int image_lod0size
 
int cols
 
int rows
 
float coldim
 
float rowdim
 
FPoint3 center
 
ucharptr * hfields
 
ucharptr * textures
 
float prange
 
float prange_min
 
float prange_max
 
vtString m_folder_elev
 
vtString m_folder_image
 
TiledDatasetDescription m_elev_info
 
TiledDatasetDescription m_image_info
 
ProgFuncPtrType m_progress_callback
 
vtString m_strBaseURL
 
ReqContextm_pReqContext
 
- Public Attributes inherited from vtDynGeom
FPlane m_cullPlanes [6]
 
- Public Attributes inherited from vtGeode
osg::ref_ptr< const
vtMaterialArray
m_pMaterialArray
 
- Public Attributes inherited from NodeExtension
osg::Node * m_pNode
 
bool m_bCastShadow
 
- Public Attributes inherited from vtHeightField3d
FRECT m_WorldExtents
 
vtLocalConversion m_Conversion
 

Protected Member Functions

void SetupMiniLoad (bool bThreading, bool bGradual)
 
- Protected Member Functions inherited from vtHeightField3d
void UpdateWorldExtents ()
 

Protected Attributes

vtMaterialm_pPlainMaterial
 
IPoint2 m_window_size
 
FPoint3 m_eyepos_ogl
 
float m_fFOVY
 
float m_fAspect
 
float m_fNear
 
float m_fFar
 
FPoint3 eye_up
 
FPoint3 eye_forward
 
bool m_bNeedResolutionAdjust
 
float m_fMaximumScale
 
float m_fHeightScale
 
float m_fDrawScale
 
class miniload * m_pMiniLoad
 
class minitile * m_pMiniTile
 
class minicache * m_pMiniCache
 
class datacloud * m_pDataCloud
 
- Protected Attributes inherited from vtDynGeom
OsgDynMeshm_pDynMesh
 
- Protected Attributes inherited from vtHeightField3d
float m_fDiagonalLength
 
CultureExtensionm_pCulture
 
- Protected Attributes inherited from vtHeightField
float m_fMinHeight
 
float m_fMaxHeight
 
DRECT m_EarthExtents
 

Detailed Description

This class represents a tiled textured terrain heightfield, which is drawn using the tiled paging capabilities of Roettger's libMini. It is rendered directly using OpenGL, instead of going through OSG.

Member Function Documentation

bool vtTiledGeom::FindAltitudeAtPoint ( const FPoint3 p3,
float &  fAltitude,
bool  bTrue = false,
int  iCultureFlags = 0,
FPoint3 vNormal = NULL 
) const
virtual

Given a point in world coordinates, determine the elevation at that point.

Parameters
p3The point to test. Only the X and Z values are used.
fAltitudeThe resulting elevation at that point, by reference.
bTrueTrue to test true elevation. False to test the displayed elevation (possibly exaggerated.)
iCultureFlagsPass 0 to test only the heightfield itself, non-zero to test any culture objects which may be sitting on the heightfield. Values include:
  • CE_STRUCTURES Test structures on the ground.
  • CE_ROADS Test roads on the ground.
  • CE_ALL Test everything on the ground.
vNormalIf you supply a pointer to a vector, it will be set to the upward-pointing surface normal at the ground point.
Returns
true if successful, false if there was nothing found at that point.

Implements vtHeightField3d.


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