Ran script to remove trailing spaces and tabs

This commit is contained in:
Robert Osfield
2012-03-21 17:36:20 +00:00
parent 1e35f8975d
commit 14a563dc9f
1495 changed files with 21873 additions and 21873 deletions

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -45,12 +45,12 @@ namespace osgAnimation
_nestedCallback(nc._nestedCallback) {}
META_Object(osgAnimation,Callback);
virtual void operator()(Action* action, osgAnimation::ActionVisitor* nv) {}
Callback* getNestedCallback() { return _nestedCallback.get(); }
void addNestedCallback(Callback* callback)
{
Callback* getNestedCallback() { return _nestedCallback.get(); }
void addNestedCallback(Callback* callback)
{
if (callback) {
if (_nestedCallback.valid())
_nestedCallback->addNestedCallback(callback);
@@ -60,7 +60,7 @@ namespace osgAnimation
}
void removeCallback(Callback* cb)
{
{
if (!cb)
return;
@@ -78,7 +78,7 @@ namespace osgAnimation
typedef std::map<unsigned int, osg::ref_ptr<Callback> > FrameCallback;
META_Action(osgAnimation, Action);
Action();
Action(const Action&,const osg::CopyOp&);
@@ -135,7 +135,7 @@ namespace osgAnimation
Play,
Stop
};
Status _state;
};

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -27,13 +27,13 @@ namespace osgAnimation
public:
RunAction(Action* a, int priority = 0) : _action(a), _priority(priority) {}
virtual void operator()(Action* action, ActionVisitor* visitor);
Action* getAction() const { return _action.get(); }
int getPriority() const { return _priority; }
protected:
osg::ref_ptr<Action> _action;
int _priority;
};
}

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -40,7 +40,7 @@ namespace osgAnimation
const ActionBlendIn* getBlendIn() const;
const ActionBlendOut* getBlendOut() const;
unsigned int getBlendOutStartFrame() const;
unsigned int getLoop() const;
void setLoop(unsigned int loop);
void traverse(ActionVisitor& visitor);

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -47,7 +47,7 @@ namespace osgAnimation
/** Those accessors let you add and remove channels
* if you modify something that can change the duration
* you are supposed to call computeDuration or setDuration
*/
*/
ChannelList& getChannels();
const ChannelList& getChannels() const;
@@ -76,7 +76,7 @@ namespace osgAnimation
void setPlayMode (PlayMode mode) { _playmode = mode; }
PlayMode getPlayMode() const { return _playmode; }
void setStartTime(double time) { _startTime = time;}
double getStartTime() const { return _startTime;}
@@ -85,7 +85,7 @@ namespace osgAnimation
double computeDurationFromChannels() const;
~Animation() {}
double _duration;
double _originalDuration;
float _weight;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -47,7 +47,7 @@ namespace osgAnimation
/** Reset the value of targets
this Operation must be done each frame */
void clearTargets();
LinkVisitor* getOrCreateLinkVisitor();
void setLinkVisitor(LinkVisitor*);

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -20,7 +20,7 @@
#include <osgAnimation/Animation>
#include <string>
namespace osgAnimation
namespace osgAnimation
{
class AnimationUpdateCallbackBase : public virtual osg::Object

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <mornifle@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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -27,9 +27,9 @@ namespace osgAnimation
public:
META_Object(osgAnimation, BasicAnimationManager);
BasicAnimationManager();
BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
virtual ~BasicAnimationManager();
void update (double time);
@@ -42,7 +42,7 @@ namespace osgAnimation
bool isPlaying (const std::string& animationName);
void stopAll();
protected:
typedef std::map<int, AnimationList > AnimationLayers;
AnimationLayers _animationsPlaying;

View File

@@ -1,16 +1,16 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
*
* Authors:
* Cedric Pinson <cedric.pinson@plopbyte.net>
* Michael Platings <mplatings@pixelpower.com>
@@ -22,7 +22,7 @@
#include <osg/MatrixTransform>
#include <osgAnimation/Export>
namespace osgAnimation
namespace osgAnimation
{
// A bone can't have more than one parent Bone, so sharing a part of Bone's hierarchy

View File

@@ -1,16 +1,16 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
*
* Authors:
* Cedric Pinson <cedric.pinson@plopbyte.net>
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
* Authors:
@@ -60,7 +60,7 @@ namespace osgAnimation
virtual bool createKeyframeContainerFromTargetValue() = 0;
protected:
std::string _targetName;
std::string _name;
};
@@ -113,7 +113,7 @@ namespace osgAnimation
}
virtual ~TemplateChannel() {}
virtual void update(double time, float weight, int priority)
virtual void update(double time, float weight, int priority)
{
// skip if weight == 0
if (weight < 1e-4)

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -23,25 +23,25 @@
namespace osgAnimation
{
struct OutBounceFunction
struct OutBounceFunction
{
inline static void getValueAt(float t, float& result)
{
if ((t) < (1/2.75))
inline static void getValueAt(float t, float& result)
{
if ((t) < (1/2.75))
{
result = 7.5625 * t * t;
}
else if (t < (2/2.75))
}
else if (t < (2/2.75))
{
t = t - (1.5/2.75);
result = 7.5625* t * t + .75;
}
else if (t < (2.5/2.75))
else if (t < (2.5/2.75))
{
t = t - (2.25/2.75);
result = 7.5625 * t * t + .9375;
}
else
else
{
t = t - (2.625/2.75);
result = 7.5625* t * t + .984375;
@@ -49,25 +49,25 @@ namespace osgAnimation
}
};
struct InBounceFunction
struct InBounceFunction
{
inline static void getValueAt(float t, float& result)
{
inline static void getValueAt(float t, float& result)
{
OutBounceFunction::getValueAt(1-t, result);
result = 1 - result;
}
};
struct InOutBounceFunction
struct InOutBounceFunction
{
inline static void getValueAt(float t, float& result)
{
if (t < 0.5)
inline static void getValueAt(float t, float& result)
{
if (t < 0.5)
{
InBounceFunction::getValueAt(t * 2, result);
result *= 0.5;
}
else
}
else
{
OutBounceFunction::getValueAt(t * 2 - 1 , result);
result = result * 0.5 + 0.5;
@@ -76,30 +76,30 @@ namespace osgAnimation
};
/// Linear function
struct LinearFunction
struct LinearFunction
{
inline static void getValueAt(float t, float& result) { result = t;}
};
/// Quad function
struct OutQuadFunction
struct OutQuadFunction
{
inline static void getValueAt(float t, float& result) { result = - (t * (t -2.0));}
};
struct InQuadFunction
struct InQuadFunction
{
inline static void getValueAt(float t, float& result) { result = t*t;}
};
struct InOutQuadFunction
struct InOutQuadFunction
{
inline static void getValueAt(float t, float& result)
inline static void getValueAt(float t, float& result)
{
t *= 2.0;
if (t < 1.0)
if (t < 1.0)
result = 0.5 * t * t;
else
else
{
t -= 1.0;
result = - 0.5 * (t * ( t - 2) - 1);
@@ -108,20 +108,20 @@ namespace osgAnimation
};
/// Cubic function
struct OutCubicFunction
struct OutCubicFunction
{
inline static void getValueAt(float t, float& result) { t = t-1.0; result = t*t*t + 1;}
};
struct InCubicFunction
struct InCubicFunction
{
inline static void getValueAt(float t, float& result) { result = t*t*t;}
};
struct InOutCubicFunction
struct InOutCubicFunction
{
inline static void getValueAt(float t, float& result)
{
inline static void getValueAt(float t, float& result)
{
t *= 2.0f;
if (t < 1.0f)
result = 0.5f * t * t * t;
@@ -131,9 +131,9 @@ namespace osgAnimation
}
}
};
/// Quart function
struct InQuartFunction
struct InQuartFunction
{
inline static void getValueAt(float t, float& result) { result = t*t*t*t*t;}
};
@@ -145,7 +145,7 @@ namespace osgAnimation
struct InOutQuartFunction
{
inline static void getValueAt(float t, float& result)
inline static void getValueAt(float t, float& result)
{
t = t * 2.0;
if ( t < 1)
@@ -159,26 +159,26 @@ namespace osgAnimation
};
/// Elastic function
struct OutElasticFunction
struct OutElasticFunction
{
inline static void getValueAt(float t, float& result)
inline static void getValueAt(float t, float& result)
{
result = pow(2.0f, -10.0f * t) * sinf((t - 0.3f / 4.0f) * (2.0f * osg::PI) / 0.3f) + 1.0f;
}
};
struct InElasticFunction
struct InElasticFunction
{
inline static void getValueAt(float t, float& result)
inline static void getValueAt(float t, float& result)
{
OutElasticFunction::getValueAt(1.0f - t, result);
result = 1.0f - result;
}
};
struct InOutElasticFunction
struct InOutElasticFunction
{
inline static void getValueAt(float t, float& result)
inline static void getValueAt(float t, float& result)
{
t *= 2.0f;
if (t < 1.0f)
@@ -243,7 +243,7 @@ namespace osgAnimation
{
float s = 1.70158 * 1.525f;
t *= 2.0f;
if (t < 1.0f)
if (t < 1.0f)
{
result = 0.5f * (t * t * ((s + 1.0f) * t - s));
}
@@ -317,7 +317,7 @@ namespace osgAnimation
else
{
result = powf(2.0f, 10.0f * (t - 1.0f));
}
}
}
};
@@ -348,7 +348,7 @@ namespace osgAnimation
{
public:
typedef float value_type;
enum TimeBehaviour
enum TimeBehaviour
{
CLAMP,
LOOP
@@ -359,7 +359,7 @@ namespace osgAnimation
float getTime() const { return _time; }
float evaluateTime(float time) const
{
switch (_behaviour)
switch (_behaviour)
{
case CLAMP:
if (time > _duration)
@@ -381,7 +381,7 @@ namespace osgAnimation
{
_time = evaluateTime(_time + dt);
}
void setTime(float time) { _time = evaluateTime(time);}
void getValue(value_type& result) const { getValueAt(_time, result); }
value_type getValue() const
@@ -397,7 +397,7 @@ namespace osgAnimation
result = result * _changeValue + _startValue;
}
value_type getValueAt(float time) const
{
{
value_type result;
getValueAt(evaluateTime(time), result);
return result;
@@ -406,7 +406,7 @@ namespace osgAnimation
virtual void getValueInNormalizedRange(float t, value_type& result) const = 0;
float getDuration() const { return _duration;}
protected:
protected:
float _time;
float _startValue;
float _changeValue;
@@ -431,8 +431,8 @@ namespace osgAnimation
T& getSampler() { return _sampler;}
const T& getSampler() const { return _sampler;}
virtual void getValueInNormalizedRange(float t, value_type& result) const
{
if (!_sampler.getKeyframeContainer())
{
if (!_sampler.getKeyframeContainer())
{
result = 0;
return;
@@ -447,12 +447,12 @@ namespace osgAnimation
{
typedef std::vector<osg::ref_ptr<Motion> > MotionList;
MotionList _motions;
MotionList& getMotionList() { return _motions; }
const MotionList& getMotionList() const { return _motions; }
CompositeMotion(float startValue = 0, float duration = 1, float changeValue = 1, TimeBehaviour tb = CLAMP) : Motion(startValue, duration, changeValue, tb) {}
virtual void getValueInNormalizedRange(float t, value_type& result) const
virtual void getValueInNormalizedRange(float t, value_type& result) const
{
if (_motions.empty())
{
@@ -520,7 +520,7 @@ namespace osgAnimation
typedef MathMotionTemplate<OutCircFunction > OutCircMotion;
typedef MathMotionTemplate<InCircFunction > InCircMotion;
typedef MathMotionTemplate<InOutCircFunction > InOutCircMotion;
// expo
typedef MathMotionTemplate<OutExpoFunction > OutExpoMotion;
typedef MathMotionTemplate<InExpoFunction > InExpoMotion;

View File

@@ -1,13 +1,13 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -37,8 +37,8 @@
# define OSGANIMATION_EXPORT __declspec(dllimport)
#endif
#else
#define OSGANIMATION_EXPORT
#endif
#define OSGANIMATION_EXPORT
#endif
// set up define for whether member templates are supported by VisualStudio compilers.
#ifdef _MSC_VER

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,16 +1,16 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
*
* Authors:
* Cedric Pinson <cedric.pinson@plopbyte.net>
* Michael Platings <mplatings@pixelpower.com>
@@ -38,7 +38,7 @@ namespace osgAnimation
TemplateInterpolatorBase() : _lastKeyAccess(-1) {}
void reset() { _lastKeyAccess = -1; }
int getKeyIndexFromTime(const TemplateKeyframeContainer<KEY>& keys, double time) const
int getKeyIndexFromTime(const TemplateKeyframeContainer<KEY>& keys, double time) const
{
// todo use a cache
int key_size = keys.size();
@@ -52,7 +52,7 @@ namespace osgAnimation
double time0 = keysVector[i].getTime();
double time1 = keysVector[i+1].getTime();
if ( time >= time0 && time < time1 )
if ( time >= time0 && time < time1 )
{
_lastKeyAccess = i;
return i;
@@ -70,15 +70,15 @@ namespace osgAnimation
public:
TemplateStepInterpolator() {}
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
{
if (time >= keyframes.back().getTime())
if (time >= keyframes.back().getTime())
{
result = keyframes.back().getValue();
return;
}
else if (time <= keyframes.front().getTime())
}
else if (time <= keyframes.front().getTime())
{
result = keyframes.front().getValue();
return;
@@ -96,20 +96,20 @@ namespace osgAnimation
public:
TemplateLinearInterpolator() {}
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
{
if (time >= keyframes.back().getTime())
if (time >= keyframes.back().getTime())
{
result = keyframes.back().getValue();
return;
}
else if (time <= keyframes.front().getTime())
}
else if (time <= keyframes.front().getTime())
{
result = keyframes.front().getValue();
return;
}
int i = this->getKeyIndexFromTime(keyframes,time);
float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime());
const TYPE& v1 = keyframes[i].getValue();
@@ -124,14 +124,14 @@ namespace osgAnimation
{
public:
TemplateSphericalLinearInterpolator() {}
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
{
if (time >= keyframes.back().getTime())
if (time >= keyframes.back().getTime())
{
result = keyframes.back().getValue();
return;
}
else if (time <= keyframes.front().getTime())
else if (time <= keyframes.front().getTime())
{
result = keyframes.front().getValue();
return;
@@ -152,14 +152,14 @@ namespace osgAnimation
public:
TemplateLinearPackedInterpolator() {}
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
{
if (time >= keyframes.back().getTime())
if (time >= keyframes.back().getTime())
{
keyframes.back().getValue().uncompress(keyframes.mScale, keyframes.mMin, result);
return;
}
else if (time <= keyframes.front().getTime())
else if (time <= keyframes.front().getTime())
{
keyframes.front().getValue().uncompress(keyframes.mScale, keyframes.mMin, result);
return;
@@ -182,22 +182,22 @@ namespace osgAnimation
public:
TemplateCubicBezierInterpolator() {}
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
void getValue(const TemplateKeyframeContainer<KEY>& keyframes, double time, TYPE& result) const
{
if (time >= keyframes.back().getTime())
if (time >= keyframes.back().getTime())
{
result = keyframes.back().getValue().getPosition();
return;
}
else if (time <= keyframes.front().getTime())
else if (time <= keyframes.front().getTime())
{
result = keyframes.front().getValue().getPosition();
return;
}
int i = this->getKeyIndexFromTime(keyframes,time);
float t = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime());
float one_minus_t = 1.0-t;
float one_minus_t2 = one_minus_t * one_minus_t;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <mornifle@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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -25,15 +25,15 @@
#include <osg/Vec2>
#include <osg/Matrixf>
namespace osgAnimation
namespace osgAnimation
{
class Keyframe
class Keyframe
{
public:
double getTime() const { return _time; }
void setTime(double time) { _time = time; }
protected:
double _time;
@@ -48,8 +48,8 @@ namespace osgAnimation
TemplateKeyframe () {}
~TemplateKeyframe () {}
TemplateKeyframe (double time, const T& value)
{
TemplateKeyframe (double time, const T& value)
{
_time = time;
_value = value;
}
@@ -99,9 +99,9 @@ namespace osgAnimation
typedef TemplateKeyframe<float> FloatKeyframe;
typedef TemplateKeyframeContainer<float> FloatKeyframeContainer;
typedef TemplateKeyframe<double> DoubleKeyframe;
typedef TemplateKeyframeContainer<double> DoubleKeyframeContainer;
typedef TemplateKeyframeContainer<double> DoubleKeyframeContainer;
typedef TemplateKeyframe<osg::Vec2> Vec2Keyframe;
typedef TemplateKeyframeContainer<osg::Vec2> Vec2KeyframeContainer;
@@ -123,16 +123,16 @@ namespace osgAnimation
typedef TemplateKeyframe<FloatCubicBezier> FloatCubicBezierKeyframe;
typedef TemplateKeyframeContainer<FloatCubicBezier> FloatCubicBezierKeyframeContainer;
typedef TemplateKeyframe<DoubleCubicBezier> DoubleCubicBezierKeyframe;
typedef TemplateKeyframeContainer<DoubleCubicBezier> DoubleCubicBezierKeyframeContainer;
typedef TemplateKeyframe<Vec2CubicBezier> Vec2CubicBezierKeyframe;
typedef TemplateKeyframeContainer<Vec2CubicBezier> Vec2CubicBezierKeyframeContainer;
typedef TemplateKeyframe<Vec3CubicBezier> Vec3CubicBezierKeyframe;
typedef TemplateKeyframeContainer<Vec3CubicBezier> Vec3CubicBezierKeyframeContainer;
typedef TemplateKeyframe<Vec4CubicBezier> Vec4CubicBezierKeyframe;
typedef TemplateKeyframeContainer<Vec4CubicBezier> Vec4CubicBezierKeyframeContainer;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -19,7 +19,7 @@
#include <osg/StateSet>
#include <osgAnimation/Animation>
namespace osgAnimation
namespace osgAnimation
{
class AnimationUpdateCallbackBase;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <mornifle@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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -19,19 +19,19 @@
#include <osgAnimation/AnimationUpdateCallback>
#include <osg/Geometry>
namespace osgAnimation
namespace osgAnimation
{
class OSGANIMATION_EXPORT MorphGeometry : public osg::Geometry
{
public:
enum Method {
NORMALIZED,
RELATIVE
};
class MorphTarget
{
protected:
@@ -71,17 +71,17 @@ namespace osgAnimation
virtual const char* className() const { return "MorphGeometry"; }
virtual void transformSoftwareMethod();
/** Set the morphing method. */
void setMethod(Method method) { _method = method; }
/** Get the morphing method. */
inline Method getMethod() const { return _method; }
/** Set flag for morphing normals. */
void setMorphNormals(bool morphNormals) { _morphNormals = morphNormals; }
/** Get the flag for morphing normals. */
inline bool getMorphNormals() const { return _morphNormals; }
/** Add a \c MorphTarget to the \c MorphGeometry.
* If \c MorphTarget is not \c NULL and is not contained in the \c MorphGeometry
* then increment its reference count, add it to the MorphTargets list and
@@ -92,11 +92,11 @@ namespace osgAnimation
* @return \c true for success; \c false otherwise.
*/
virtual void addMorphTarget( osg::Geometry *morphTarget, float weight = 1.0 ) { _morphTargets.push_back(MorphTarget(morphTarget, weight)); _dirty = true; }
void setWeight(unsigned int index, float morphWeight)
{
if (index < _morphTargets.size())
{
{
if (index < _morphTargets.size())
{
_morphTargets[index].setWeight(morphWeight);
dirty();
}
@@ -104,13 +104,13 @@ namespace osgAnimation
/** Set the MorphGeometry dirty.*/
void dirty() { _dirty = true; }
/** Get the list of MorphTargets.*/
const MorphTargetList& getMorphTargetList() const { return _morphTargets; }
/** Get the list of MorphTargets. Warning if you modify this array you will have to call dirty() */
MorphTargetList& getMorphTargetList() { return _morphTargets; }
/** Return the \c MorphTarget at position \c i.*/
inline const MorphTarget& getMorphTarget( unsigned int i ) const { return _morphTargets[i]; }
@@ -123,19 +123,19 @@ namespace osgAnimation
Method _method;
MorphTargetList _morphTargets;
std::vector<osg::Vec3> _positionSource;
std::vector<osg::Vec3> _normalSource;
/// Do we also morph between normals?
bool _morphNormals;
};
class OSGANIMATION_EXPORT UpdateMorph : public AnimationUpdateCallback<osg::NodeCallback>
{
protected:
std::map<int, osg::ref_ptr<osgAnimation::FloatTarget> > _weightTargets;
public:
META_Object(osgAnimation, UpdateMorph);

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -21,7 +21,7 @@
#include <osgAnimation/VertexInfluence>
#include <osg/Geometry>
namespace osgAnimation
namespace osgAnimation
{
class OSGANIMATION_EXPORT RigGeometry : public osg::Geometry
@@ -37,15 +37,15 @@ namespace osgAnimation
void setInfluenceMap(VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; }
const VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();}
VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();}
const Skeleton* getSkeleton() const;
Skeleton* getSkeleton();
// will be used by the update callback to init correctly the rig mesh
void setSkeleton(Skeleton*);
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;}
bool getNeedToComputeMatrix() const { return _needToComputeMatrix;}
// this build the internal database about vertex influence and bones
void buildVertexInfluenceSet();
@@ -71,7 +71,7 @@ namespace osgAnimation
void copyFrom(osg::Geometry& from);
protected:
osg::ref_ptr<osg::Geometry> _geometry;
osg::ref_ptr<RigTransform> _rigTransformImplementation;
@@ -82,12 +82,12 @@ namespace osgAnimation
osg::Matrix _invMatrixFromSkeletonToGeometry;
osg::observer_ptr<Skeleton> _root;
bool _needToComputeMatrix;
struct FindNearestParentSkeleton : public osg::NodeVisitor
{
osg::ref_ptr<Skeleton> _root;
FindNearestParentSkeleton() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_PARENTS) {}
void apply(osg::Transform& node)
void apply(osg::Transform& node)
{
if (_root.valid())
return;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -22,7 +22,7 @@
#include <osg/Matrix>
#include <osg/Array>
namespace osgAnimation
namespace osgAnimation
{
class RigGeometry;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -21,7 +21,7 @@
#include <osgAnimation/VertexInfluence>
#include <osg/observer_ptr>
namespace osgAnimation
namespace osgAnimation
{
class RigGeometry;
@@ -33,9 +33,9 @@ namespace osgAnimation
RigTransformSoftware();
virtual void operator()(RigGeometry&);
class BoneWeight
class BoneWeight
{
public:
BoneWeight(Bone* bone, float weight) : _bone(bone), _weight(weight) {}
@@ -55,8 +55,8 @@ namespace osgAnimation
public:
BoneWeightList& getBones() { return _bones; }
VertexList& getVertexes() { return _vertexes; }
void resetMatrix()
void resetMatrix()
{
_result.set(0, 0, 0, 0,
0, 0, 0, 0,
@@ -122,7 +122,7 @@ namespace osgAnimation
{
// the result of matrix mult should be cached to be used for vertexes transform and normal transform and maybe other computation
int size = _boneSetVertexSet.size();
for (int i = 0; i < size; i++)
for (int i = 0; i < size; i++)
{
UniqBoneSetVertexSet& uniq = _boneSetVertexSet[i];
uniq.computeMatrixForVertexSet();
@@ -142,7 +142,7 @@ namespace osgAnimation
template <class V> void computeNormal(const osg::Matrix& transform, const osg::Matrix& invTransform, const V* src, V* dst)
{
int size = _boneSetVertexSet.size();
for (int i = 0; i < size; i++)
for (int i = 0; i < size; i++)
{
UniqBoneSetVertexSet& uniq = _boneSetVertexSet[i];
uniq.computeMatrixForVertexSet();
@@ -150,7 +150,7 @@ namespace osgAnimation
const VertexList& vertexes = uniq.getVertexes();
int vertexSize = vertexes.size();
for (int j = 0; j < vertexSize; j++)
for (int j = 0; j < vertexSize; j++)
{
int idx = vertexes[j];
dst[idx] = osg::Matrix::transform3x3(src[idx],matrix);

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
* Authors:
@@ -26,7 +26,7 @@
#include <osgAnimation/Keyframe>
#include <osgAnimation/Interpolator>
namespace osgAnimation
namespace osgAnimation
{
class Sampler : public osg::Referenced
@@ -58,7 +58,7 @@ namespace osgAnimation
KeyframeContainerType* getKeyframeContainerTyped() { return _keyframes.get();}
const KeyframeContainerType* getKeyframeContainerTyped() const { return _keyframes.get();}
KeyframeContainerType* getOrCreateKeyframeContainer()
KeyframeContainerType* getOrCreateKeyframeContainer()
{
if (_keyframes != 0)
return _keyframes.get();
@@ -73,7 +73,7 @@ namespace osgAnimation
return _keyframes->front().getTime();
}
double getEndTime() const
double getEndTime() const
{
if (!_keyframes || _keyframes->empty())
return 0.0;
@@ -132,7 +132,7 @@ namespace osgAnimation
typedef TemplateSampler<Vec2CubicBezierInterpolator> Vec2CubicBezierSampler;
typedef TemplateSampler<Vec3CubicBezierInterpolator> Vec3CubicBezierSampler;
typedef TemplateSampler<Vec4CubicBezierInterpolator> Vec4CubicBezierSampler;
}
#endif

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -18,7 +18,7 @@
#include <osgAnimation/Export>
#include <osg/MatrixTransform>
namespace osgAnimation
namespace osgAnimation
{
class OSGANIMATION_EXPORT Skeleton : public osg::MatrixTransform

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -23,7 +23,7 @@
namespace osgAnimation
{
class OSGANIMATION_EXPORT StackedRotateAxisElement : public StackedTransformElement
class OSGANIMATION_EXPORT StackedRotateAxisElement : public StackedTransformElement
{
public:
META_Object(osgAnimation, StackedRotateAxisElement);

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2009 Cedric Pinson <mornifle@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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -26,7 +26,7 @@ namespace osgAnimation
#if 0
struct StatAction
{
std::string _name;
osg::ref_ptr<osg::Group> _group;
osg::ref_ptr<osg::Geode> _label;
@@ -41,9 +41,9 @@ namespace osgAnimation
#endif
/** Event handler for adding on screen stats reporting to Viewers.*/
class OSGANIMATION_EXPORT StatsHandler : public osgGA::GUIEventHandler
class OSGANIMATION_EXPORT StatsHandler : public osgGA::GUIEventHandler
{
public:
public:
StatsHandler();
@@ -53,10 +53,10 @@ namespace osgAnimation
FRAME_RATE = 1,
LAST = 2
};
void setKeyEventTogglesOnScreenStats(int key) { _keyEventTogglesOnScreenStats = key; }
int getKeyEventTogglesOnScreenStats() const { return _keyEventTogglesOnScreenStats; }
void setKeyEventPrintsOutStats(int key) { _keyEventPrintsOutStats = key; }
int getKeyEventPrintsOutStats() const { return _keyEventPrintsOutStats; }
@@ -83,11 +83,11 @@ namespace osgAnimation
osg::Geometry* createFrameMarkers(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numBlocks);
osg::Geometry* createTick(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numTicks);
osg::Node* createCameraTimeStats(const std::string& font, osg::Vec3& pos, float startBlocks, bool acquireGPUStats, float characterSize, osg::Stats* viewerStats, osg::Camera* camera);
void setUpScene(osgViewer::Viewer* viewer);
int _keyEventTogglesOnScreenStats;
int _keyEventPrintsOutStats;
@@ -95,14 +95,14 @@ namespace osgAnimation
bool _initialized;
osg::ref_ptr<osg::Camera> _camera;
osg::ref_ptr<osg::Switch> _switch;
osg::ref_ptr<osg::Group> _group;
unsigned int _frameRateChildNum;
unsigned int _numBlocks;
double _blockMultiplier;
float _statsWidth;
float _statsHeight;

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -24,7 +24,7 @@
#include <osg/Referenced>
#include <osgAnimation/Export>
namespace osgAnimation
namespace osgAnimation
{
class Channel;
@@ -32,7 +32,7 @@ namespace osgAnimation
class OSGANIMATION_EXPORT Target : public osg::Referenced
{
public:
Target();
virtual ~Target() {}
void reset() { _weight = 0; _priorityWeight = 0; }
@@ -49,7 +49,7 @@ namespace osgAnimation
class TemplateTarget : public Target
{
public:
TemplateTarget() : _target() {}
TemplateTarget(const T& v) { setValue(v); }
TemplateTarget(const TemplateTarget& v) { setValue(v.getValue()); }
@@ -117,7 +117,7 @@ namespace osgAnimation
}
osg::Quat::value_type len2 = _target.length2();
if ( len2 != 1.0 && len2 != 0.0)
if ( len2 != 1.0 && len2 != 0.0)
_target *= 1.0/sqrt(len2);
}
@@ -128,7 +128,7 @@ namespace osgAnimation
typedef TemplateTarget<osg::Vec2> Vec2Target;
typedef TemplateTarget<float> FloatTarget;
typedef TemplateTarget<double> DoubleTarget;
}
#endif

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -63,7 +63,7 @@ namespace osgAnimation
virtual void addActionAt(unsigned int frame, Action* action, int priority = 0);
virtual void addActionAt(double t, Action* action, int priority = 0);
void addActionNow(Action* action, int priority = 0);
void clearActions();
virtual void update(double simulationTime);
@@ -90,7 +90,7 @@ namespace osgAnimation
unsigned int _previousFrameEvaluated;
bool _initFirstFrame;
TimelineStatus _state;
bool _collectStats;
osg::ref_ptr<osg::Stats> _stats;
osg::ref_ptr<osgAnimation::StatsActionVisitor> _statsVisitor;
@@ -112,7 +112,7 @@ namespace osgAnimation
void internalRemoveAction(Action* action);
void internalAddAction(int priority, const FrameAction& ftl);
};

View File

@@ -1,18 +1,18 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGANIMATION_TIMELINE_ANIMATION_MANAGER
#ifndef OSGANIMATION_TIMELINE_ANIMATION_MANAGER
#define OSGANIMATION_TIMELINE_ANIMATION_MANAGER 1
#include <osgAnimation/Export>
@@ -20,7 +20,7 @@
#include <osgAnimation/Timeline>
namespace osgAnimation
namespace osgAnimation
{
class OSGANIMATION_EXPORT TimelineAnimationManager : public AnimationManagerBase

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -27,7 +27,7 @@ namespace osgAnimation
{
protected:
osg::ref_ptr<Vec4Target> _diffuse;
public:
META_Object(osgAnimation, UpdateMaterial);

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/

View File

@@ -1,4 +1,4 @@
/* -*-c++-*-
/* -*-c++-*-
*/
//****************************************************************************//
// loader.cpp //
@@ -34,7 +34,7 @@
#include <osg/Vec3>
#include <osg/Math>
namespace osgAnimation
namespace osgAnimation
{
@@ -45,7 +45,7 @@ namespace osgAnimation
Vec3Packed(uint32_t val): m32bits(val) {}
Vec3Packed(): m32bits(0) {}
void uncompress(const osg::Vec3& scale, const osg::Vec3& min, osg::Vec3& result) const
void uncompress(const osg::Vec3& scale, const osg::Vec3& min, osg::Vec3& result) const
{
uint32_t pt[3];
pt[0] = m32bits & 0x7ff;
@@ -55,8 +55,8 @@ namespace osgAnimation
result[1] = scale[1] * pt[1] + min[1];
result[2] = scale[2] * pt[2] + min[2];
}
void compress(const osg::Vec3f& src, const osg::Vec3f& min, const osg::Vec3f& scaleInv)
void compress(const osg::Vec3f& src, const osg::Vec3f& min, const osg::Vec3f& scaleInv)
{
uint32_t srci[3];
srci[0] = osg::minimum(static_cast<uint32_t>(((src[0] - min[0] )*scaleInv[0])), uint32_t(2047));
@@ -73,16 +73,16 @@ namespace osgAnimation
osg::Vec3 mScale;
osg::Vec3 mScaleInv;
void analyze(const std::vector<osg::Vec3>& src)
void analyze(const std::vector<osg::Vec3>& src)
{
//analyze the keys
mMin.set(FLT_MAX, FLT_MAX, FLT_MAX);
osg::Vec3 maxp(-FLT_MAX, -FLT_MAX, -FLT_MAX);
int nb = (int)src.size();
for(int i = 0; i < nb; i++)
for(int i = 0; i < nb; i++)
{
const osg::Vec3 &pos = src[i];
for(int j = 0; j < 3; j++)
for(int j = 0; j < 3; j++)
{
maxp[j] = osg::maximum(pos[j],maxp[j]);
mMin[j] = osg::minimum(pos[j],mMin[j]);
@@ -105,7 +105,7 @@ namespace osgAnimation
mScale[2] = diff[2] / 1023;
}
void compress(const std::vector<osg::Vec3>& src)
void compress(const std::vector<osg::Vec3>& src)
{
mVecCompressed.resize(src.size());
// save all core keyframes

View File

@@ -1,14 +1,14 @@
/* -*-c++-*-
/* -*-c++-*-
* Copyright (C) 2008 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
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -54,8 +54,8 @@ namespace osgAnimation
{
public:
typedef std::vector<VertexInfluence> BoneToVertexList;
class BoneWeight
class BoneWeight
{
public:
BoneWeight(const std::string& name, float weight) : _boneName(name), _weight(weight) {}
@@ -70,7 +70,7 @@ namespace osgAnimation
typedef std::vector<BoneWeight> BoneWeightList;
typedef std::map<int,BoneWeightList> VertexIndexToBoneWeightMap;
class UniqVertexSetToBoneSet
{
public: