]> git.mxchange.org Git - simgear.git/blob - simgear/scene/model/SGMaterialAnimation.hxx
Add preliminary spot light animation
[simgear.git] / simgear / scene / model / SGMaterialAnimation.hxx
1
2 // animation.hxx - classes to manage model animation.
3 // Written by David Megginson, started 2002.
4 //
5 // This file is in the Public Domain, and comes with no warranty.
6
7 #ifndef _SG_MATERIALANIMATION_HXX
8 #define _SG_MATERIALANIMATION_HXX 1
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <osg/Material>
15 #include <osgDB/ReaderWriter>
16 #include "animation.hxx"
17
18 //////////////////////////////////////////////////////////////////////
19 // Material animation
20 //////////////////////////////////////////////////////////////////////
21
22 class SGMaterialAnimation : public SGAnimation {
23 public:
24   SGMaterialAnimation(const SGPropertyNode* configNode,
25                       SGPropertyNode* modelRoot,
26                       const osgDB::Options* options);
27   virtual osg::Group* createAnimationGroup(osg::Group& parent);
28   virtual void install(osg::Node& node);
29   static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp);
30 private:
31   osg::ref_ptr<osg::Material> defaultMaterial;
32   osg::Vec4 defaultAmbientDiffuse;
33   osgDB::FilePathList texturePathList;
34 };
35
36 #endif // _SG_MATERIALANIMATION_HXX