Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Public Member Functions | List of all members
APRSStream Class Reference

#include <APRSStream.h>

Inheritance diagram for APRSStream:
AStream< PRSKey > AControledRotationStream APRSControlStream APRSKeyStream APRSBezierKeyStream

Public Member Functions

LocalToGlobalBaseType * NewStreamOutputDataInstance () override
void DeleteStreamOutputDataInstance (LocalToGlobalBaseType *data) override
void InitData (LocalToGlobalBaseType *data) override
void LERPData (LocalToGlobalBaseType *data, Float t) override
void IdentityData (LocalToGlobalBaseType *data) override
bool SameData (LocalToGlobalBaseType *data, LocalToGlobalBaseType *other_data) override
void MulData (LocalToGlobalBaseType *inout, LocalToGlobalBaseType *input) override
void MulInvData (LocalToGlobalBaseType *data1, LocalToGlobalBaseType *data2) override
void MulInvData2 (LocalToGlobalBaseType *data1, LocalToGlobalBaseType *data2)
void CopyData (LocalToGlobalBaseType *dst, LocalToGlobalBaseType *src) override
void SetAndModifyData (LocalToGlobalBaseType *currentData, LocalToGlobalBaseType *goalData, LocalToGlobalBaseType *startAnimData) override
ATimeValue GetStreamLength () override
- Public Member Functions inherited from AStream< PRSKey >
void Start () override
void Stop () override

Detailed Description

base class for PRS streams ( for bone animation )

Member Function Documentation

◆ CopyData()

void APRSStream::CopyData ( LocalToGlobalBaseType *  dst,
LocalToGlobalBaseType *  src 

do : data1 = data2

◆ DeleteStreamOutputDataInstance()

void APRSStream::DeleteStreamOutputDataInstance ( LocalToGlobalBaseType *  data)

delete a PRSKey

◆ GetStreamLength()

ATimeValue APRSStream::GetStreamLength ( )

return the length of the stream

◆ IdentityData()

void APRSStream::IdentityData ( LocalToGlobalBaseType *  data)

do : data = identity ie: set position to 0, scale to 1 and rotation to Quaternion identity

◆ InitData()

void APRSStream::InitData ( LocalToGlobalBaseType *  data)

Set data to m_CurrentPRSKey

◆ LERPData()

void APRSStream::LERPData ( LocalToGlobalBaseType *  data,
Float  t 

data = (this->m_CurrentPRSKey*t)+(data*(1-t))

◆ MulData()

void APRSStream::MulData ( LocalToGlobalBaseType *  inout,
LocalToGlobalBaseType *  input 
  • used to multiply two PRS keys
  • when this method is used for PRSkey transformations, the arguments have the following meaning : destination = MulData(origin, transformation)
  • since transformations are not commutative, its important to respect this order so that Qr1 = Qr2*Qr1 (Qr = Quaternion rotation)
  • the result is put in data1 which is overwritten.

◆ MulInvData()

void APRSStream::MulInvData ( LocalToGlobalBaseType *  data1,
LocalToGlobalBaseType *  data2 
  • data1 = data1*(1/data2)
  • when this method is used for PRSkey transformations, it enables to
  • recover the origin PRSKey given a destination key and a transformation key :
  • origin = MulInvData(dest,transformation);
  • Calling MulData and MulInvData as following enables to find the origin key again :
    dest = MulData(origin,transformation); origin = MulInvData(dest,transformation);
  • Do not mix up MulInvData and MulInvData2 which have different definitions.

◆ MulInvData2()

void APRSStream::MulInvData2 ( LocalToGlobalBaseType *  data1,
LocalToGlobalBaseType *  data2 
  • data1 = data1*(1/data2)
  • when this method is used for PRSkey transformations, it enables to
  • recover the transformation PRSKey given a destination key and an origin key :
  • transformation = MulInvData2(dest,origin)
  • Calling MulData and MulInvData2 as following enables to find the transformation key again :
    dest = MulData(origin,transformation); transformation = MulInvData2(dest,origin);
  • Do not mix up MulInvData and MulInvData2 which have different definitions.

◆ NewStreamOutputDataInstance()

LocalToGlobalBaseType * APRSStream::NewStreamOutputDataInstance ( )

return an instance of the stream output data ( here a PRSKey )
used by the channel to work on output data ( mixing, offset ... )

◆ SameData()

bool APRSStream::SameData ( LocalToGlobalBaseType *  data,
LocalToGlobalBaseType *  other_data 

do : data == other_data

◆ SetAndModifyData()

void APRSStream::SetAndModifyData ( LocalToGlobalBaseType *  currentData,
LocalToGlobalBaseType *  goalData,
LocalToGlobalBaseType *  startAnimData 
  • currentData is the the current PRSKey in the global coordinate space
  • goalData is the global PRSKey where we would like the current PRSKey to move to
  • startAnimData is the PRSKey where the animation started at the end of the last loop
  • the animation moved the root PRSKey from startAnimData to currentData
  • this method computes a new startAnimData so that at the current time, the animation will move the PRSKey precisely to the goal PRSKey.
  • as an example this method allows to rotate around the current root PRSKey instead of rotating around the startAnim Key.
  • at the end the currentData is set to the given goadData

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