Rasterfarm-SDK
Loading...
Searching...
No Matches
Shape::Skeletal Class Reference

#include <skeletal.h>

Inheritance diagram for Shape::Skeletal:
Shape::Geometry Mesh::TriangleMesh DynamicType Tree::CubeTree Engine::Raster::Skeletal

Classes

struct  Bone
 

Public Types

typedef uint BoneIndex
 
typedef List< BoneIndexBoneIndexList
 
typedef HeapArray< BoneBoneArray
 
- Public Types inherited from Mesh::TriangleMesh
typedef HeapArray< HalfEdgeIndexArrayHalfEdgeIndexTable
 

Public Member Functions

 Skeletal (const Attribute &attribute)
 
virtual void clear ()
 
virtual void flagDirty ()
 
virtual Primitive3D::TriangleArray createTriangles (const Matrix4f &mat=Matrix4f::identity)
 
virtual float getBoundingRadius (const Matrix3f &matrix=Matrix3f::identity)
 
virtual Primitive3D::AABoundingBox getAABoundingBox (const Matrix4f &matrix=Matrix4f::identity)
 
Matrix4f getBlendedJoint (Mesh::VertexIndex index)
 
BoneArray createBones (bool jointTranslated, const Matrix4f &mat=Matrix4f::identity)
 
bool areBonesUpdated ()
 
const BoneArraygetBone ()
 
void associateBones (Mesh::TriangleIndex iT, const BoneIndexList &list)
 
Primitive3D::TriangleArray createTrianglesForBone (uint index, const Matrix4f &mat=Matrix4f::identity)
 
void setJoint (const HeapArray< Matrix4f > &mat)
 
const Vector4iArraygetBlendIndexArray ()
 
const Vector4fArraygetBlendWeightArray ()
 
Mesh::TriangleIndexSet getTrianglesForBone (uint index)
 
Mesh::VertexIndexSet getVerticesForBone (uint index)
 
Mesh::FaceIndexSet getFacesForBone (uint index)
 
HeapArray< Matrix4f > & getJoint ()
 
- Public Member Functions inherited from Shape::Geometry
 Geometry (const TriangleMesh &mesh, const Attribute &attribute)
 
 Geometry (const Attribute &attribute)
 
void operator+= (const TriangleMesh &other)
 
virtual ~Geometry ()
 
virtual Vertex3fArray createVertexArray ()
 
virtual Mesh::VertexIndexArray createIndexArray ()
 
virtual Vector3fArray createNormalArray ()
 
void update ()
 
const AttributegetAttribute () const
 
DrawPrimitive getDrawPrimitive ()
 
void setDrawPrimitive (DrawPrimitive drawPrimitive)
 
String verticesToCArray ()
 
String indicesToCArray ()
 
Primitive3D::Capsule createCapsule (const Matrix4f &mat=Matrix4f::identity)
 
Vertex3f getFaceNormal (Mesh::FaceIndex index)
 
Vertex3f getFaceCentroid (Mesh::FaceIndex index)
 
void transformFaces (const Matrix4f &mat)
 
void rotateFaces (float angle, const Vector3f &vec)
 
void translateFaces (const Vector3f &vec)
 
void scaleFaces (float scale)
 
void scaleFaces (const Vector3f &vec)
 
void clampMaxFaces (const Vector3f &vec)
 
void clampMinFaces (const Vector3f &vec)
 
void transformFace (const Matrix4f &mat, Mesh::FaceIndex iFace)
 
void rotateFace (float angle, const Vector3f &vec, Mesh::FaceIndex iFace)
 
void translateFace (const Vector3f &vec, Mesh::FaceIndex iFace)
 
void scaleFace (float scale, Mesh::FaceIndex iFace)
 
void scaleFace (const Vector3f &vec, Mesh::FaceIndex iFace)
 
void clampMaxFace (const Vector3f &vec, Mesh::FaceIndex iFace)
 
void clampMinFace (const Vector3f &vec, Mesh::FaceIndex iFace)
 
const Vertex3fgetVertex (uint index) const
 
Primitive3D::Triangle getPrimitiveTriangle (uint index) const
 
void setBoundingRadius (float radius)
 
bool isAABoundingBoxUpdated ()
 
void normalize ()
 
void extrudeAndVolumizeFace (Mesh::FaceIndex index, float distance)
 
- Public Member Functions inherited from Mesh::TriangleMesh
 TriangleMesh ()
 
 TriangleMesh (const Vertex3fArray &vertex)
 
 TriangleMesh (const TriangleMesh &other)
 
void operator+= (const TriangleMesh &other)
 
 ~TriangleMesh ()
 
void clear ()
 
VertexIndex addVertex (const Vertex3f &vertex)
 
VertexIndexArray addVertexArray (const Vertex3fArray &array)
 
VertexIndexSet getFaceVertexIndices (const FaceIndex fI) const
 
VertexIndexSet getFaceVertexIndices (const Face &face) const
 
VertexIndexArray getFaceContour (FaceIndex fI) const
 
