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

#include <vtTin3d.h>

Inheritance diagram for vtTin3d:
vtTin vtHeightField3d vtHeightField

Public Member Functions

bool Read (const char *fname)
 
vtGeodeCreateGeometry (bool bDropShadowMesh, int m_matidx=0)
 
vtGeodeGetGeometry ()
 
void SetTextureMaterials (vtMaterialArray *pMats)
 
virtual bool FindAltitudeAtPoint (const FPoint3 &p3, float &fAltitude, bool bTrue=false, int iCultureFlags=0, FPoint3 *vNormal=NULL) const
 
virtual bool CastRayToSurface (const FPoint3 &point, const FPoint3 &dir, FPoint3 &result) const
 Find the intersection point of a ray with the heightfield.
 
FPoint3 FindVectorToClosestVertex (const FPoint3 &pos)
 
- Public Member Functions inherited from vtTin
uint NumVerts () const
 
uint NumTris () const
 
void AddVert (const DPoint2 &p, float z)
 
void AddVert (const DPoint2 &p, float z, FPoint3 &normal)
 
void AddTri (int v1, int v2, int v3, int surface_type=-1)
 
void RemVert (int v)
 
void RemTri (int t)
 
bool Read (const char *fname)
 
bool ReadHeader (const char *fname)
 
bool ReadBody (const char *fname)
 
bool Write (const char *fname, bool progress_callback(int)=NULL) const
 
bool ReadDXF (const char *fname, bool progress_callback(int)=NULL)
 
bool ReadADF (const char *fname, bool progress_callback(int)=NULL)
 
bool ReadGMS (const char *fname, bool progress_callback(int)=NULL)
 
bool ReadPLY (const char *fname, bool progress_callback(int)=NULL)
 
bool WriteGMS (const char *fname, bool progress_callback(int)=NULL) const
 
bool WriteDAE (const char *fname, bool progress_callback(int)=NULL) const
 
bool WriteWRL (const char *fname, bool progress_callback(int)=NULL) const
 
bool WriteOBJ (const char *fname, bool progress_callback(int)=NULL) const
 
bool WritePLY (const char *fname, bool progress_callback(int)=NULL) const
 
bool WriteDXF (const char *fname, bool progress_callback(int)=NULL) const
 
void FreeData ()
 
uint AddSurfaceType (const vtString &surface_texture, bool bTiled=false)
 
void SetSurfaceType (int iTri, int surface_type)
 
bool ComputeExtents ()
 
void Offset (const DPoint2 &p)
 
void Scale (float fFactor)
 
void VertOffset (float fAmount)
 
bool ConvertProjection (const vtProjection &proj_new)
 
void GetVert (int v, DPoint2 &p, float &z) const
 
void GetTri (int t, int &v0, int &v1, int &v2) const
 
int * GetAtTri (int t) const
 
virtual bool FindAltitudeOnEarth (const DPoint2 &p, float &fAltitude, bool bTrue=false) const
 
void CleanupClockwisdom ()
 
int RemoveUnusedVertices ()
 
void AppendFrom (vtTin *pTin)
 
double GetTriMaxEdgeLength (int iTri) const
 
void MergeSharedVerts (bool progress_callback(int)=NULL)
 
bool HasVertexNormals () const
 
int RemoveTrianglesBySegment (const DPoint2 &ep1, const DPoint2 &ep2)
 
void SetupTriangleBins (int bins, bool progress_callback(int)=NULL)
 
int MemoryNeededToLoad () const
 
- 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
 

Protected Member Functions

virtual void MakeSurfaceMaterials ()
 
- Protected Member Functions inherited from vtTin
bool TestTriangle (int tri, const DPoint2 &p, float &fAltitude) const
 
bool _ReadTin (FILE *fp)
 
bool _ReadTinHeader (FILE *fp)
 
bool _ReadTinBody (FILE *fp)
 
bool _ReadTinOld (FILE *fp)
 
void _UpdateIndicesInInBin (int bin)
 
void _CompareBins (int bin1, int bin2)
 
- Protected Member Functions inherited from vtHeightField3d
void UpdateWorldExtents ()
 

Protected Attributes

vtArray< vtMesh * > m_Meshes
 
vtMaterialArrayPtr m_pMats
 
vtGeodem_pGeode
 
vtGeodem_pDropGeode
 
- Protected Attributes inherited from vtTin
DLine2 m_vert
 
vtArray< float > m_z
 
vtArray< int > m_tri
 
FLine3 m_vert_normal
 
vtArray< int > m_surfidx
 
vtStringArray m_surftypes
 
vtArray< bool > m_surftype_tiled
 
int * m_bReplace
 
Binm_vertbin
 
Binm_tribin
 
BinArraym_trianglebins
 
DPoint2 m_BinSize
 
int m_file_data_start
 
int m_file_verts
 
int m_file_tris
 
- Protected Attributes inherited from vtHeightField3d
float m_fDiagonalLength
 
CultureExtensionm_pCulture
 
- Protected Attributes inherited from vtHeightField
float m_fMinHeight
 
float m_fMaxHeight
 
DRECT m_EarthExtents
 

Additional Inherited Members

- Public Attributes inherited from vtTin
vtProjection m_proj
 

Detailed Description

This class extends vtTin with the ability to call vtlib to create 3d geometry for the TIN. It also subclasses vtHeightField so it provides the ability to do height-testing and ray-picking.

Member Function Documentation

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

Returns true if the point was over the TIN, false otherwise.

Reimplemented from vtTin.

bool vtTin3d::Read ( const char *  fname)

Read the TIN from a file. This can either be an old-style or new-style .tin format (so far, a VTP-specific format)


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