-
Notifications
You must be signed in to change notification settings - Fork 0
Saf2
askalski edited this page Dec 14, 2012
·
7 revisions
.saf file contains contains a single instance of SAFFile.
SAFFile
{
Header header;
Skeleton skeleton;
}
Header
{
uint Signature; // = '2FAS'
}
Skeleton
{
uint NumJoints;
uint NumAnimations;
uint SkeletonID; // it is mapped to name in 'i2n' file
SkeletonJoint Joints[NumJoints];
SkeletalAnimation Animations[NumAnimations];
}
SkeletonJoint
{
uint ParentIndex; // equals -1u (2^32 - 1 = 0xFFFFFFFF) if the joint is a root node of skeleton
RTf BindPose;
}
SkeletalAnimation
{
SkeletonJointKeyframeSequence KeyframeSequences[NumKeyframeSequences]; // NumKeyframeSequences number of joints (should equal to NumJoints)
}
SkeletonJointKeyframeSequence
{
uint NumFrames;
SkeletonJointKeyframe Frames[NumFrames];
}
SkeletonJointKeyframe
{
float BeginTime; // Begin time of a frame in seconds
RTf Pose;
}
RTf
{
quaternionf Rotation;
vector3f Translation;
}
quaternionf
{
float w, x, y, z;
}