FaceIndex findFace (const VertexIndexArray &array) const
 
Vertex3f getFaceNormal (const Face &face) const
 
Vertex3f getFaceNormal (FaceIndex fI) const
 
TriangleIndex findTriangle (const Triangle &triangle) const
 
bool hasTriangle (VertexIndex vA, VertexIndex vB, VertexIndex vC) const
 
TriangleIndex addTriangle (VertexIndex iA, VertexIndex iB, VertexIndex iC, FaceIndex iF)
 
TriangleIndex addTriangle (const Triangle &t, FaceIndex iF)
 
TriangleIndex addTriangle (const Triangle &triangle)
 
FaceIndexArray findFaces (const Triangle &triangle)
 
void removeTriangle (TriangleIndex index)
 
HalfEdgeIndex addHalfEdge (const HalfEdge &halfEdge)
 
void removeHalfEdge (const HalfEdgeIndex halfEdgeIndex)
 
const HalfEdgeArraygetHalfEdge () const
 
const TriangleArraygetTriangle () const
 
const FaceArraygetFace () const
 
FacegetFace (uint index)
 
Vertex3fArray createContour (const FaceIndex fI) const
 
HalfEdgeArray getFaceHalfEdges (const FaceIndex fI) const
 
HalfEdgeIndexArray getFaceHalfEdgeIndices (const FaceIndex fI) const
 
const HalfEdgegetHalfEdge (const VertexIndex a, const VertexIndex b) const
 
HalfEdgeIndex getHalfEdgeIndex (const VertexIndex a, const VertexIndex b) const
 
const HalfEdgeIndexTablegetHalfEdgeIndexTable () const
 
bool isHalfEdge (const VertexIndex a, const VertexIndex b) const
 
bool isHalfEdge (HalfEdgeIndex index) const
 
bool isFullEdge (const VertexIndex a, const VertexIndex b) const
 
bool isFullEdge (HalfEdgeIndex index) const
 
FaceIndex addFace (const Face &face=Face())
 
void removeFace (FaceIndex faceIndex)
 
VertexIndexArray shortestPath (Mesh::VertexIndex startVertexIndex, Mesh::VertexIndex endVertexIndex)
 
Primitive3D::Triangle createPrimitveTriangle (const Triangle &triangle) const
 
Primitive3D::Triangle createPrimitveTriangle (const TriangleIndex index) const
 
Primitive3D::Segment createPrimitveSegment (const HalfEdge &he) const
 
Primitive3D::Segment createPrimitveSegment (const HalfEdgeIndex index) const
 
- Public Member Functions inherited from Tree::CubeTree
 CubeTree ()
 
 CubeTree (const Vertex3fArray &vertex)
 
 CubeTree (const CubeTree &)
 
virtual ~CubeTree ()
 
bool hasDuplicates ()
 
 operator const Branch & () const
 
 operator const Branch * () const
 
 operator HeapArray< Leaf * > ()
 
bool operator() (const Vertex3f &vA, const Vertex3f &vB) const
 
Leafnearest (const Vertex3f &vertex)
 
Leaffind (const Vertex3f &vertex, float precision=0.0f) const
 
void erase (Leaf *pLeaf)
 
void update (Handle index, const Vertex3f &vertex)
 
void update ()
 
Handle insert (const Vertex3f &vertex)
 
HeapArray< Handle > insert (const Vector3fArray &list)
 
template<typename INDICES >
Vector3fArray getVertices (const INDICES &c) const
 
Vector3fArray getVertices (bool unique=false) const
 
HeapArray< Leaf * > getLeaves () const
 
const Leafoperator[] (Handle index) const
 
Handle operator[] (const Vertex3f &v) const
 
const Vertex3fback () const
 
const Vertex3ffront () const
 
HeapArray< Leaf * >::iterator begin ()
 
HeapArray< Leaf * >::iterator end ()
 
HeapArray< Leaf * >::const_iterator begin () const
 
HeapArray< Leaf * >::const_iterator end () const
 
size_t size () const
 
void clear ()
 
- Public Member Functions inherited from DynamicType
 DynamicType ()
 
template<class C >
void addType ()
 
TypeID getDerivedTypeId () const
 
template<class C >
const bool isType () const
 
template<class C >
const C * cast () const
 
template<class C >
C * cast ()
 
template<class FROM , class TO >
TO * cast ()
 
template<class FROM , class TO >
const TO * cast () const
 

Public Attributes

Vector4iArray jointIndex
 
Vector4fArray jointWeight
 
- Public Attributes inherited from Mesh::TriangleMesh
bool planar
 
float boundingRadius
 

Protected Attributes

HeapArray< Bonebone
 
HeapArray< Matrix4fjoint
 
HeapArray< Primitive3D::AABoundingBox > aaBox
 
bool bonesUpdated
 
- Protected Attributes inherited from Shape::Geometry
Attribute attribute
 
bool cubeTreeUpdated
 
