Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

nvsg::Triangles Class Reference

GeoSet for Triangles. More...

#include <Triangles.h>

Inheritance diagram for nvsg::Triangles:

Inheritance graph
[legend]
Collaboration diagram for nvsg::Triangles:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual NVSG_API const Trianglesclone (void) const
 Get a clone of this Triangles object.
virtual NVSG_API bool isDataShared (void) const
 Determine whether the data of this object is shared.
virtual NVSG_API DataID getDataID (void) const
 Get the DataID of the data of this object.
NVSG_API bool hasFaces (void) const
 Ask if this Triangles has faces.
NVSG_API size_t getNumberOfFaces (void) const
 Get number of faces.
NVSG_API const Face3getFaces (void) const
 Get constant pointer to faces.
NVSG_API void setFaces (const Face3 *pFaces, size_t numFaces)
 Set the faces for this Triangles.
NVSG_API void setFaces (size_t pos, const Face3 *pFaces, size_t numFaces)
 Set the faces for this Triangles.
virtual NVSG_API void calculateTangentSpace (size_t tu=0, size_t tg=1, size_t bn=2)
 Calculate tangents and binormals.

Static Public Member Functions

static NVSG_API const Trianglescreate (void)
 Create a Triangles.
static NVSG_API const TrianglescreateFromBase (const GeoSet &rhs)
 Create a Triangles by copying from a GeoSet.

Protected Member Functions

NVSG_API Triangles (void)
 Constructor.
NVSG_API Triangles (const GeoSet &rhs)
 Partial Constructor from a GeoSet.
NVSG_API Triangles (const Triangles &rhs)
 Copy Constructor.
virtual NVSG_API ~Triangles (void)
 Protected destructor to prevent explicit creation on stack.

Detailed Description

GeoSet for Triangles.

A Triangles is a GeoSet that holds an array of index-triplets. Each of these triplets describe a triangle with the indices pointing in the array of vertices. All vertex attributes (like normal, texture,...) are indexed with the same index.


Constructor & Destructor Documentation

NVSG_API nvsg::Triangles::Triangles void   )  [protected]
 

Constructor.

NVSG_API nvsg::Triangles::Triangles const GeoSet rhs  )  [protected]
 

Partial Constructor from a GeoSet.

NVSG_API nvsg::Triangles::Triangles const Triangles rhs  )  [protected]
 

Copy Constructor.

virtual NVSG_API nvsg::Triangles::~Triangles void   )  [protected, virtual]
 

Protected destructor to prevent explicit creation on stack.


Member Function Documentation

static NVSG_API const Triangles* nvsg::Triangles::create void   )  [static]
 

Create a Triangles.

Returns:
a constant pointer to a Triangles.

Reimplemented in nvsg::SkinnedTriangles.

static NVSG_API const Triangles* nvsg::Triangles::createFromBase const GeoSet rhs  )  [static]
 

Create a Triangles by copying from a GeoSet.

Returns:
a constant pointer to a Triangles.
Parameters:
rhs  GeoSet to copy from

virtual NVSG_API const Triangles* nvsg::Triangles::clone void   )  const [virtual]
 

Get a clone of this Triangles object.

Returns:
A constant pointer to a Triangles.

Implements nvsg::Drawable.

Reimplemented in nvsg::AnimatedTriangles, and nvsg::SkinnedTriangles.

virtual NVSG_API bool nvsg::Triangles::isDataShared void   )  const [virtual]
 

Determine whether the data of this object is shared.

Returns:
true if the object's data is shared, otherwise false.

Reimplemented from nvsg::GeoSet.

Reimplemented in nvsg::AnimatedTriangles, and nvsg::SkinnedTriangles.

virtual NVSG_API DataID nvsg::Triangles::getDataID void   )  const [virtual]
 

Get the DataID of the data of this object.

Returns:
DataID of the object's data.

Reimplemented from nvsg::GeoSet.

Reimplemented in nvsg::AnimatedTriangles, and nvsg::SkinnedTriangles.

bool nvsg::Triangles::hasFaces void   )  const [inline]
 

Ask if this Triangles has faces.

Returns:
true, if this Triangles has faces, otherwise false

size_t nvsg::Triangles::getNumberOfFaces void   )  const [inline]
 

Get number of faces.

Returns:
The number of faces

const Face3 * nvsg::Triangles::getFaces void   )  const [inline]
 

Get constant pointer to faces.

Returns:
A constant pointer to faces.

NVSG_API void nvsg::Triangles::setFaces const Face3 pFaces,
size_t  numFaces
 

Set the faces for this Triangles.

Copies numFaces faces from pFaces into this Triangles. Pre-existing faces will be entirely erased.

Parameters:
pFaces  faces to set
numFaces  number of faces

NVSG_API void nvsg::Triangles::setFaces size_t  pos,
const Face3 pFaces,
size_t  numFaces
 

Set the faces for this Triangles.

Copies numFaces faces from pFaces into this Triangles, startin at position pos inside the range of pre-existing faces.

Pre-existing faces in the range [pos, pos + numFaces) will be replaced. Pre-existing faces outside this range remain untouched.

If you specify -1 for pos or if pos specifies the number of faces currently stored, the faces pointed to by pFaces will be appended to the pre-existing faces.

If you not specify -1 for pos or pos neither specifies the number of faces currently stored nor does it specify a valid position inside the range of pre-existing faces, the behaviour is undefined!

Parameters:
pos  Start position inside the range of pre-existing faces
pFaces  faces to set
numFaces  number of faces

virtual NVSG_API void nvsg::Triangles::calculateTangentSpace size_t  tu = 0,
size_t  tg = 1,
size_t  bn = 2
[virtual]
 

Calculate tangents and binormals.

The two dimensional texture coordinates out of texture unit tu are used as the parameterization for the calculation. The tangents are written to texture unit tg and the binormals to texture unit bn.

Parameters:
tu  texture unit to get parameterizing coords
tg  texture unit to write tangents to
bn  texture unit to write binormals to

Implements nvsg::GeoSet.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:21:00 2005 for NVSGSDK by NVIDIA