FCDGeometryPolygonsInput Class Reference
[COLLADA Document Geometry Entity]

An input data source for one mesh polygons set. More...

#include <FCDGeometryPolygonsInput.h>

Inheritance diagram for FCDGeometryPolygonsInput:

FCDObject FUTracker FUParameterizable FUTrackable FUObject List of all members.

Public Member Functions

 FCDGeometryPolygonsInput (FCDocument *document, FCDGeometryPolygons *parent)
 Constructor.
 ~FCDGeometryPolygonsInput ()
 Destructor.
FUDaeGeometryInput::Semantic GetSemantic () const
 Retrieves the type of data to input.
FCDGeometrySourceGetSource ()
 Retrieves the data source references by this polygon set input.
const FCDGeometrySourceGetSource () const
 See above.
void SetSource (FCDGeometrySource *source)
 Sets the data source referenced by this polygon set input.
void SetOffset (uint32 _offset)
 Retrieves the offset within the interlaced COLLADA indices for this input's indices.
uint32 GetOffset () const
 Retrieves the offset within the interlaced COLLADA indices for this input's indices.
int32 GetSet () const
 Retrieves the input set.
void SetSet (int32 _set)
 Sets the input set.
bool OwnsIndices () const
 Checks whether this polygon set input owns the local indices for its offset.
void SetIndices (const uint32 *indices, size_t count)
 Sets the local indices for the input's offset.
void SetIndexCount (size_t count)
 Sets the number of indices in this input's index list.
void ReserveIndexCount (size_t count)
 Reserves memory for a given number of indices.
void AddIndex (uint32 index)
 Adds an index to the indices of this input.
void AddIndices (const UInt32List &indices)
 Adds a batch of indices to the end of the index list of this input.
uint32 * GetIndices ()
 Retrieves the list of indices for this input.
const uint32 * GetIndices () const
 See above.
size_t GetIndexCount () const
 Retrieves the number of indices for this input.

Detailed Description

An input data source for one mesh polygons set.

This structure knows the type of input data in the data source as well as the set and offset for the data. It also contains a pointer to the mesh data source.

Many polygon set inputs may have the same offset (or 'idx' in older versions) when multiple data sources are compressed together within the COLLADA document. In this case, one and only one of the polygon set input should contain indices. To find the indices of any polygon set input, it is recommended that you use the FCDGeometryPolygons::FindIndicesForIdx function.


Constructor & Destructor Documentation

FCDGeometryPolygonsInput::FCDGeometryPolygonsInput FCDocument document,
FCDGeometryPolygons parent
 

Constructor.

Parameters:
parent The polygons sets that contains the input.
offset The offset for the indices of this input within the interlaced tesselation information.


Member Function Documentation

void FCDGeometryPolygonsInput::AddIndex uint32  index  ) 
 

Adds an index to the indices of this input.

Be careful when adding indices directly to multiple inputs: if multiple inputs share an index list, you may be adding unwanted indices.

Parameters:
index The index to add.

void FCDGeometryPolygonsInput::AddIndices const UInt32List indices  ) 
 

Adds a batch of indices to the end of the index list of this input.

Be careful when adding indices directly to multiple inputs: if multiple inputs share an index list, you may be adding unwanted indices.

Parameters:
indices The indices to add.

size_t FCDGeometryPolygonsInput::GetIndexCount  )  const
 

Retrieves the number of indices for this input.

Returns:
The number of indices for this input.

uint32* FCDGeometryPolygonsInput::GetIndices  )  [inline]
 

Retrieves the list of indices for this input.

Returns:
The list of indices for this input.

uint32 FCDGeometryPolygonsInput::GetOffset  )  const [inline]
 

Retrieves the offset within the interlaced COLLADA indices for this input's indices.

Returns:
The interlaced indices offset.

FUDaeGeometryInput::Semantic FCDGeometryPolygonsInput::GetSemantic  )  const
 

Retrieves the type of data to input.

FCollada doesn't support data sources which are interpreted differently depending on the input. Therefore, this information is retrieved from the source.

Returns:
The source data type.

int32 FCDGeometryPolygonsInput::GetSet  )  const [inline]
 

Retrieves the input set.

The input set is used to group together the texture coordinates with the texture tangents and binormals. In ColladaMax, this value should also represent the map channel index for texture coordinates and vertex color channels.

Returns:
The input set.

FCDGeometrySource* FCDGeometryPolygonsInput::GetSource  )  [inline]
 

Retrieves the data source references by this polygon set input.

This is the data source into which the indices are indexing. You need to take the data source stride into consideration when un-indexing the data.

Returns:
The data source.

bool FCDGeometryPolygonsInput::OwnsIndices  )  const [inline]
 

Checks whether this polygon set input owns the local indices for its offset.

Since an offset may be shared, only one polygon set input will own the local indices.

Returns:
Whether this polygon set owns the local indices.

void FCDGeometryPolygonsInput::ReserveIndexCount size_t  count  ) 
 

Reserves memory for a given number of indices.

This is useful for performance reasons, since AddIndex can be extremely costly otherwise.

Parameters:
count The total number of indices to prepare memory for.

void FCDGeometryPolygonsInput::SetIndexCount size_t  count  ) 
 

Sets the number of indices in this input's index list.

Any additional indices allocated will not be initialized.

Parameters:
count The number of indices in this input's index list.

void FCDGeometryPolygonsInput::SetIndices const uint32 *  indices,
size_t  count
 

Sets the local indices for the input's offset.

This function may fail if another input already owns the indices for this offset.

Parameters:
indices A static list of indices.
count The number of indices in the given list.

void FCDGeometryPolygonsInput::SetOffset uint32  _offset  )  [inline]
 

Retrieves the offset within the interlaced COLLADA indices for this input's indices.

Changing this value after the input's construction is not recommended.

Parameters:
_offset The offset within the interlaced COLLADA indices for this input's indices.

void FCDGeometryPolygonsInput::SetSet int32  _set  )  [inline]
 

Sets the input set.

The input set is used to group together the texture coordinates with the texture tangents and binormals. In ColladaMax, this value should also represent the map channel index for texture coordinates and vertex color channels.

Parameters:
_set The new input set. If the given value is -1, this input does not belong to any set.

void FCDGeometryPolygonsInput::SetSource FCDGeometrySource source  ) 
 

Sets the data source referenced by this polygon set input.

Parameters:
source The data source referenced by the input indices.


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 16:58:38 2008 for FCollada by  doxygen 1.4.6-NO