VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
trpgwGeomHelper Class Reference

Public Types

enum  { UseDouble, UseFloat }
 

Public Member Functions

 trpgwGeomHelper (void)
 
virtual ~trpgwGeomHelper (void)
 
 trpgwGeomHelper (trpgWriteBuffer *, int dataType=UseDouble)
 
void init (trpgWriteBuffer *, int dataType=UseDouble)
 
virtual void SetMode (int)
 
virtual void Reset (void)
 
virtual void StartPolygon (void)
 
virtual void EndPolygon (void)
 
virtual void ResetPolygon (void)
 
virtual void SetColor (trpgColor &)
 
virtual void SetTexCoord (trpg2dPoint &)
 
virtual void AddTexCoord (trpg2dPoint &)
 
virtual void SetNormal (trpg3dPoint &)
 
virtual void SetMaterial (int32)
 
virtual void AddMaterial (int32)
 
virtual void AddVertex (trpg3dPoint &)
 
virtual void FlushGeom (void)
 
virtual void GetZMinMax (double &min, double &max)
 
trpgwGeomStatsGetStats (void)
 

Protected Member Functions

virtual void Optimize (void)
 
virtual void ResetTri (void)
 

Protected Attributes

int mode
 
int dataType
 
trpgWriteBufferbuf
 
trpgGeometry strips
 
trpgGeometry fans
 
trpgGeometry bags
 
std::vector< int32matTri
 
std::vector< trpg2dPointtex
 
std::vector< trpg3dPointnorm
 
std::vector< trpg3dPointvert
 
std::vector< int32matPoly
 
std::vector< trpg2dPointpolyTex
 
std::vector< trpg3dPointpolyNorm
 
std::vector< trpg3dPointpolyVert
 
std::vector< trpg2dPointtmpTex
 
trpg3dPoint tmpNorm
 
trpgColor tmpCol
 
trpgwGeomStats stats
 
double zmin
 
double zmax
 

Member Enumeration Documentation

anonymous enum
Enumerator
UseDouble 
UseFloat 

Constructor & Destructor Documentation

trpgwGeomHelper::trpgwGeomHelper ( void  )
virtual trpgwGeomHelper::~trpgwGeomHelper ( void  )
virtual
trpgwGeomHelper::trpgwGeomHelper ( trpgWriteBuffer ,
int  dataType = UseDouble 
)

Member Function Documentation

void trpgwGeomHelper::init ( trpgWriteBuffer ,
int  dataType = UseDouble 
)
virtual void trpgwGeomHelper::SetMode ( int  )
virtual
virtual void trpgwGeomHelper::Reset ( void  )
virtual

Takes a trpgGeometry primitive type (triangle by default)

virtual void trpgwGeomHelper::StartPolygon ( void  )
virtual

Start/End polygon definition.

virtual void trpgwGeomHelper::EndPolygon ( void  )
virtual
virtual void trpgwGeomHelper::ResetPolygon ( void  )
virtual
virtual void trpgwGeomHelper::SetColor ( trpgColor )
virtual

                          If you change your mind about the current poly

Set the current state Note: Currently you must set all of these

virtual void trpgwGeomHelper::SetTexCoord ( trpg2dPoint )
virtual
virtual void trpgwGeomHelper::AddTexCoord ( trpg2dPoint )
virtual
virtual void trpgwGeomHelper::SetNormal ( trpg3dPoint )
virtual

for multiple textures

virtual void trpgwGeomHelper::SetMaterial ( int32  )
virtual
virtual void trpgwGeomHelper::AddMaterial ( int32  )
virtual
virtual void trpgwGeomHelper::AddVertex ( trpg3dPoint )
virtual

                        for multiple textures

Pull the state info together and add a vertex

virtual void trpgwGeomHelper::FlushGeom ( void  )
virtual

Dump whatever we're doing and move on.

virtual void trpgwGeomHelper::GetZMinMax ( double min,
double max 
)
virtual

Get the Min and Max Z values.

trpgwGeomStats* trpgwGeomHelper::GetStats ( void  )
inline

Get statistics for whatever we built.

virtual void trpgwGeomHelper::Optimize ( void  )
protectedvirtual
virtual void trpgwGeomHelper::ResetTri ( void  )
protectedvirtual

Reset Triangle arrays.

Member Data Documentation

int trpgwGeomHelper::mode
protected
int trpgwGeomHelper::dataType
protected
trpgWriteBuffer* trpgwGeomHelper::buf
protected
trpgGeometry trpgwGeomHelper::strips
protected

Collections of geometry.

trpgGeometry trpgwGeomHelper::fans
protected
trpgGeometry trpgwGeomHelper::bags
protected
std::vector<int32> trpgwGeomHelper::matTri
protected

Temporary data arrays for triangles/quads.

std::vector<trpg2dPoint> trpgwGeomHelper::tex
protected
std::vector<trpg3dPoint> trpgwGeomHelper::norm
protected
std::vector<trpg3dPoint> trpgwGeomHelper::vert
protected
std::vector<int32> trpgwGeomHelper::matPoly
protected

Data arrays for a polygon.

std::vector<trpg2dPoint> trpgwGeomHelper::polyTex
protected
std::vector<trpg3dPoint> trpgwGeomHelper::polyNorm
protected
std::vector<trpg3dPoint> trpgwGeomHelper::polyVert
protected
std::vector<trpg2dPoint> trpgwGeomHelper::tmpTex
protected

Single points.

trpg3dPoint trpgwGeomHelper::tmpNorm
protected
trpgColor trpgwGeomHelper::tmpCol
protected
trpgwGeomStats trpgwGeomHelper::stats
protected

Geometry status built up as we go.

double trpgwGeomHelper::zmin
protected

Keeps track of min and max z values.

double trpgwGeomHelper::zmax
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)