- Cal3D 0.11 API Reference -

Public Member Functions

CalSharedDifferenceMap Class Reference

Inheritance diagram for CalSharedDifferenceMap:
cal3d::RefCounted

List of all members.

Public Member Functions

bool reserve (int blendVertexCount)
 Reserves memory for the blend vertices.
bool appendBlendVertex (int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
 Record one blend vertex.
bool getBlendVertex (int vertexId, CalCoreSubMorphTarget::BlendVertex &outVertex) const
 Retrieve one blend vertex.

Member Function Documentation

bool CalSharedDifferenceMap::appendBlendVertex ( int  vertexID,
const CalCoreSubMorphTarget::BlendVertex &  vertex 
)

Record one blend vertex.

This function adds a blend vertex to a sparse array. Vertices must be added in increasing order of ID.

Parameters:
vertexIdThe ID of the vertex.
vertexA blend vertex.
Returns:
One of the following values:
  • true if successful
  • false if an error happened
bool CalSharedDifferenceMap::getBlendVertex ( int  vertexId,
CalCoreSubMorphTarget::BlendVertex &  outVertex 
) const

Retrieve one blend vertex.

This function gets a blend vertex from the difference map if it is present.

If we were supporting random access, we would look up the vertex ID using binary search. But actually, the physique calls getBlendVertex sequentially, so we optimize for that access.

Parameters:
vertexIdThe ID of the vertex.
outVertexA blend vertex.
Returns:
One of the following values:
  • true if successful
  • false if the vertex is not present in the difference map
bool CalSharedDifferenceMap::reserve ( int  blendVertexCount)

Reserves memory for the blend vertices.

This function reserves memory for the blend vertices of the difference map.

Parameters:
blendVertexCountThe number of blend vertices that this difference map should be able to hold.
Returns:
One of the following values:
  • true if successful
  • false if an error happened

The documentation for this class was generated from the following files:

Generated by The Cal3D Team with Doxygen 1.7.3