vtlib library
Public Member Functions
vtDynGeom Class Reference
Inheritance diagram for vtDynGeom:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Detailed Description

vtDynGeom extends the vtGeode class with the ability to have dynamic geometry which changes every frame. The most prominent use of this feature is to do Continuous Level of Detail (CLOD) for terrain.

To implement, you must create your own subclass and override the following methods:
  • DoRender()
  • DoCalcBoundBox()
  • DoCull()
Many helpful methods are provided to make doing your own view culling very easy:
  • IsVisible(sphere)
  • IsVisible(triangle)
  • IsVisible(point)
See also:
vtDynTerrainGeom

Member Function Documentation

int vtDynGeom::IsVisible ( const FPoint3 point0,
const FPoint3 point1,
const FPoint3 point2,
const float  fTolerance = 0.0f 
) const

Test a 3d triangle against the view volume.

Returns:
VT_AllVisible if entirely inside the volume, VT_Visible if partly intersecting, otherwise 0.
int vtDynGeom::IsVisible ( const FSphere sphere) const

Test a sphere against the view volume.

Returns:
VT_AllVisible if entirely inside the volume, VT_Visible if partly inside, otherwise 0.
int vtDynGeom::IsVisible ( const FPoint3 point,
float  radius 
)

Test a sphere against the view volume.

Returns:
VT_AllVisible if entirely inside the volume, VT_Visible if partly intersecting, otherwise 0.
bool vtDynGeom::IsVisible ( const FPoint3 point) const

Test a single point against the view volume.

Returns:
true if inside, false if outside.
 All Classes Files Functions Variables Friends