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

nvsg::QuadStrips Class Reference

GeoSet defining quad strips. More...

#include <QuadStrips.h>

Inheritance diagram for nvsg::QuadStrips:

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

Collaboration graph
[legend]
List of all members.

Public Methods

virtual NVSG_API const QuadStrips * clone (void) const
 Get a clone of this QuadStrips 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 hasStrips (void) const
 Ask if this QuadStrips has strips. More...

NVSG_API size_t getNumberOfStrips (void) const
 Get the number of strips. More...

NVSG_API const IndexSetgetStrips () const
 Get constant pointer to strips. More...

NVSG_API void setStrips (const IndexSet *pStrips, size_t numStrips)
 Set the strips for this QuadStrip. More...

NVSG_API void setStrips (size_t pos, const IndexSet *pStrips, size_t numStrips)
 Set the strips for this QuadStrips. 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 QuadStrips * create (void)
 Create a QuadStrips. More...

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


Protected Methods

NVSG_API QuadStrips (void)
 Constructor. More...

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

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

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


Detailed Description

GeoSet defining quad strips.

A QuadStrips is a GeoSet that represents the vertex attributes of the GeoSet as quad strips. The strips are defined by a number of IndexSet elements. Each IndexSet is a std::vector<unsigned int> and represents one quad strip. If you have, for example, an array of eight vertices in the GeoSet, one possibility to make them a cube is, to define three IndexSet elements like that:

   set[0] = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1 };
   set[1] = { 1, 7, 3, 5 };
   set[2] = { 6, 0, 4, 2 };
The ordering ensures that the triangles are all drawn with the same orientation so that the triangle strip correctly form part of a surface. Preserving the orientation is important for some operations, such as culling. The number of vertices per IndexSet must be at least 4 for anything to be drawn.


Constructor & Destructor Documentation

NVSG_API nvsg::QuadStrips::QuadStrips void    [protected]
 

Constructor.

NVSG_API nvsg::QuadStrips::QuadStrips const GeoSet   rhs [protected]
 

Partial Constructor from a GeoSet.

NVSG_API nvsg::QuadStrips::QuadStrips const QuadStrips &    rhs [protected]
 

Copy Constructor.

virtual NVSG_API nvsg::QuadStrips::~QuadStrips void    [protected, virtual]
 

Protected destructor to prevent explicit creation on stack.


Member Function Documentation

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

Create a QuadStrips.

Returns:
a constant pointer to a QuadStrips.

NVSG_API const QuadStrips* nvsg::QuadStrips::createFromBase const GeoSet   rhs [static]
 

Create a QuadStrips by copying from a GeoSet.

Returns:
a constant pointer to a QuadStrips.

virtual NVSG_API const QuadStrips* nvsg::QuadStrips::clone void    const [virtual]
 

Get a clone of this QuadStrips object.

Returns:
a constant pointer to a QuadStrips.

Implements nvsg::Drawable.

virtual NVSG_API bool nvsg::QuadStrips::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.

virtual NVSG_API DataID nvsg::QuadStrips::getDataID void    const [virtual]
 

Get the DataID of the data of this object.

Returns:
DataID of the object's data.

Reimplemented from nvsg::GeoSet.

bool nvsg::QuadStrips::hasStrips void    const [inline]
 

Ask if this QuadStrips has strips.

Returns:
true, if this QuadStrips has strips, otherwise false

size_t nvsg::QuadStrips::getNumberOfStrips void    const [inline]
 

Get the number of strips.

Returns:
The number of strips

const IndexSet * nvsg::QuadStrips::getStrips   const [inline]
 

Get constant pointer to strips.

Returns:
A constant pointer to strips

NVSG_API void nvsg::QuadStrips::setStrips const IndexSet   pStrips,
size_t    numStrips
 

Set the strips for this QuadStrip.

Copies numStrips strips from pStrips into this QuadStrips.

Parameters:
pStrips  strips to set
numStrips  number of strips

NVSG_API void nvsg::QuadStrips::setStrips size_t    pos,
const IndexSet   pStrips,
size_t    numStrips
 

Set the strips for this QuadStrips.

Copies numStrips strips from pStrips into this QuadStrips, starting at position pos inside the range of pre-existing strips.

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

If you specify -1 for pos or if pos specifies the number of strips currently stored, the strips pointed to by pStrips 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 strips, the behaviour is undefined!

Parameters:
pos  Start position inside the range of pre-existing strips
pStrips  strips to set
numStrips  number of strips

virtual NVSG_API void nvsg::QuadStrips::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:31 2005 for NVSGSDK by NVIDIA