openscenegraph
UpdateMaterial
Go to the documentation of this file.
1/* -*-c++-*-
2 * Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
3 *
4 * This library is open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version. The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * OpenSceneGraph Public License for more details.
13 */
14
15#ifndef OSGANIMATION_UPDATE_MATERIAL
16#define OSGANIMATION_UPDATE_MATERIAL 1
17
19#include <osgAnimation/Export>
20#include <osg/StateAttribute>
21#include <osg/Material>
22
23namespace osgAnimation
24{
25
26 class OSGANIMATION_EXPORT UpdateMaterial : public AnimationUpdateCallback<osg::StateAttributeCallback>
27 {
28 protected:
30
31 public:
32
34
35 UpdateMaterial(const std::string& name = "");
36 UpdateMaterial(const UpdateMaterial& apc,const osg::CopyOp& copyop);
37
39 virtual void operator () (osg::StateAttribute*, osg::NodeVisitor*);
40 void update(osg::Material& material);
41 bool link(Channel* channel);
43 };
44}
45
46#endif
Definition AnimationUpdateCallback:36
Definition Channel:33
Definition Target:50
Definition UpdateMaterial:27
bool link(Channel *channel)
UpdateMaterial(const std::string &name="")
META_Object(osgAnimation, UpdateMaterial)
UpdateMaterial(const UpdateMaterial &apc, const osg::CopyOp &copyop)
void update(osg::Material &material)
osg::ref_ptr< Vec4Target > _diffuse
Definition UpdateMaterial:29
Definition CopyOp:41
Definition Material:32
Definition NodeVisitor:82
Definition StateAttribute:77
Definition ref_ptr:32
Definition Action:34
#define OSGANIMATION_EXPORT
Definition osgAnimation/Export:40