SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLAnimKeyframe.cpp
Go to the documentation of this file.
1 /**
2  * \file SLAnimation.cpp
3  * \authors Marcus Hudritsch
4  * \date July 2014
5 // Codestyle: https://code.google.com/p/slproject/wiki/CodingStyleGuidelines
6  * \authors Marcus Hudritsch
7  * \copyright http://opensource.org/licenses/GPL-3.0
8 */
9 
10 #include <SLAnimKeyframe.h>
11 
12 //-----------------------------------------------------------------------------
13 /*! Constructor for default keyframes.
14  */
16  : _parentTrack(parent), _time(time)
17 {
18 }
19 //-----------------------------------------------------------------------------
20 /*! Comperator operator.
21  */
22 bool SLAnimKeyframe::operator<(const SLAnimKeyframe& other) const
23 {
24  return _time < other._time;
25 }
26 //-----------------------------------------------------------------------------
27 /*! Constructor for specialized transform keyframes.
28  */
30  SLfloat time)
31  : SLAnimKeyframe(parent, time),
32  _translation(0, 0, 0),
33  _rotation(0, 0, 0, 1),
34  _scale(1, 1, 1)
35 {
36 }
37 //-----------------------------------------------------------------------------
float SLfloat
Definition: SL.h:173
Base class for all animation keyframes.
bool operator<(const SLAnimKeyframe &other) const
SLfloat _time
temporal position in local time relative to the keyframes parent clip in seconds
SLAnimKeyframe(const SLAnimTrack *parent, SLfloat time)
Abstract base class for SLAnimationTracks providing time and keyframe functions.
Definition: SLAnimTrack.h:32
SLTransformKeyframe(const SLAnimTrack *parent, SLfloat time)