##

KeyFrame.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _KEYFRAME_HH_
#define _KEYFRAME_HH_
#include <ignition/math/Vector3.hh>
#include <ignition/math/Quaternion.hh>
#include "gazebo/common/CommonTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace common
{
class GZ_COMMON_VISIBLE KeyFrame
{
public: explicit KeyFrame(double _time);
public: virtual ~KeyFrame();
public: double GetTime() const;
protected: double time;
};
class GZ_COMMON_VISIBLE PoseKeyFrame : public KeyFrame
{
public: explicit PoseKeyFrame(double _time);
public: virtual ~PoseKeyFrame();
public: void Translation(const ignition::math::Vector3d &_trans);
public: ignition::math::Vector3d Translation() const;
public: void Rotation(const ignition::math::Quaterniond &_rot);
public: ignition::math::Quaterniond Rotation() const;
protected: ignition::math::Vector3d translate;
protected: ignition::math::Quaterniond rotate;
};
class GZ_COMMON_VISIBLE NumericKeyFrame : public KeyFrame
{
public: explicit NumericKeyFrame(double _time);
public: virtual ~NumericKeyFrame();
public: void SetValue(const double &_value);
public: const double &GetValue() const;
protected: double value;
};
}
}
#endif
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::common::NumericKeyFrame::GetValue
const double & GetValue() const
Get the value of the keyframe.
common
common
Definition: FuelModelDatabase.hh:37
gazebo::common::PoseKeyFrame::PoseKeyFrame
PoseKeyFrame(double _time)
Constructor.
gazebo::common::KeyFrame::time
double time
time of key frame
Definition: KeyFrame.hh:49
system.hh
gazebo::common::NumericKeyFrame::SetValue
void SetValue(const double &_value)
Set the value of the keyframe.
CommonTypes.hh
gazebo::common::NumericKeyFrame
A keyframe for a NumericAnimation.
Definition: KeyFrame.hh:86
gazebo::common::NumericKeyFrame::~NumericKeyFrame
virtual ~NumericKeyFrame()
Destructor.
gazebo::common::KeyFrame::KeyFrame
KeyFrame(double _time)
Constructor.
gazebo::common::NumericKeyFrame::value
double value
numeric value
Definition: KeyFrame.hh:104
gazebo::common::PoseKeyFrame::Translation
ignition::math::Vector3d Translation() const
Get the translation of the keyframe.
gazebo::common::PoseKeyFrame::~PoseKeyFrame
virtual ~PoseKeyFrame()
Destructor.
gazebo::common::KeyFrame::GetTime
double GetTime() const
Get the time of the keyframe.
gazebo::common::PoseKeyFrame::translate
ignition::math::Vector3d translate
the translation vector
Definition: KeyFrame.hh:79
gazebo::common::PoseKeyFrame::rotate
ignition::math::Quaterniond rotate
the rotation quaternion
Definition: KeyFrame.hh:82
gazebo::common::NumericKeyFrame::NumericKeyFrame
NumericKeyFrame(double _time)
Constructor.
gazebo::common::PoseKeyFrame::Rotation
ignition::math::Quaterniond Rotation() const
Get the rotation of the keyframe.
gazebo::common::KeyFrame::~KeyFrame
virtual ~KeyFrame()
Destructor.
gazebo::common::KeyFrame
A key frame in an animation.
Definition: KeyFrame.hh:35
gazebo::common::PoseKeyFrame
A keyframe for a PoseAnimation.
Definition: KeyFrame.hh:53