- Protected Attributes inherited from Mesh::TriangleMesh
HalfEdgeIndexTable halfEdgeIndexTable
 
HalfEdgeArray halfEdge
 
TriangleArray triangle
 
FaceArray face
 

Friends

class IQMFactory
 

Additional Inherited Members

- Static Public Member Functions inherited from Mesh::TriangleMesh
static bool isHalfEdge (const VertexIndex a, const VertexIndex b, const HalfEdgeIndexTable &table)
 
static bool isHalfEdge (const HalfEdge he, const HalfEdgeIndexTable &table)
 
static bool isFullEdge (const VertexIndex a, const VertexIndex b, const HalfEdgeIndexTable &table)
 
static bool isFullEdge (const HalfEdge he, const HalfEdgeIndexTable &table)
 
static HalfEdgeIndex getHalfEdgeIndex (const VertexIndex a, const VertexIndex b, const HalfEdgeIndexTable &table)
 

Member Typedef Documentation

◆ BoneArray

typedef HeapArray< Bone > Shape::Skeletal::BoneArray

◆ BoneIndex

◆ BoneIndexList

Constructor & Destructor Documentation

◆ Skeletal()

Shape::Skeletal::Skeletal ( const Attribute & attribute)

Member Function Documentation

◆ areBonesUpdated()

bool Shape::Skeletal::areBonesUpdated ( )
inline

◆ associateBones()

void Shape::Skeletal::associateBones ( Mesh::TriangleIndex iT,
const BoneIndexList & list )
Parameters
Theindex for the triangle to associate.
TheBone indices associated with this triangle.

◆ clear()

virtual void Shape::Skeletal::clear ( )
virtual

Reimplemented from Shape::Geometry.

◆ createBones()

BoneArray Shape::Skeletal::createBones ( bool jointTranslated,
const Matrix4f & mat = Matrix4f::identity )

◆ createTriangles()

virtual Primitive3D::TriangleArray Shape::Skeletal::createTriangles ( const Matrix4f & mat = Matrix4f::identity)
virtual

Transformed set of triangles.

Reimplemented from Shape::Geometry.

◆ createTrianglesForBone()

Primitive3D::TriangleArray Shape::Skeletal::createTrianglesForBone ( uint index,
const Matrix4f & mat = Matrix4f::identity )
Parameters
Theindex of the Bone in which all Triangles are encapsulated.

◆ flagDirty()

virtual void Shape::Skeletal::flagDirty ( )
virtual

Reimplemented from Shape::Geometry.

◆ getAABoundingBox()

virtual Primitive3D::AABoundingBox Shape::Skeletal::getAABoundingBox ( const Matrix4f & matrix = Matrix4f::identity)
virtual

Get axis-aligned bounding-box.

Reimplemented from Shape::Geometry.

◆ getBlendedJoint()

Matrix4f Shape::Skeletal::getBlendedJoint ( Mesh::VertexIndex index)
Parameters
Indexof the vertex.

◆ getBlendIndexArray()

const Vector4iArray & Shape::Skeletal::getBlendIndexArray ( )
inline

◆ getBlendWeightArray()

const Vector4fArray & Shape::Skeletal::getBlendWeightArray ( )
inline

◆ getBone()

const BoneArray & Shape::Skeletal::getBone ( )
inline

◆ getBoundingRadius()

virtual float Shape::Skeletal::getBoundingRadius ( const Matrix3f & matrix = Matrix3f::identity)
virtual

This method assumes the mesh vertices are normalized about the origin.

Reimplemented from Shape::Geometry.

◆ getFacesForBone()

Mesh::FaceIndexSet Shape::Skeletal::getFacesForBone ( uint index)

◆ getJoint()

HeapArray< Matrix4f > & Shape::Skeletal::getJoint ( )
inline

◆ getTrianglesForBone()

Mesh::TriangleIndexSet Shape::Skeletal::getTrianglesForBone ( uint index)

◆ getVerticesForBone()

Mesh::VertexIndexSet Shape::Skeletal::getVerticesForBone ( uint index)

◆ setJoint()

void Shape::Skeletal::setJoint ( const HeapArray< Matrix4f > & mat)

Friends And Related Symbol Documentation

◆ IQMFactory

friend class IQMFactory
friend

Member Data Documentation

◆ aaBox

HeapArray< Primitive3D::AABoundingBox > Shape::Skeletal::aaBox
protected

◆ bone

HeapArray< Bone > Shape::Skeletal::bone
protected

◆ bonesUpdated

bool Shape::Skeletal::bonesUpdated
protected

◆ joint

HeapArray< Matrix4f > Shape::Skeletal::joint
protected

The 'Joint' is position(row-4) of the bone-transform where-by rotations are made-about(3x3)

◆ jointIndex

Vector4iArray Shape::Skeletal::jointIndex

This array contains indices for the joints to create a blended-transform for each vertex. Currently, up-to 4 joints can be blended.

◆ jointWeight

Vector4fArray Shape::Skeletal::jointWeight

The % weight to blend a joint transform for each vertex.


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