]> git.mxchange.org Git - simgear.git/blob - simgear/scene/model/SGMaterialAnimation.hxx
Modified Files:
[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 "animation.hxx"
16
17 //////////////////////////////////////////////////////////////////////
18 // Material animation
19 //////////////////////////////////////////////////////////////////////
20
21 class SGMaterialAnimation : public SGAnimation {
22 public:
23   SGMaterialAnimation(const SGPropertyNode* configNode,
24                       SGPropertyNode* modelRoot);
25   virtual osg::Group* createAnimationGroup(osg::Group& parent);
26   virtual void install(osg::Node& node);
27 private:
28   osg::ref_ptr<osg::Material> defaultMaterial;
29   osg::Vec4 defaultAmbientDiffuse;
30 };
31
32 #endif // _SG_MATERIALANIMATION_HXX