SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLTransformKeyframe Class Reference

SLTransformKeyframe is a specialized SLKeyframe for node transformations. More...

#include <SLAnimKeyframe.h>

Inheritance diagram for SLTransformKeyframe:
[legend]

Public Member Functions

 SLTransformKeyframe (const SLAnimTrack *parent, SLfloat time)
 
void translation (const SLVec3f &t)
 
void rotation (const SLQuat4f &r)
 
void scale (const SLVec3f &s)
 
const SLVec3ftranslation () const
 
const SLQuat4frotation () const
 
const SLVec3fscale () const
 
- Public Member Functions inherited from SLAnimKeyframe
 SLAnimKeyframe (const SLAnimTrack *parent, SLfloat time)
 
bool operator< (const SLAnimKeyframe &other) const
 
void time (SLfloat t)
 
SLfloat time () const
 
SLbool isValid () const
 

Protected Attributes

SLVec3f _translation
 
SLQuat4f _rotation
 
SLVec3f _scale
 
- Protected Attributes inherited from SLAnimKeyframe
const SLAnimTrack_parentTrack
 owning animation track for this keyframe More...
 
SLfloat _time
 temporal position in local time relative to the keyframes parent clip in seconds More...
 
SLbool _isValid
 is this keyframe in use inside its parent track More...
 

Detailed Description

SLTransformKeyframe is a specialized SLKeyframe for node transformations.

Keeps track of translation, rotation and scale.

Definition at line 45 of file SLAnimKeyframe.h.

Constructor & Destructor Documentation

◆ SLTransformKeyframe()

SLTransformKeyframe::SLTransformKeyframe ( const SLAnimTrack parent,
SLfloat  time 
)

Constructor for specialized transform keyframes.

Definition at line 29 of file SLAnimKeyframe.cpp.

31  : SLAnimKeyframe(parent, time),
32  _translation(0, 0, 0),
33  _rotation(0, 0, 0, 1),
34  _scale(1, 1, 1)
35 {
36 }
SLfloat time() const
SLAnimKeyframe(const SLAnimTrack *parent, SLfloat time)

Member Function Documentation

◆ rotation() [1/2]

const SLQuat4f& SLTransformKeyframe::rotation ( ) const
inline

Definition at line 58 of file SLAnimKeyframe.h.

58 { return _rotation; }

◆ rotation() [2/2]

void SLTransformKeyframe::rotation ( const SLQuat4f r)
inline

Definition at line 53 of file SLAnimKeyframe.h.

53 { _rotation = r; }

◆ scale() [1/2]

const SLVec3f& SLTransformKeyframe::scale ( ) const
inline

Definition at line 59 of file SLAnimKeyframe.h.

59 { return _scale; }

◆ scale() [2/2]

void SLTransformKeyframe::scale ( const SLVec3f s)
inline

Definition at line 54 of file SLAnimKeyframe.h.

54 { _scale = s; }
SLScene * s
Definition: SLScene.h:31

◆ translation() [1/2]

const SLVec3f& SLTransformKeyframe::translation ( ) const
inline

Definition at line 57 of file SLAnimKeyframe.h.

57 { return _translation; }

◆ translation() [2/2]

void SLTransformKeyframe::translation ( const SLVec3f t)
inline

Definition at line 52 of file SLAnimKeyframe.h.

52 { _translation = t; }

Member Data Documentation

◆ _rotation

SLQuat4f SLTransformKeyframe::_rotation
protected

Definition at line 63 of file SLAnimKeyframe.h.

◆ _scale

SLVec3f SLTransformKeyframe::_scale
protected

Definition at line 64 of file SLAnimKeyframe.h.

◆ _translation

SLVec3f SLTransformKeyframe::_translation
protected

Definition at line 62 of file SLAnimKeyframe.h.


The documentation for this class was generated from the following files: