VR-Forces 4.1.1 Class Documentation
List of all members | Public Types | Public Member Functions | Protected Attributes
trpgGeometry Class Reference
Inheritance diagram for trpgGeometry:
Inheritance graph
[legend]

Public Types

enum  PrimType {
  Points, LineStrips, LineLoops, Lines,
  Polygons, TriStrips, TriFans, Triangles,
  QuadStrips, Quads
}
enum  {
  VertexFloat, VertexDouble, NormalFloat, NormalDouble,
  Color, TextureFloat, TextureDouble, EdgeFlag
}
 These are primitive types used within the trpgGeometry structure. More...
enum  DataType { FloatData, DoubleData }
enum  BindType { Overall, PerPrim, PerVertex }
enum  ColorType { Ambient, Diffuse, Specular, Emission }

Public Member Functions

 trpgGeometry (void)
 ~trpgGeometry (void)
void SetPrimType (PrimType type)
 Set the primitive type for the geometry node.
void SetPrimLengths (int, const int *)
void AddPrimLength (int)
void AddPrim (void)
void SetNumPrims (int)
void SetNumMaterial (int)
 Only when there are no primitive lengths.
void SetMaterial (int which, int matID, bool isLocal=false)
void SetMaterials (int32 numMat, const int32 *matIDs)
int AddMaterial (int matID)
void SetVertices (int num, const float32 *)
void SetVertices (int num, const float64 *)
void AddVertex (DataType type, trpg3dPoint &)
void SetNormals (int num, BindType bind, const float32 *)
void SetNormals (int num, BindType bind, const float64 *)
void AddNormal (DataType type, trpg3dPoint &)
void SetColors (int num, ColorType type, BindType bind, const trpgColor *)
void SetTexCoords (int num, BindType bind, const float32 *)
void SetTexCoords (int num, BindType bind, const float64 *)
void AddTexCoords (BindType bind)
void AddTexCoord (DataType type, trpg2dPoint &, int n=0)
void AddTexCoord (DataType type, std::vector< trpg2dPoint > &pts)
void SetEdgeFlags (int num, const char *)
bool GetPrimType (PrimType &type) const
bool GetNumPrims (int &num) const
bool GetPrimLengths (int *lenArray) const
bool GetNumMaterial (int &num) const
bool GetMaterial (int num, int32 &matID, bool &isLocal) const
bool GetNumVertex (int &num) const
bool GetVertices (float32 *) const
bool GetVertices (float64 *) const
bool GetVertex (int id, trpg3dPoint &) const
bool GetNumNormal (int &num) const
bool GetNormals (float32 *) const
bool GetNormals (float64 *) const
bool GetNumColorSets (int &num) const
bool GetColorSet (int id, trpgColorInfo *) const
bool GetNumTexCoordSets (int &) const
bool GetTexCoordSet (int id, trpgTexData *) const
const trpgTexDataGetTexCoordSet (int id) const
bool GetNumEdgeFlag (int &num) const
bool GetEdgeFlags (char *) const
bool isValid (void) const
 Returns true if the trpgGeometry structure is valid.
void Reset (void)
 Resets the contents back to empty.
bool Write (trpgWriteBuffer &)
 Write self to a buffer.
bool Read (trpgReadBuffer &)
 Read self from a buffer. Check isValid() afterwards.
bool Print (trpgPrintBuffer &) const
 Prints this class to a print buffer.
- Public Member Functions inherited from trpgReadWriteable
 trpgReadWriteable ()
const char * getErrMess () const
- Public Member Functions inherited from trpgCheckable
 trpgCheckable (void)
virtual ~trpgCheckable (void)
virtual TeAttrHdl GetHandle () const
virtual void SetHandle (TeAttrHdl hdl)

Protected Attributes

int primType
int numPrim
std::vector< int > primLength
std::vector< int > materials
std::vector< float > vertDataFloat
std::vector< double > vertDataDouble
int normBind
std::vector< float > normDataFloat
std::vector< double > normDataDouble
std::vector< trpgColorInfocolors
std::vector< trpgTexDatatexData
std::vector< char > edgeFlags
- Protected Attributes inherited from trpgReadWriteable
char errMess [512]
- Protected Attributes inherited from trpgCheckable
bool valid
TeAttrHdl handle
bool writeHandle

Member Enumeration Documentation

Enumerator:
Points 
LineStrips 
LineLoops 
Lines 
Polygons 
TriStrips 
TriFans 
Triangles 
QuadStrips 
Quads 
anonymous enum

These are primitive types used within the trpgGeometry structure.

Enumerator:
VertexFloat 
VertexDouble 
NormalFloat 
NormalDouble 
Color 
TextureFloat 
TextureDouble 
EdgeFlag 
Enumerator:
FloatData 
DoubleData 
Enumerator:
Overall 
PerPrim 
PerVertex 
Enumerator:
Ambient 
Diffuse 
Specular 
Emission 

