00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef TRANSLATION_BONE_H_
00026 #define TRANSLATION_BONE_H_
00027
00028 #include <Core/Container/ArrayList.h>
00029
00030 namespace Lamp{
00031 class CharacterModel;
00032 class VectorArrayInterpolator;
00033 class EulerArrayInterpolator;
00034 class VectorInterpolator;
00035 class RotationInterpolator;
00036 }
00037
00038 namespace LampForMaya{
00039
00040 class TranslationCharacterModel;
00041
00042
00043
00044
00045
00046 class TranslationBone{
00047 friend class TranslationCharacterModel;
00048 protected:
00049
00050
00051
00052
00053 TranslationBone();
00054
00055
00056
00057
00058 virtual ~TranslationBone();
00059
00060
00061
00062
00063
00064
00065 virtual bool analyze(const MDagPath& dagPath);
00066
00067
00068
00069
00070
00071
00072 virtual void buildModelMatrix(
00073 TranslationCharacterModel* characterModel, const Matrix34& parentMatrix);
00074
00075
00076
00077
00078
00079
00080
00081 virtual bool analyzeAnimation(int startTime, int endTime);
00082
00083
00084
00085
00086
00087
00088 const String& getName() const{ return name_; }
00089
00090
00091
00092
00093
00094 const Matrix34& getInversePoseMatrix() const{ return inversePoseMatrix_; }
00095
00096
00097
00098
00099
00100
00101 virtual bool convertToLamp(CharacterModel* model);
00102
00103
00104
00105
00106
00107
00108
00109 virtual bool boneLink(CharacterModel* model, int index);
00110
00111
00112
00113
00114
00115
00116
00117 virtual VectorInterpolator* getScaleAnimation(int startTime, int endTime);
00118
00119
00120
00121
00122
00123
00124
00125 virtual RotationInterpolator* getRotationAnimation(
00126 int startTime, int endTime);
00127
00128
00129
00130
00131
00132
00133
00134 virtual VectorInterpolator* getTranslationAnimation(
00135 int startTime, int endTime);
00136
00137 private:
00138
00139 TranslationBone(const TranslationBone& copy);
00140
00141
00142 void operator =(const TranslationBone& copy);
00143
00144
00145 Matrix34 inversePoseMatrix_;
00146
00147 ArrayList<String> bones_;
00148
00149 MDagPath dagPath_;
00150
00151 MObject object_;
00152
00153 String name_;
00154
00155 Vector3 jointRotation_;
00156
00157 Vector3 originalRotation_;
00158
00159 Vector3 scale_;
00160
00161 Vector3 rotation_;
00162
00163 Vector3 translation_;
00164
00165
00166 VectorArrayInterpolator* scaleAnimation_;
00167
00168 EulerArrayInterpolator* rotationAnimation_;
00169
00170 VectorArrayInterpolator* translationAnimation_;
00171 };
00172
00173
00174 }
00175 #endif // End of TRANSLATION_BONE_H_
00176