Audaspace 1.8.0
A high level audio library.
Loading...
Searching...
No Matches
AnimateableProperty Class Reference

This class saves animation data for float properties. More...

#include <AnimateableProperty.h>

Inheritance diagram for AnimateableProperty:

Public Member Functions

 AnimateableProperty (int count=1)
 Creates a new animateable property.
 AnimateableProperty (int count, float value)
 Creates a new animateable property.
 ~AnimateableProperty ()
 Destroys the animateable property.
int getCount () const
 Returns the count of floats for a single property.
void write (const float *data)
 Writes the properties value and marks it non-animated.
void write (const float *data, int position, int count)
 Writes the properties value and marks it animated.
void writeConstantRange (const float *data, int position_start, int position_end)
 Fills the properties frame range with constant value and marks it animated.
void read (float position, float *out)
 Reads the properties value.
float readSingle (float position)
 Reads the property's value at the specified position, assuming there is exactly one value.
bool isAnimated () const
 Returns whether the property is animated.
const BuffergetBuffer ()
 Returns this object cast as a Buffer.

Detailed Description

This class saves animation data for float properties.

Constructor & Destructor Documentation

◆ AnimateableProperty() [1/2]

AnimateableProperty::AnimateableProperty ( int count = 1)

Creates a new animateable property.

Parameters
countThe count of floats for a single property.

◆ AnimateableProperty() [2/2]

AnimateableProperty::AnimateableProperty ( int count,
float value )

Creates a new animateable property.

Parameters
countThe count of floats for a single property.
valueThe value that the property should get initialized with. All count floats will be initialized to the same value.

Member Function Documentation

◆ getCount()

int AnimateableProperty::getCount ( ) const

Returns the count of floats for a single property.

Returns
The count of floats stored per frame.

◆ isAnimated()

bool AnimateableProperty::isAnimated ( ) const

Returns whether the property is animated.

Returns
Whether the property is animated.

◆ read()

void AnimateableProperty::read ( float position,
float * out )

Reads the properties value.

Parameters
positionThe position in the animation in frames.
[out]outWhere to write the value to.

◆ readSingle()

float AnimateableProperty::readSingle ( float position)

Reads the property's value at the specified position, assuming there is exactly one value.

Parameters
positionThe position in the animation in frames.
Returns
The value at the position.

◆ write() [1/2]

void AnimateableProperty::write ( const float * data)

Writes the properties value and marks it non-animated.

Parameters
dataThe new value.

◆ write() [2/2]

void AnimateableProperty::write ( const float * data,
int position,
int count )

Writes the properties value and marks it animated.

Parameters
dataThe new value.
positionThe position in the animation in frames.
countThe count of frames to write.

◆ writeConstantRange()

void AnimateableProperty::writeConstantRange ( const float * data,
int position_start,
int position_end )

Fills the properties frame range with constant value and marks it animated.

Parameters
dataThe new value.
position_startThe start position in the animation in frames.
position_endThe end position in the animation in frames.

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