00001
00002
00003
00004
00005
00006
00007 #ifndef _SG_MATERIALANIMATION_HXX
00008 #define _SG_MATERIALANIMATION_HXX 1
00009
00010 #ifndef __cplusplus
00011 # error This library requires C++
00012 #endif
00013
00014 #include <osg/Material>
00015 #include <osgDB/ReaderWriter>
00016 #include "animation.hxx"
00017
00019
00021
00022 class SGMaterialAnimation : public SGAnimation {
00023 public:
00024 SGMaterialAnimation(const SGPropertyNode* configNode,
00025 SGPropertyNode* modelRoot,
00026 const osgDB::ReaderWriter::Options* options);
00027 virtual osg::Group* createAnimationGroup(osg::Group& parent);
00028 virtual void install(osg::Node& node);
00029 static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp);
00030 private:
00031 osg::ref_ptr<osg::Material> defaultMaterial;
00032 osg::Vec4 defaultAmbientDiffuse;
00033 osgDB::FilePathList texturePathList;
00034 };
00035
00036 #endif // _SG_MATERIALANIMATION_HXX