1 /* 2 Copyright (c) 2008-2009 NetAllied Systems GmbH 3 4 This file is part of COLLADAMax. 5 6 Portions of the code are: 7 Copyright (c) 2005-2007 Feeling Software Inc. 8 Copyright (c) 2005-2007 Sony Computer Entertainment America 9 10 Based on the 3dsMax COLLADASW Tools: 11 Copyright (c) 2005-2006 Autodesk Media Entertainment 12 13 Licensed under the MIT Open Source License, 14 for details please see LICENSE file or the website 15 http://www.opensource.org/licenses/mit-license.php 16 */ 17 18 #ifndef __COLLADAMAX_ANIMATIONCREATOR_H__ 19 #define __COLLADAMAX_ANIMATIONCREATOR_H__ 20 21 #include "COLLADAMaxPrerequisites.h" 22 #include "COLLADAMaxImporterBase.h" 23 24 25 namespace COLLADAFW 26 { 27 class AnimationCurve; 28 }; 29 30 31 namespace COLLADAMax 32 { 33 34 /** Base class for classes that creat max animations. */ 35 class AnimationCreator : public ImporterBase 36 { 37 protected: 38 39 /** Constructor. */ 40 AnimationCreator( DocumentImporter* documentImporter ); 41 42 /** Destructor. */ 43 virtual ~AnimationCreator(); 44 45 /** Creates an empty max float controller for of @a animationCurve. If @a isLinear is true 46 @a maxController a linear float controller is created, otherwise a hybrid float controller.*/ 47 Control* createMaxFloatController( COLLADAFW::AnimationCurve* animationCurve, bool isLinear); 48 49 /** Creates an empty linear max transformation controller for of @a animationCurve. */ 50 Control* createMaxTransformationController( COLLADAFW::AnimationCurve* animationCurve); 51 52 /** Creates an empty constant linear max float controller. 53 @param constantValue The value the float controller should have for all time.*/ 54 Control* createMaxConstantFloatController( float constantValue ); 55 56 /** Creates an empty max color RGBA controller.*/ 57 Control* createMaxColorRGBAController( ); 58 59 /** Creates an empty max scale controller.*/ 60 Control* AnimationCreator::createMaxScaleController(); 61 62 /** Creates an empty max controller with SClass_ID @a controllerSuperClassID and Class_ID 63 @a controllerClassID*/ 64 Control* createMaxController( SClass_ID controllerSuperClassID, Class_ID controllerClassID ); 65 66 /** Clones @a controllerToClone and converts its values and if necessary its tangents, using 67 @a conversionFunctor. 68 @param controllerToClone The controller to clone. If 0, the controlled is cloned without key value 69 conversion. 70 @param conversionFunctor The conversion functor used to convert the key values of the controller. 71 @return The cloned controller.*/ 72 Control* cloneController( Control* controllerToClone, ConversionFunctorType conversionFunctor = 0); 73 74 private: 75 76 /** Disable default copy ctor. */ 77 AnimationCreator( const AnimationCreator& pre ); 78 79 /** Disable default assignment operator. */ 80 const AnimationCreator& operator= ( const AnimationCreator& pre ); 81 }; 82 83 } // namespace COLLADAMAX 84 85 #endif // __COLLADAMAX_ANIMATIONCREATOR_H__ 86