c

class BaseKeyframer

Include: Sky/BaseKeyframer.h

The base class for keyframers. A keyframer stores a list of keyframes, each representing the state at a particular time.

Functions

void BumpKeyframe(simul::sky::BaseKeyframe K, float time_scale)
void DeleteKeyframe(int i)
bool DeleteKeyframeByUniqueId(unsigned int id)
std::vector GetAllModifiableKeyframes()
int GetCurrentSubdivision()
float GetDefaultFloat(char name)
int GetDefaultInt(char name)
float GetFloat(char, simul::base::Variant params)
int GetInt(char, simul::base::Variant params)
simul::sky::BaseKeyframe * GetKeyframe(int i)
simul::sky::BaseKeyframe const * GetKeyframe(int i)
int GetKeyframeAtTime(double t)
simul::sky::BaseKeyframe * GetKeyframeByUniqueId(unsigned int id)
simul::sky::BaseKeyframe const * GetKeyframeByUniqueId(unsigned int id)
int GetKeyframeIndexByUniqueId(unsigned int id)
float GetKeyframeTime(int i)
unsigned int GetKeyframeUidAfterTime(double t)
unsigned int GetKeyframeUidAtOrBeforeTime(double t)
int GetNumKeyframes()
bool HasFloat(char)
bool HasInt(char)
simul::sky::BaseKeyframe * InsertKeyframe(float time)
void Load(simul::sky::Input is)
void LoadFromText(simul::crossplatform::TextInput input)
void Save(simul::sky::Output os)
void SaveToText(simul::crossplatform::TextOutput os, bool include_keyframes)
void SetFloat(char, float)
void SortKeyframes()

The base class for keyframers. A keyframer stores a list of keyframes, each representing the state at a particular time.

Functions

void BumpKeyframe(simul::sky::BaseKeyframe K, float time_scale)

Check if this keyframe is too close to any others. This is done by seeing if it’s closer than time_scale. If so, the specified keyframe is moved away.

void DeleteKeyframe(int i)

Delete the specified keyframe.

bool DeleteKeyframeByUniqueId(unsigned int id)

Delete the keyframe if it exists (return true), else return false;

std::vector GetAllModifiableKeyframes()

Get a list of all the keyframes not currently among the three in-use.

int GetCurrentSubdivision()

Returns the index of the current keyframe.

float GetDefaultFloat(char name)

Return the default float value with the given, case-insensitive, name.

int GetDefaultInt(char name)

Return the default int value with the given, case-insensitive, name.

float GetFloat(char, simul::base::Variant params)

Text-based interface - returns the named value if it exists.

int GetInt(char, simul::base::Variant params)

Text-based interface - returns the named value if it exists.

simul::sky::BaseKeyframe * GetKeyframe(int i)

Get a pointer to the i’th keyframe.

simul::sky::BaseKeyframe const * GetKeyframe(int i)

Get a pointer to the i’th keyframe.

int GetKeyframeAtTime(double t)

Get the keyframe BEFORE or AT time t:

simul::sky::BaseKeyframe * GetKeyframeByUniqueId(unsigned int id)

Get a pointer to the keyframe with the specified id, or NULL if there is no such keyframe.

simul::sky::BaseKeyframe const * GetKeyframeByUniqueId(unsigned int id)

Get a pointer to the keyframe with the specified id, or NULL if there is no such keyframe.

int GetKeyframeIndexByUniqueId(unsigned int id)

Get an index for the keyframe with the specified id, or NULL if there is no such keyframe.

float GetKeyframeTime(int i)

Time of a particular keyframe.

unsigned int GetKeyframeUidAfterTime(double t)

Get the keyframe After time t:

unsigned int GetKeyframeUidAtOrBeforeTime(double t)

Get the keyframe uid BEFORE or AT time t:

int GetNumKeyframes()

Number of keyframes.

bool HasFloat(char)

Text-based interface - returns true if the keyframer has a floating point value of the given name.

bool HasInt(char)

Text-based interface - returns true if the keyframer has a value of the given name.

simul::sky::BaseKeyframe * InsertKeyframe(float time)

Insert a keyframe at the given time and return a pointer to it.

void Load(simul::sky::Input is)

Stream/load from the std::isteam is.

void LoadFromText(simul::crossplatform::TextInput input)

Load from a textual input.

void Save(simul::sky::Output os)

Stream/save to the std::osteam os.

void SaveToText(simul::crossplatform::TextOutput os, bool include_keyframes)

Save this keyframer’s values to textual output.

void SetFloat(char, float)

Text-based interface - sets the named value if it exists.

void SortKeyframes()

Make sure the keyframes are in ascending order of time.