vtlib library
Public Member Functions | List of all members
vtTin3d Class Reference
Inheritance diagram for vtTin3d:
Inheritance graph
[legend]

Public Member Functions

bool Read (const char *fname, bool progress_callback(int)=NULL)
 
void SetColorMap (ColorMap *color_map)
 
virtual bool FindAltitudeAtPoint (const FPoint3 &p3, float &fAltitude, bool bTrue=false, int iCultureFlags=0, FPoint3 *vNormal=NULL) const
 
void MakeMaterialsFromOptions (const vtTagArray &options, bool bTextureCompression)
 
void MakeMaterials (ColorMap *cmap, osg::Image *image, float fScale, float fOpacity, bool bTextureCompression)
 

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.

There are three ways to apply materials to the surface.

  1. If you have an existing material you want the TIN to use, pass it with SetMaterial(). It can be textured or not.
  2. Or, pass some colors with SetColorMap, and those will be used (as vertex colors, no texturing.
  3. Or, add some surface types with vtTin::AddSurfaceType, and those types will be used

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.

void vtTin3d::MakeMaterials ( ColorMap cmap,
osg::Image *  image,
float  fScale,
float  fOpacity,
bool  bTextureCompression 
)

Lower-level method to make materials.

void vtTin3d::MakeMaterialsFromOptions ( const vtTagArray options,
bool  bTextureCompression 
)

High-level method to make materials from layer options.

bool vtTin3d::Read ( const char *  fname,
bool   progress_callbackint = NULL 
)

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

void vtTin3d::SetColorMap ( ColorMap color_map)
inline

Takes ownership of the colormap you provide