StackedScaleElement
Go to the documentation of this file.
/* -*-c++-*-
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGANIMATION_STACKED_SCALE_ELEMENT
#define OSGANIMATION_STACKED_SCALE_ELEMENT 1
#include <osg/Object>
#include <osgAnimation/Export>
#include <osgAnimation/StackedTransformElement>
#include <osgAnimation/Target>
namespace osgAnimation
{
class OSGANIMATION_EXPORT StackedScaleElement : public StackedTransformElement
{
public:
META_Object(osgAnimation, StackedScaleElement)
StackedScaleElement();
StackedScaleElement(const StackedScaleElement&, const osg::CopyOp&);
StackedScaleElement(const std::string& name, const osg::Vec3& scale = osg::Vec3(1,1,1));
StackedScaleElement(const osg::Vec3& scale);
void applyToMatrix(osg::Matrix& matrix) const;
osg::Matrix getAsMatrix() const;
bool isIdentity() const;
void update(float t = 0.0);
const osg::Vec3& getScale() const;
void setScale(const osg::Vec3& scale);
virtual Target* getOrCreateTarget();
virtual Target* getTarget();
virtual const Target* getTarget() const;
protected:
osg::Vec3 _scale;
osg::ref_ptr<Vec3Target> _target;
};
}
#endif
Object
StackedTransformElement
Target
osgAnimation::StackedScaleElement::getOrCreateTarget
virtual Target * getOrCreateTarget()
osgAnimation::StackedScaleElement::StackedScaleElement
StackedScaleElement(const osg::Vec3 &scale)
osgAnimation::StackedScaleElement::applyToMatrix
void applyToMatrix(osg::Matrix &matrix) const
osgAnimation::StackedScaleElement::META_Object
META_Object(osgAnimation, StackedScaleElement) StackedScaleElement()
osgAnimation::StackedScaleElement::getTarget
virtual const Target * getTarget() const
osgAnimation::StackedScaleElement::_scale
osg::Vec3 _scale
Definition StackedScaleElement:48
osgAnimation::StackedScaleElement::StackedScaleElement
StackedScaleElement(const StackedScaleElement &, const osg::CopyOp &)
osgAnimation::StackedScaleElement::setScale
void setScale(const osg::Vec3 &scale)
osgAnimation::StackedScaleElement::_target
osg::ref_ptr< Vec3Target > _target
Definition StackedScaleElement:49
osgAnimation::StackedScaleElement::update
void update(float t=0.0)
osgAnimation::StackedScaleElement::getScale
const osg::Vec3 & getScale() const
osgAnimation::StackedScaleElement::StackedScaleElement
StackedScaleElement(const std::string &name, const osg::Vec3 &scale=osg::Vec3(1, 1, 1))
osgAnimation::StackedScaleElement::isIdentity
bool isIdentity() const
osgAnimation::StackedScaleElement::getTarget
virtual Target * getTarget()
osgAnimation::StackedScaleElement::getAsMatrix
osg::Matrix getAsMatrix() const
osgAnimation::StackedTransformElement::StackedTransformElement
StackedTransformElement()
Definition StackedTransformElement:29
osgAnimation::Target
Definition Target:33
osg::CopyOp
Definition CopyOp:41
osg::ref_ptr
Definition ref_ptr:32
osgAnimation
Definition Action:34
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::Matrix
Matrixd Matrix
Definition Matrix:27
Export
OSGANIMATION_EXPORT
#define OSGANIMATION_EXPORT
Definition osgAnimation/Export:40