Main Page · Modules · All Classes · Class Hierarchy
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
MASkit Class Reference

Skit class to decode aib format. More...

#include <MASkit.hpp>

Public Member Functions

 MASkit (const std::string &name, MA::MotionSkitSPtr motion, MA::LedSkitSPtr led, MC::BinaryDataSPtr sound)
 Create a skit from raw data. More...
 
std::string GetName () const
 Get the skit name. More...
 
int GetAudioStart () const
 Get the audio effect start time. More...
 
int GetAudioDuration () const
 Get the audio duration. More...
 
int GetDuration () const
 Get the skit duration. More...
 
void Dump () const
 Print the skit content.
 
MA::MotionSkitSPtr GetMotionSkit ()
 Get the motion skit. More...
 
MA::LedSkitSPtr GetLedSkit ()
 Get the LED skit. More...
 
MC::BinaryDataSPtr GetSoundData ()
 Get the sound data. More...
 
MA::SkitSPtr CloneMirrored (const std::string &mirrored_name)
 Creates a new skit with mirrored leg joint trajectories between left and right sides. More...
 

Static Public Member Functions

static MCBinaryDataEncodeMtnToAibFormat (const MCBinaryData &motion_data)
 Encode motion data (mtn) to aib format. More...
 
static MASkitDecodeAibData (const MCBinaryData &binary_data)
 Load a skit from binary data. More...
 

Static Private Member Functions

static int GetAudioStartFromSkitterInfo (const MCBinaryData &binary_data)
 Get the audio effect start from Skitter info format. More...
 

Private Attributes

std::string Name
 Skit name.
 
MA::MotionSkitSPtr MotionSkit
 Motion skit.
 
MA::LedSkitSPtr LedSkit
 Led skit.
 
MC::BinaryDataSPtr SoundData
 Sound skit binary data.
 
int AudioStart
 Audio start time in msec.
 

Detailed Description

Skit class to decode aib format.

Definition at line 44 of file MASkit.hpp.

Constructor & Destructor Documentation

MASkit::MASkit ( const std::string &  name,
MA::MotionSkitSPtr  motion,
MA::LedSkitSPtr  led,
MC::BinaryDataSPtr  sound 
)

Create a skit from raw data.

Parameters
nameSkit name
motionMotion skit
ledLed skit
soundSound skit

Definition at line 60 of file MASkit.cpp.

Member Function Documentation

MA::SkitSPtr MASkit::CloneMirrored ( const std::string &  mirrored_name)

Creates a new skit with mirrored leg joint trajectories between left and right sides.

Parameters
mirrored_nameNew name for the mirrored skit
Returns
New skit if the current skit has motions otherwise empty shared pointer.

Definition at line 147 of file MASkit.cpp.

MASkit * MASkit::DecodeAibData ( const MCBinaryData binary_data)
static

Load a skit from binary data.

Parameters
binary_dataBinary data
Returns
Decoded skit if it is successful otherwise NULL.

Definition at line 203 of file MASkit.cpp.

MCBinaryData * MASkit::EncodeMtnToAibFormat ( const MCBinaryData motion_data)
static

Encode motion data (mtn) to aib format.

Parameters
motion_dataMotion data
Returns
Encoded skit data if it is successful otherwise NULL.

Definition at line 165 of file MASkit.cpp.

int MASkit::GetAudioDuration ( ) const

Get the audio duration.

Returns
Audio duration in the skit (in msec)

Definition at line 79 of file MASkit.cpp.

int MASkit::GetAudioStart ( ) const

Get the audio effect start time.

Returns
Start time in msec otherwise -1.

Definition at line 73 of file MASkit.cpp.

int MASkit::GetAudioStartFromSkitterInfo ( const MCBinaryData binary_data)
staticprivate

Get the audio effect start from Skitter info format.

Parameters
binary_dataBinary data
Returns
Decoded audio effect start in msec

Definition at line 303 of file MASkit.cpp.

int MASkit::GetDuration ( ) const

Get the skit duration.

Returns
Skit duration (in msec)

Definition at line 85 of file MASkit.cpp.

MA::LedSkitSPtr MASkit::GetLedSkit ( )

Get the LED skit.

Returns
LED skit otherwise empty shared pointer.

Definition at line 135 of file MASkit.cpp.

MA::MotionSkitSPtr MASkit::GetMotionSkit ( )

Get the motion skit.

Returns
Motion skit otherwise empty shared pointer.

Definition at line 129 of file MASkit.cpp.

std::string MASkit::GetName ( ) const

Get the skit name.

Returns
Skit name

Definition at line 67 of file MASkit.cpp.

MC::BinaryDataSPtr MASkit::GetSoundData ( )

Get the sound data.

Returns
Sound data

Definition at line 141 of file MASkit.cpp.


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