|
wavelength 1.0.0
|
#include <vector>#include "math/color.h"#include "math/quaternion.h"#include "math/transform.h"#include "math/vector2.h"#include "math/vector3.h"#include "os/binstream.h"#include "os/prnstream.h"

Go to the source code of this file.
Classes | |
| struct | Key< T > |
| One keyframe of an animation channel, a value at a frame. More... | |
Functions | |
| template<typename T> | |
| int | AtFrame (const std::vector< Key< T > > &keys, float fFrame, const Key< T > *&pPrev, const Key< T > *&pNext, float &fRatio) |
| Find the keys around a frame. | |
| void | Interp (const Vector3 &a, const Vector3 &b, float fRatio, Vector3 &out) |
| Blend two vectors, taking either end exactly at a position of 0 or 1. | |
| void | Interp (const Vector2 &a, const Vector2 &b, float fRatio, Vector2 &out) |
| Blend two two-component vectors, taking either end exactly at a position of 0 or 1. | |
| void | Interp (const Color &a, const Color &b, float fRatio, Color &out) |
| Blend two colours. | |
| void | Interp (float fA, float fB, float fRatio, float &fOut) |
| Blend two floats. | |
| template<typename T> | |
| void | Interp (T *pA, T *pB, float fRatio, T *&pOut) |
| Take the first of two pointers, which do not blend. | |
| template<typename T> | |
| void | InterpKeys (const std::vector< Key< T > > &keys, float fFrame, T &out) |
| Interpolate keys at a frame. | |
| template<typename T> | |
| float | FirstFrame (const std::vector< Key< T > > &keys) |
| Report the frame of the first key, or 0 for no keys. | |
| template<typename T> | |
| float | LastFrame (const std::vector< Key< T > > &keys) |
| Report the frame of the last key, or 0 for no keys. | |
| void | WriteKeyValue (BinStream &stream, float fValue) |
| Write a float key value. | |
| void | WriteKeyValue (BinStream &stream, const Vector3 &v) |
| Write a vector key value as three floats. | |
| void | WriteKeyValue (BinStream &stream, const Vector2 &v) |
| Write a two-component vector key value as two floats. | |
| void | WriteKeyValue (BinStream &stream, const Quat &quat) |
| Write a quaternion key value as four floats. | |
| void | WriteKeyValue (BinStream &stream, const Color &color) |
| Write a colour key value as four floats. | |
| void | ReadKeyValue (BinStream &stream, float &fValue) |
| Read a float key value. | |
| void | ReadKeyValue (BinStream &stream, Vector3 &v) |
| Read a vector key value as three floats. | |
| void | ReadKeyValue (BinStream &stream, Vector2 &v) |
| Read a two-component vector key value as two floats. | |
| void | ReadKeyValue (BinStream &stream, Quat &quat) |
| Read a quaternion key value as four floats. | |
| void | ReadKeyValue (BinStream &stream, Color &color) |
| Read a colour key value as four floats. | |
| template<typename T> | |
| void | WriteKeyValue (BinStream &stream, const std::vector< T > &values) |
| Write a list key value as its count followed by each value. | |
| template<typename T> | |
| void | ReadKeyValue (BinStream &stream, std::vector< T > &values) |
| Read a list key value the list key value writer wrote. | |
| template<typename T> | |
| BinStream & | operator<< (BinStream &stream, const Key< T > &key) |
| Write a key as its value followed by its frame. | |
| template<typename T> | |
| BinStream & | operator>> (BinStream &stream, Key< T > &key) |
| Read a key the key writer wrote. | |
| template<typename T> | |
| PrnStream & | operator<< (PrnStream &stream, const Key< T > &key) |
| Write a key as its frame and its value. | |
| int AtFrame | ( | const std::vector< Key< T > > & | keys, |
| float | fFrame, | ||
| const Key< T > *& | pPrev, | ||
| const Key< T > *& | pNext, | ||
| float & | fRatio ) |
Find the keys around a frame.
An empty list yields null keys. A frame at or before the first key yields the first key twice, and one at or after the last key yields the last key twice. A frame between keys yields the keys on either side by binary search, with the position between them, unless a key lies exactly on the frame, which is then yielded twice. Every inline expansion in the program follows this order of tests.
| T | The type of the values. |
| keys | The keys, in frame order. |
| fFrame | The frame. |
| pPrev | Receives the key at or before the frame, or null. |
| pNext | Receives the key at or after the frame, or null. |
| fRatio | Receives the position of the frame between the two keys, from 0 to 1. It is unset for an empty list. |
Blend two vectors, taking either end exactly at a position of 0 or 1.
Between the ends the fourth word comes from the second vector.
| a | The value at 0. |
| b | The value at 1. |
| fRatio | The position. |
| out | Receives the blend. |
Blend two two-component vectors, taking either end exactly at a position of 0 or 1.
| a | The value at 0. |
| b | The value at 1. |
| fRatio | The position. |
| out | Receives the blend. |
Blend two colours.
| a | The value at 0. |
| b | The value at 1. |
| fRatio | The position. |
| out | Receives the blend. |
|
inline |
Blend two floats.
| fA | The value at 0. |
| fB | The value at 1. |
| fRatio | The position. |
| fOut | Receives the blend. |
| void Interp | ( | T * | pA, |
| T * | pB, | ||
| float | fRatio, | ||
| T *& | pOut ) |
Take the first of two pointers, which do not blend.
The addresses are of the RndTex instance.
| T | The type pointed at. |
| pA | The value at 0. |
| pB | The value at 1. The routine ignores it. |
| fRatio | The position. The routine ignores it. |
| pOut | Receives pA. |
| void InterpKeys | ( | const std::vector< Key< T > > & | keys, |
| float | fFrame, | ||
| T & | out ) |
Interpolate keys at a frame.
Nothing is written for no keys.
| T | The type of the values. |
| keys | The keys. |
| fFrame | The frame. |
| out | Receives the value. |
| float FirstFrame | ( | const std::vector< Key< T > > & | keys | ) |
Report the frame of the first key, or 0 for no keys.
| T | The type of the values. |
| keys | The keys. |
| float LastFrame | ( | const std::vector< Key< T > > & | keys | ) |
Report the frame of the last key, or 0 for no keys.
| T | The type of the values. |
| keys | The keys. |
|
inline |
Write a float key value.
| stream | The stream to write to. |
| fValue | The value. |
Write a vector key value as three floats.
| stream | The stream to write to. |
| v | The value. |
Write a two-component vector key value as two floats.
| stream | The stream to write to. |
| v | The value. |
Write a quaternion key value as four floats.
| stream | The stream to write to. |
| quat | The value. |
Write a colour key value as four floats.
| stream | The stream to write to. |
| color | The value. |
|
inline |
Read a float key value.
| stream | The stream to read from. |
| fValue | Receives the value. |
Read a vector key value as three floats.
| stream | The stream to read from. |
| v | Receives the value. |
Read a two-component vector key value as two floats.
| stream | The stream to read from. |
| v | Receives the value. |
Read a quaternion key value as four floats.
| stream | The stream to read from. |
| quat | Receives the value. |
Read a colour key value as four floats.
| stream | The stream to read from. |
| color | Receives the value. |
| void WriteKeyValue | ( | BinStream & | stream, |
| const std::vector< T > & | values ) |
Write a list key value as its count followed by each value.
Each value type has its own instance, one address each.
| T | The type of the values. |
| stream | The stream to write to. |
| values | The value. |
| void ReadKeyValue | ( | BinStream & | stream, |
| std::vector< T > & | values ) |
Read a list key value the list key value writer wrote.
Each value type has its own instance, one address each.
| T | The type of the values. |
| stream | The stream to read from. |
| values | Receives the value. |
Write a key as its value followed by its frame.
Each value type has its own instance, one address each.
| T | The type of the value. |
| stream | The stream to write to. |
| key | The key. |
Read a key the key writer wrote.
Each value type has its own instance, one address each.
| T | The type of the value. |
| stream | The stream to read from. |
| key | Receives the key. |
Write a key as its frame and its value.
Each value type has its own instance, one address each.
| T | The type of the value. |
| stream | The stream to write to. |
| key | The key. |