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_MODEL_H_
00026 #define TRANSLATION_MODEL_H_
00027
00028 namespace Lamp{
00029 class Scene;
00030 class AnimationManager;
00031 class AnimationSet;
00032 }
00033
00034 #include <Core/Container/ArrayList.h>
00035
00036 namespace LampForMaya{
00037
00038 class TranslationMeshManager;
00039 class TranslationMesh;
00040 class TranslationStandardModel;
00041 class TranslationCharacterModel;
00042
00043
00044
00045
00046
00047 class TranslationModel{
00048 friend class TranslationModelManager;
00049 public:
00050
00051
00052
00053 virtual ~TranslationModel();
00054
00055
00056
00057
00058
00059
00060
00061 virtual bool analyze(TranslationMeshManager* meshManager) = 0;
00062
00063
00064
00065
00066
00067 virtual void compilePivot(const Vector3& pivot);
00068
00069
00070
00071
00072
00073 virtual bool analyzeAnimation(){ return true; }
00074
00075
00076
00077
00078
00079
00080
00081 virtual bool convertToLamp(Scene* scene) = 0;
00082
00083
00084
00085
00086
00087
00088
00089 virtual bool convertAnimation(
00090 AnimationManager* animationManager, AnimationSet* animationSet){
00091 return true;
00092 }
00093
00094
00095
00096
00097
00098
00099 virtual MObject getObject() const{ return object_; }
00100
00101
00102
00103
00104
00105 virtual String getName() const{ return name_; }
00106
00107
00108
00109
00110
00111
00112
00113
00114 virtual bool isStandardModel() const{ return false; }
00115
00116
00117
00118
00119
00120 virtual TranslationStandardModel* castStandardModel() const{
00121 if(isStandardModel()){
00122 return (TranslationStandardModel*)this;
00123 }
00124 return NULL;
00125 }
00126
00127
00128
00129
00130
00131
00132 virtual bool isCharacterModel() const{ return false; }
00133
00134
00135
00136
00137
00138 virtual TranslationCharacterModel* castCharacterModel() const{
00139 if(isCharacterModel()){
00140 return (TranslationCharacterModel*)this;
00141 }
00142 return NULL;
00143 }
00144
00145
00146
00147 protected:
00148
00149
00150
00151
00152
00153 TranslationModel(
00154 const MObject& initializeObject, const String& initializeName);
00155
00156
00157
00158
00159 virtual bool analyzeModel();
00160
00161
00162
00163
00164
00165
00166 virtual String getShaderName(const MObject& shadingEngine);
00167
00168
00169 ArrayList<TranslationMesh*> meshes_;
00170
00171 MObject object_;
00172
00173 String name_;
00174
00175 bool visibility_;
00176
00177 private:
00178
00179 TranslationModel(const TranslationModel& copy);
00180
00181
00182 void operator =(const TranslationModel& copy);
00183
00184
00185 };
00186
00187
00188 }
00189 #endif // End of TRANSLATION_MODEL_H_
00190
00191