Gorilla.HAnim.Joint
Unit Gorilla.HAnim.Joint.pasClasses
- TGorillaHAnimJoint = class ( TGorillaTransform )
TGorillaHAnimJoint
Ancestors
Members
Fields
- protected FSkinned :
Boolean
- protected FCtrlMat :
TMaterialSource
- protected FController :
TCube
- protected FJoints :
TGorillaHAnimJointList
- protected FLocalBindTransform :
TMatrix3D
- protected FInverseBindTransform :
TMatrix3D
- protected FCurrentOffsetMatrix :
TMatrix3D
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function GetHumanoid ( ) : TGorillaTransform ;
- protected function GetShowJoint ( ) : Boolean ;
- protected procedure SetShowJoint ( const AValue : Boolean ) ;
- protected procedure Render ( ) ; override;
- protected function GetIsSkeletonRoot ( ) : Boolean ;
- public function GetSkeletonTransformMatrix
(
)
: TMatrix3D
;
request the current transformation matrix to root node of skeleton
- public procedure SetLocalTransformMatrix ( const AMatrix : TMatrix3D ) ; override;
- public procedure SetLocalBindTransformMatrix ( const AMatrix : TMatrix3D ) ; virtual;
- public procedure CalculateInverseBindTransformMatrix ( const ACtrl : TControllerDef; const AParentBindTransform : TMatrix3D ) ;
- public procedure AddJoint
(
const
AJoint :
TGorillaHAnimJoint
)
;
NOTE: To support bind shape matrices we need this dirty hack if bind shape matrix is not identity, it means we have a bind shape transformation and we need to use binding transform instead of the given inverse bind matrix
- public function FindJoint ( const ADef : TJointDef ) : TGorillaHAnimJoint ;
- public procedure ClearJoints ( ) ;
- public procedure LoadFromDefinition ( const ADef : TJointDef ) ; overload virtual;
- public procedure PrepareSkinAnimation
(
)
;
Prepares every joint once for animation
- public procedure PrepareSkinAnimationStep
(
const
ASkeletonMatrix :
TMatrix3D
)
;
Preparation of every joint at any animation frame based on the submitted skeleton transformation matrix.
- public procedure ApplyJointInfoToHumanoid
(
const
ACtrl :
TControllerDef; const
AVertices :
TVertexJointsList
)
;
Setting up the TVertexJointsList, which contains information which joint affects which vertices. at first all shape vertices were added to that TVertexJointsList. and afterwards we iterate through all joints and check what vertices they affect
- public procedure DebugOut ( const ATab : string ) ;
Properties
- public Humanoid : TGorillaTransform
- public Joints : TObjectList<Gorilla.HAnim.Joint.TGorillaHAnimJoint>
- public Skinned : Boolean
- public IsSkeletonRoot : Boolean
- public Controller : TCube
Controller settings: a visualization of this hanim joint 1) controller cube 2) controller cube material 3) true = controller cube is visible
read FController - public ControllerMaterial : TMaterialSource
- public ShowJoint : Boolean
Should joints be displayed while rendering. Helpful for debugging problems with animations. Or for editing humanoid skeleton.
read GetShowJoint
write SetShowJoint - public LocalBindTransform : TMatrix3D
- public CurrentOffsetMatrix : TMatrix3D
At animation-time generated matrix which represents the offset between the current transformation and binding transformation
read FCurrentOffsetMatrix