71 static unsigned int const keyframeBitsPerOriComponent;
72 static unsigned int const keyframeBitsPerTime;
74 static unsigned int const keyframeBitsPerUnsignedPosComponent;
75 static unsigned int const keyframeBitsPerPosPadding;
76 static float const keyframePosRange;
77 static unsigned int const keyframePosBytes;
79 static unsigned int const keyframeBitsPerUnsignedPosComponentSmall;
80 static unsigned int const keyframeBitsPerPosPaddingSmall;
81 static float const keyframePosRangeSmall;
82 static unsigned int const keyframePosBytesSmall;
85 static CalCoreMeshPtr loadCoreMesh(
const std::string& strFilename);
97 static CalCoreAnimatedMorph *loadCoreAnimatedMorphFromBuffer(
void* inputBuffer,
unsigned int len);
108 static void setLoadingMode(
int flags);
109 static void setAnimationCollapseSequencesOn(
bool p );
110 static void setAnimationLoadingCompressionOn(
bool p );
111 static void setAnimationTranslationTolerance(
double p );
112 static void setAnimationRotationToleranceDegrees(
double p );
114 static bool getAnimationLoadingCompressionOn() {
return loadingCompressionOn; }
117 static double getAnimationTranslationTolerance() {
return translationTolerance; }
118 static double getAnimationRotationToleranceDegrees() {
return rotationToleranceDegrees; }
119 static int getAnimationNumEliminatedKeyframes() {
return numEliminatedKeyframes; }
120 static int getAnimationNumKeptKeyframes() {
return numKeptKeyframes; }
121 static int getAnimationNumRoundedKeyframes() {
return numRoundedKeyframes; }
122 static int getAnimationNumCompressedAnimations() {
return numCompressedAnimations; }
123 static void addAnimationCompressionStatistic(
int totalKeyframes,
int eliminatedKeyframes,
int numRounded ) {
124 numEliminatedKeyframes += eliminatedKeyframes;
125 numKeptKeyframes += totalKeyframes - eliminatedKeyframes;
126 numRoundedKeyframes += numRounded;
127 numCompressedAnimations++;
129 static void resetCompressionStatistics() {
130 numEliminatedKeyframes = 0;
131 numKeptKeyframes = 0;
132 numCompressedAnimations = 0;
134 static bool usesAnimationCompression(
int version );
135 static unsigned int compressedKeyframeRequiredBytes(
CalCoreKeyframe * lastCoreKeyframe,
bool translationRequired,
bool highRangeRequired,
bool translationIsDynamic );
136 static unsigned int readCompressedKeyframe(
unsigned char * buf,
unsigned int bytes,
CalCoreBone * coreboneOrNull,
139 bool translationRequired,
bool highRangeRequired,
bool translationIsDynamic,
140 bool useAnimationCompression);
141 static unsigned int writeCompressedKeyframe(
unsigned char * buf,
unsigned int bufLen,
const std::string& strFilename,
144 bool needTranslation,
bool highRangeRequired );
152 static CalCoreMeshPtr loadXmlCoreMesh(
const std::string& strFilename);
158 static CalCoreSkeletonPtr loadXmlCoreSkeletonFromFile(
const std::string& strFilename);
168 bool translationRequired,
bool highRangeRequired,
bool translationIsDynamic,
169 bool useAnimationCompression);
180 static int loadingMode;
181 static double translationTolerance;
182 static double rotationToleranceDegrees;
183 static bool loadingCompressionOn;
184 static bool collapseSequencesOn;
186 static int numEliminatedKeyframes;
187 static int numKeptKeyframes;
188 static int numCompressedAnimations;
189 static int numRoundedKeyframes;