Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound 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 Methods

virtual NVSG_API const Triangles * clone (void) const
 Get a clone of this Triangles object. More...

virtual NVSG_API bool isDataShared (void) const
 Determine whether the data of this object is shared. More...

virtual NVSG_API DataID getDataID (void) const
 Get the DataID of the data of this object. More...

NVSG_API bool hasFaces (void) const
 Ask if this Triangles has faces. More...

NVSG_API size_t getNumberOfFaces (void) const
 Get number of faces. More...

NVSG_API const Face3getFaces (void) const
 Get constant pointer to faces. More...

NVSG_API void setFaces (const Face3 *pFaces, size_t numFaces)
 Set the faces for this Triangles. More...

NVSG_API void setFaces (size_t pos, const Face3 *pFaces, size_t numFaces)
 Set the faces for this Triangles. More...

virtual NVSG_API void calculateTangentSpace (size_t tu=0, size_t tg=1, size_t bn=2)
 Calculate tangents and binormals. More...


Static Public Methods

NVSG_API const Triangles * create (void)
 Create a Triangles. More...

NVSG_API const Triangles * createFromBase (const GeoSet &rhs)
 Create a Triangles by copying from a GeoSet. More...


Protected Methods

NVSG_API Triangles (void)
 Constructor. More...

NVSG_API Triangles (const GeoSet &rhs)
 Partial Constructor from a GeoSet. More...

NVSG_API Triangles (const Triangles &rhs)
 Copy Constructor. More...

virtual NVSG_API ~Triangles (void)
 Protected destructor to prevent explicit creation on stack. More...


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

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

Create a Triangles.

Returns:
a constant pointer to a Triangles.

Reimplemented in nvsg::SkinnedTriangles.

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:20:35 2005 for NVSGSDK by NVIDIA