AlVertexDataList
Interface to Alias polyset STs and Normals.
Synopsis
#include <AlVertexDataList.h>
class AlVertexDataList
AlVertexDataList( AlPolyset *pset );
~AlVertexDataList();
int STListSize();
int normalListSize();
boolean STByIndex( int index, float &s, float &t );
boolean normalByIndex( int index, float &x, float &y, float &z );
int vertexNormalIndex( int polygon, int vertex );
int vertexSTIndex( int polygon, int vertex );
Description
AlVertexDataList is an optional additional interface to Alias's per-vertex-per-poly ST and Normal data. It provides an output only format for this data similar to that used by Wavefront's .obj file format.
The user can use this class to obtain a list of STs and Normals used by the polyset, and also may find out which normals or STs are used by each polygon in the polyset as an index into this shared table.
Note that this data is read-only, and is NOT automatically updated if the source polyset is changed.
Summary
AlVertexDataList::AlVertexDataList( AlPolyset *pset )
Description
This method creates an AlVertexData item that may be used to easily extract vertex ST and Normal sharing information from a polyset. Note that updates to the passed polyset will NOT be reflected in the AlVertexDataList structure, as this item works with a "snapshot" of the polyset taken at creation time.
Return codes
None.
AlVertexDataList::~AlVertexDataList()
Description
Frees a vertex data list.
int AlVertexDataList::STListSize()
Description
Returns the number of ST pairs in the ST data list.
-1 is returned if the VertexDataList is invalid.
int AlVertexDataList::normalListSize()
Description
Returns the number of normals in the normal data list.
-1 is returned if the VertexDataList is invalid.
boolean AlVertexDataList::STByIndex( int index, float &s, float &t )
Description
Retrieves the ST coordinates for a given index
Arguments
index - the index of the vertex
s,t - the variables to return the values in
Return codes
TRUE - worked
FALSE - didn't work
boolean AlVertexDataList::normalByIndex( int index, float &x, float &y, float &z )
Description
Retrieves the normal for a given index
Arguments
index - the index of the vertex
x,y,z - the returned normal
Return codes
TRUE - worked
FALSE - didn't work
int AlVertexDataList::vertexNormalIndex( int polygon, int vertex )
Description
Retrieves the index of the normal for a vertex in a polygon
Arguments
polygon - index of the polygon
vertex - index of the vertex
Return codes
-1 if the polygon or vertex are out of range
int AlVertexDataList::vertexSTIndex( int polygon, int vertex )
Description
Retrieves the index of the ST pair for a vertex in a polygon
Arguments
polygon - index of the polygon
vertex - index of the vertex
Return codes
-1 if the polygon or vertex are out of range
aliasdocs@aw.sgi.com
Copyright © 1996, Alias|Wavefront, a Silicon Graphics Company. All rights
reserved.