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

sglTexCoords Class Reference

#include <sglTexCoords.hpp>

List of all members.

Public Types

typedef const char* iterator

Public Methods

 sglTexCoords (float *tex_coords, unsigned int size=2)
 sglTexCoords (sglDataPtr *data=NULL, sglDataPtr::DataTypeEnum type=sglDataPtr::eFLOAT, int size=2, int offset=0, int stride=0)
 ~sglTexCoords ()
 sglTexCoords (const sglTexCoords &rhs)
sglTexCoords& operator= (const sglTexCoords &rhs)
void set (sglDataPtr *data, sglDataPtr::DataTypeEnum type=sglDataPtr::eFLOAT, int size=2, int offset=0, int stride=0)
sglDataPtrgetDataPtr () const
sglDataPtr::DataTypeEnum getType () const
int getNumDimensions () const
int getOffset () const
int getStride () const
void apply (unsigned int index) const
void applyMulti (GLenum unit, unsigned int index) const
bool isValid () const
int getInc () const
int getSize () const
sglDataPtr::DataTypeEnum getDataType () const
int getTypeIndex () const
iterator begin () const
void printInfo (ostream &ostrm, const char *indent_string) const

Static Public Methods

void applySet (const vector< sglTexCoords > &tc, unsigned int index, GLenum max)
void applyArraySet (const vector< sglTexCoords > &tc)
void applyArraySetMulti (const vector< sglTexCoords > &tc)


Detailed Description

The sglTexCoords class is a container for texture coordinate data. The texture coordinates define which texel in the texture is applied to each vertex. This class allows for 1, 2, 3, or 4 dimensional texture coordinates (for use with 1, 2, or 3 dimensional textures).

Definition at line 36 of file sglTexCoords.hpp.


Constructor & Destructor Documentation

sglTexCoords::sglTexCoords ( float * tex_coords,
unsigned int size = 2 ) [inline]
 

Constructor.

Parameters:
tex_coords   pointer to an array of floating point texture coords
size   the number of floats per coordinate [1..4]

Definition at line 46 of file sglTexCoords.hpp.

sglTexCoords::sglTexCoords ( sglDataPtr * data = NULL,
sglDataPtr::DataTypeEnum type = sglDataPtr::eFLOAT,
int size = 2,
int offset = 0,
int stride = 0 ) [inline]
 

Constructor.

Parameters:
data   Pointer to the list of texture coordinates.
type   Data type of texture coords [eSHORT, eINT, eFLOAT, eDOUBLE].
size   Number of values per coordinate [1,2,3,4].
offset   Number of bytes in the array before the first coordinate.
stride   Number of bytes from the start of one coordinate to the start of the next coordinate. If zero, the coordinates are assumed to be tightly packed (i.e. stride == size * sizeof(type)). Stride must be non-negative.

Definition at line 61 of file sglTexCoords.hpp.

sglTexCoords::~sglTexCoords ( ) [inline]
 

Destructor.

Definition at line 70 of file sglTexCoords.hpp.

sglTexCoords::sglTexCoords ( const sglTexCoords & rhs ) [inline]
 

Copy Constructor

Definition at line 73 of file sglTexCoords.hpp.


Member Function Documentation

sglTexCoords & sglTexCoords::operator= ( const sglTexCoords & rhs )
 

Assignment Operator

void sglTexCoords::set ( sglDataPtr * data,
sglDataPtr::DataTypeEnum type = sglDataPtr::eFLOAT,
int size = 2,
int offset = 0,
int stride = 0 )
 

Set the texture coordinate parameters.

Parameters:
data   Pointer to the list of texture coordinates.
type   Data type of texture coords [eSHORT, eINT, eFLOAT, eDOUBLE].
size   Number of values per coordinate [1,2,3,4].
offset   Number of bytes in the array before the first coordinate.
stride   Number of bytes from the start of one coordinate to the start of the next coordinate. If zero, the coordinates are assumed to be tightly packed (i.e. stride == size * sizeof(type)). Stride must be non-negative.

Referenced by sglTexCoords().

sglDataPtr * sglTexCoords::getDataPtr ( ) const [inline]
 

Get the texture coordinate values.

Returns:
pointer to an array of texture coords

Definition at line 103 of file sglTexCoords.hpp.

sglDataPtr::DataTypeEnum sglTexCoords::getType ( ) const [inline]
 

Get the data type of the texture coordinate values.

Returns:
data type of the texture coordinate values

Definition at line 108 of file sglTexCoords.hpp.

int sglTexCoords::getNumDimensions ( ) const [inline]
 

Get the number of dimensions.

Returns:
the number of values per coordinate

Definition at line 113 of file sglTexCoords.hpp.

int sglTexCoords::getOffset ( ) const [inline]
 

Get the offset between the start of the data pointer and the start of the texture coordinate values.

Returns:
Number of bytes in the array before the first texture coordinate

Definition at line 119 of file sglTexCoords.hpp.

int sglTexCoords::getStride ( ) const [inline]
 

Get the number of bytes from the start of one color to the start of the next color.

Returns:
the number of bytes from the start of one color to the start of the next color.

Definition at line 127 of file sglTexCoords.hpp.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:10 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001