- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalSharedDifferenceMap Class Reference
Inheritance diagram for CalSharedDifferenceMap:
cal3d::RefCounted

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.
 
- Public Member Functions inherited from cal3d::RefCounted
int getRefCount () const
 

Additional Inherited Members

- Protected Member Functions inherited from cal3d::RefCounted
virtual ~RefCounted ()
 Protected so users of refcounted classes don't use std::auto_ptr or the delete operator.
 

Member Function Documentation

◆ appendBlendVertex()

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

◆ getBlendVertex()

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

◆ reserve()

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.10.0