QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::Skin Struct Reference
[Geometric Objects]

A geometry for rendering skinned triangle meshes. More...

#include <Q/q.h>

Inheritance diagram for Q::Skin:

Q::Geom Q::Object Q::ObjectBase List of all members.

Public Member Functions

 Skin ()
 Skin (const char *name)
unsigned int jointCount () const
float weight (unsigned int wi, unsigned int ji) const
unsigned int vertexCount () const
unsigned int triangleCount () const
unsigned int wedgeCount () const
Utils::Result setWeight (unsigned int wi, unsigned int ji, float w)
TriangleIterator triangles ()
VertexIterator vertices ()
WedgeIterator wedges ()
Utils::Result setCollideable (bool b)

Static Public Member Functions

Skin create (const char *name, const Database &db=Database())
Skin find (const char *name)
ClassType classType ()
Skin cast (const ObjectBase &)

Detailed Description

A geometry for rendering skinned triangle meshes.

The Skin object is similar to Mesh in that it contains a set of vertices, wedges and triangles. The difference is that whereas Mesh is transformed rigidly by a single Group, the Skin object blends the transformations of a set of Group's. Each vertex in the skin can be affected by several transformations and each transform is weighted by a value between zero and one and the results summed to obtain the transformed position of the vertex.

The mapping between the skin and the list of groups (also called joints) is held (along with other geometry) within a Cluster.


Constructor & Destructor Documentation

Q::Skin::Skin  )  [inline]
 

Create a null skin reference.

Q::Skin::Skin const char *  name  ) 
 

Search the currently attached databases for a skin with the given name.


Member Function Documentation

Skin Q::Skin::cast const ObjectBase  )  [static]
 

If the object referenced by obj is a skin, then return a suitable Skin reference to the object.

Note:
Casting this object will cause it to be loaded from the database if it is not currently resident.

Reimplemented from Q::Geom.

ClassType Q::Skin::classType  )  [static]
 

Return the type for this class

Skin Q::Skin::create const char *  name,
const Database db = Database()
[static]
 

Create a new skin named name in the given database, db, (or the most recently attached read-write database if db is null). The values of the new object's visible, intersectable, collidee, collider, boundsEvent and lightable flags are set to true.

Skin Q::Skin::find const char *  name  )  [static]
 

Search the currently attached databases for a skin with the given name and return that object, if it exists.

unsigned int Q::Skin::jointCount  )  const
 

Return the number of joints used by the skin.

Utils::Result Q::Skin::setCollideable bool  b  ) 
 

Set the collidability properties (i.e. collidee and collider) of the skin based on the value of b.

Utils::Result Q::Skin::setWeight unsigned int  wi,
unsigned int  ji,
float  w
 

Set the weight of the joint with index ji for the wedge wi to the value w.

unsigned int Q::Skin::triangleCount  )  const
 

Return the number of triangles in the skin.

TriangleIterator Q::Skin::triangles  ) 
 

Return an iterator that can be used to examine and edit the triangles for a skin.

unsigned int Q::Skin::vertexCount  )  const
 

Return the number of vertices in the skin.

VertexIterator Q::Skin::vertices  ) 
 

Return an iterator that can be used to examine and edit the vertices for a skin.

unsigned int Q::Skin::wedgeCount  )  const
 

Return the number of wedges in the skin.

WedgeIterator Q::Skin::wedges  ) 
 

Return an iterator that can be used to examine and edit the wedges for a skin.

float Q::Skin::weight unsigned int  wi,
unsigned int  ji
const
 

Return the weighting of the joint with index ji for wedge wi in the skin.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004