7 #ifndef CAFU_MODEL_ANIM_POSE_HPP_INCLUDED
8 #define CAFU_MODEL_ANIM_POSE_HPP_INCLUDED
10 #include "AnimExpr.hpp"
11 #include "MaterialSystem/Mesh.hpp"
12 #include "Math3D/BoundingBox.hpp"
13 #include "Math3D/Matrix.hpp"
104 void Draw(
int SkinNr,
float LodDist)
const;
147 void SyncDimensions()
const;
148 void UpdateJointMatrices()
const;
149 void UpdateVertexPositions()
const;
150 void UpdateTangentSpaceHard(
unsigned long MeshNr)
const;
151 void UpdateTangentSpaceGlobal(
unsigned long MeshNr)
const;
152 void UpdateTangentSpaceSmGroups(
unsigned long MeshNr)
const;
153 void Recache()
const;
unsigned int TriNr
The number of the hit triangle in the hit mesh. Can be -1 (that is, larger then the number of triangl...
Definition: AnimPose.hpp:69
void Draw(int SkinNr, float LodDist) const
This method renders the model in this pose.
Definition: AnimPose.cpp:616
This class represents a native Cafu model.
Definition: Model_cmdl.hpp:45
IntrusivePtrT< AnimExpressionT > GetAnimExpr() const
Returns the current anim expression of this pose.
Definition: AnimPose.hpp:80
~AnimPoseT()
The destructor.
Definition: AnimPose.cpp:34
Vector3fT Normal
This is the normal vector of the hit surface.
Definition: AnimPose.hpp:66
TraceResultT(float Fraction_=0.0f)
The constructor.
Definition: AnimPose.hpp:63
Definition: AnimPose.hpp:42
Vector3fT Normal
The normal vector of this triangle, required for the shadow-silhouette determination.
Definition: AnimPose.hpp:44
void SetSuperPose(const AnimPoseT *SuperPose)
This method assigns a pose of a parent or "super" model that should be used when rendering this model...
Definition: AnimPose.cpp:604
const MaterialT * Material
The material at the point of impact. Can be NULL, e.g. when an edge (i.e. a bevel plane) was hit or t...
Definition: AnimPose.hpp:67
This class represents a surface material ("A datastructural representation of a scripts material def...
Definition: Material.hpp:22
Vector3fT BiNormal
The tangent-space binormal vector of this vertex.
Definition: AnimPose.hpp:52
The instances of this struct parallel and augment the CafuModelT::MeshT instances in the related Cafu...
Definition: AnimPose.hpp:40
float Fraction
The scalar along RayDir at which the hit occurred (RayOrigin + RayDir*Fraction).
Definition: AnimPose.hpp:65
unsigned int MeshNr
The number of the hit mesh. Can be -1 (that is, larger then the number of meshes in the model) if the...
Definition: AnimPose.hpp:68
AnimPoseT(const CafuModelT &Model, IntrusivePtrT< AnimExpressionT > AnimExpr)
The constructor.
Definition: AnimPose.cpp:17
Vector3fT Tangent
The tangent-space tangent vector of this vertex.
Definition: AnimPose.hpp:51
const ArrayT< MatSys::MeshT > & GetDrawMeshes() const
Returns the MatSys meshes for the model in this pose.
Definition: AnimPose.cpp:956
bool TraceRay(int SkinNr, const Vector3fT &RayOrigin, const Vector3fT &RayDir, TraceResultT &Result) const
Traces a ray against this model in this pose, and returns whether it was hit.
Definition: AnimPose.cpp:816
const ArrayT< MatrixT > & GetJointMatrices() const
Returns the set of transformation matrices (one per joint) at the given sequence and frame number...
Definition: AnimPose.cpp:928
unsigned int FindClosestVertex(unsigned int MeshNr, unsigned int TriNr, const Vector3fT &P) const
Considers the given triangle in the given mesh, and returns the vertex that the given point P is clos...
Definition: AnimPose.cpp:904
const BoundingBox3fT & GetBB() const
Returns the bounding-box for the model in this pose.
Definition: AnimPose.cpp:964
const MatrixT * GetJointMatrix(const std::string &JointName) const
Returns the transformation matrix for the joint with the given name, or NULL if there is no such join...
Definition: AnimPose.cpp:936
void SetNeedsRecache()
Call this if something in the related model has changed.
Definition: AnimPose.hpp:97
This class describes a specific pose of an associated model.
Definition: AnimPose.hpp:35
Definition: AnimPose.hpp:47
This class describes the result of tracing a ray or a bounding box against the model.
Definition: AnimPose.hpp:60
const ArrayT< MeshInfoT > & GetMeshInfos() const
Returns the mesh infos with additional data for each mesh in this pose.
Definition: AnimPose.cpp:948
Definition: Renderer.hpp:16
This class represents an axis-aligned bounding-box ("AABB") in 3-dimensional space.
Definition: BoundingBox.hpp:23
bool GetGuiPlane(unsigned int GFNr, Vector3fT &Origin, Vector3fT &AxisX, Vector3fT &AxisY) const
Returns the origin, x-axis and y-axis vectors for the given Gui fixture.
Definition: AnimPose.cpp:780
void SetAnimExpr(IntrusivePtrT< AnimExpressionT > AnimExpr)
Sets a new anim expression to use for this pose.
Definition: AnimPose.cpp:40
Vector3fT Pos
The spatial position of this vertex.
Definition: AnimPose.hpp:49
Vector3fT Normal
The tangent-space normal vector of this vertex.
Definition: AnimPose.hpp:50