VR-Forces 5.0.2 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 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
}
 
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)
 
void SetPrimLengths (int, const int *)
 
void AddPrimLength (int)
 
void AddPrim (void)
 
void SetNumPrims (int)
 
void SetNumMaterial (int)
 
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
 
void Reset (void)
 
bool Write (trpgWriteBuffer &)
 
bool Read (trpgReadBuffer &)
 
bool Print (trpgPrintBuffer &) const
 
- Public Member Functions inherited from trpgReadWriteable
 trpgReadWriteable ()
 
const chargetErrMess () const
 
- Public Member Functions inherited from trpgCheckable
 trpgCheckable (void)
 
virtual ~trpgCheckable (void)
 
bool isValid (void) const
 
virtual TeAttrHdl GetHandle () const
 
virtual void SetHandle (TeAttrHdl hdl)
 

Protected Attributes

int primType
 
int numPrim
 
std::vector< intprimLength
 
std::vector< intmaterials
 
std::vector< float > vertDataFloat
 
std::vector< doublevertDataDouble
 
int normBind
 
std::vector< float > normDataFloat
 
std::vector< doublenormDataDouble
 
std::vector< trpgColorInfocolors
 
std::vector< trpgTexDatatexData
 
std::vector< charedgeFlags
 
- 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.

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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)