Constructor & Destructor Documentation

trpgGeometry::trpgGeometry ( void  )
trpgGeometry::~trpgGeometry ( void  )

Member Function Documentation

void trpgGeometry::SetPrimType ( PrimType  type)

Set the primitive type for the geometry node.

void trpgGeometry::SetPrimLengths ( int  ,
const int *   
)
void trpgGeometry::AddPrimLength ( int  )
void trpgGeometry::AddPrim ( void  )
void trpgGeometry::SetNumPrims ( int  )
void trpgGeometry::SetNumMaterial ( int  )

Only when there are no primitive lengths.

void trpgGeometry::SetMaterial ( int  which,
int  matID,
bool  isLocal = false 
)
void trpgGeometry::SetMaterials ( int32  numMat,
const int32 matIDs 
)
int trpgGeometry::AddMaterial ( int  matID)
void trpgGeometry::SetVertices ( int  num,
const float32  
)
void trpgGeometry::SetVertices ( int  num,
const float64  
)
void trpgGeometry::AddVertex ( DataType  type,
trpg3dPoint  
)
void trpgGeometry::SetNormals ( int  num,
BindType  bind,
const float32  
)
void trpgGeometry::SetNormals ( int  num,
BindType  bind,
const float64  
)
void trpgGeometry::AddNormal ( DataType  type,
trpg3dPoint  
)
void trpgGeometry::SetColors ( int  num,
ColorType  type,
BindType  bind,
const trpgColor  
)
void trpgGeometry::SetTexCoords ( int  num,
BindType  bind,
const float32  
)
void trpgGeometry::SetTexCoords ( int  num,
BindType  bind,
const float64  
)
void trpgGeometry::AddTexCoords ( BindType  bind)
void trpgGeometry::AddTexCoord ( DataType  type,
trpg2dPoint ,
int  n = 0 
)
void trpgGeometry::AddTexCoord ( DataType  type,
std::vector< trpg2dPoint > &  pts 
)
void trpgGeometry::SetEdgeFlags ( int  num,
const char *   
)
bool trpgGeometry::GetPrimType ( PrimType type) const
bool trpgGeometry::GetNumPrims ( int &  num) const
bool trpgGeometry::GetPrimLengths ( int *  lenArray) const
bool trpgGeometry::GetNumMaterial ( int &  num) const
bool trpgGeometry::GetMaterial ( int  num,
int32 matID,
bool isLocal 
) const
bool trpgGeometry::GetNumVertex ( int &  num) const
bool trpgGeometry::GetVertices ( float32 ) const
bool trpgGeometry::GetVertices ( float64 ) const
bool trpgGeometry::GetVertex ( int  id,
trpg3dPoint  
) const
bool trpgGeometry::GetNumNormal ( int &  num) const
bool trpgGeometry::GetNormals ( float32 ) const
bool trpgGeometry::GetNormals ( float64 ) const
bool trpgGeometry::GetNumColorSets ( int &  num) const
bool trpgGeometry::GetColorSet ( int  id,
trpgColorInfo  
) const
bool trpgGeometry::GetNumTexCoordSets ( int &  ) const
bool trpgGeometry::GetTexCoordSet ( int  id,
trpgTexData  
) const
const trpgTexData* trpgGeometry::GetTexCoordSet ( int  id) const
bool trpgGeometry::GetNumEdgeFlag ( int &  num) const
bool trpgGeometry::GetEdgeFlags ( char *  ) const
bool trpgGeometry::isValid ( void  ) const

Returns true if the trpgGeometry structure is valid.

Reimplemented from trpgCheckable.

void trpgGeometry::Reset ( void  )
virtual

Resets the contents back to empty.

Implements trpgReadWriteable.

bool trpgGeometry::Write ( trpgWriteBuffer )
virtual

Write self to a buffer.

Implements trpgReadWriteable.

bool trpgGeometry::Read ( trpgReadBuffer )
virtual

Read self from a buffer. Check isValid() afterwards.

Reimplemented from trpgReadWriteable.

bool trpgGeometry::Print ( trpgPrintBuffer ) const
virtual

Prints this class to a print buffer.

Reimplemented from trpgReadWriteable.

Member Data Documentation

int trpgGeometry::primType
protected
int trpgGeometry::numPrim
protected
std::vector<int> trpgGeometry::primLength
protected
std::vector<int> trpgGeometry::materials
protected
std::vector<float> trpgGeometry::vertDataFloat
protected
std::vector<double> trpgGeometry::vertDataDouble
protected
int trpgGeometry::normBind
protected
std::vector<float> trpgGeometry::normDataFloat
protected
std::vector<double> trpgGeometry::normDataDouble
protected
std::vector<trpgColorInfo> trpgGeometry::colors
protected
std::vector<trpgTexData> trpgGeometry::texData
protected
std::vector<char> trpgGeometry::edgeFlags
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)