Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Lamp::BinaryAnimationSaver Class Reference

バイナリアニメーションセーバ More...

`#include <BinaryAnimationSaver.h>`

List of all members.

## Public Member Functions
| BinaryAnimationSaver ()
| コンストラクタ
virtual | ~BinaryAnimationSaver ()
| デストラクタ
virtual void | save (const String &filePath, AnimationManager *manager)
| セーブ
virtual void | save (BinaryWriter *binaryWriter, AnimationManager *manager)
| セーブ
## Protected Member Functions
virtual void | writeHeader ()
| ヘッダの書き出し
virtual int | countObjects ()
| オブジェクトのカウント
virtual void | clearObjectCount ()
| オブジェクトカウンタのクリア
virtual void | writeAnimationList ()
| アニメーションリストの書き出し
virtual void | writeAnimationSet (AnimationSet *animation)
| アニメーションセットの書き出し
virtual void | writeCameraAnimation (CameraAnimation *animation)
| カメラアニメーションの書き出し
virtual void | writeCameraAnimationData (CameraAnimationData *data)
| カメラアニメーションデータの書き出し
virtual void | writeSceneNodeAnimation (SceneNodeAnimation *animation)
| シーンノードアニメーションの書き出し
virtual void | writeSceneNodeAnimationData (SceneNodeAnimationData *data)
| シーンノードアニメーションデータの書き出し
virtual void | writeCharacterModelAnimation (CharacterModelAnimation *animation)
| キャラクタモデルアニメーションの書き出し
virtual void | writeCharacterModelAnimationData (CharacterModelAnimationData *data)
| キャラクタモデルアニメーションデータの書き出し
virtual void | writeLink ()
| リンクの書き出し
virtual void | writeAnimationSetLink (AnimationSet *animation)
| アニメーションセットリンクの書き出し
virtual void | writeCameraAnimationLink (CameraAnimation *animation)
| カメラアニメーションリンクの書き出し
virtual void | writeSceneNodeAnimationLink (SceneNodeAnimation *animation)
| シーンノードアニメーションリンクの書き出し
virtual void | writeCharacterModelAnimationLink (CharacterModelAnimation *animation)
| キャラクタモデルアニメーションリンクの書き出し
virtual void | writeString (const String &string)
| 文字列の書き出し
virtual void | writeVector3 (const Vector3 &vector)
| 三次元ベクトルの書き出し
virtual void | writeQuaternion (const Quaternion &quaternion)
| 四元数の書き出し
virtual void | writeVectorInterpolator (VectorInterpolator *interpolator)
| ベクトル補間の書き出し
virtual void | writeVectorConstantInterpolator (VectorConstantInterpolator *interpolator)
| ベクトル定数補間の書き出し
virtual void | writeVectorArrayInterpolator (VectorArrayInterpolator *interpolator)
| ベクトル配列補間の書き出し
virtual void | writeVectorLinearInterpolator (VectorLinearInterpolator *interpolator)
| ベクトル線形補間の書き出し
virtual void | writeRotationInterpolator (RotationInterpolator *interpolator)
| 回転補間の書き出し
virtual void | writeRotationConstantInterpolator (RotationConstantInterpolator *interpolator)
| 回転定数補間の書き出し
virtual void | writeEulerArrayInterpolator (EulerArrayInterpolator *interpolator)
| オイラー回転配列補間の書き出し
virtual void | writeQuaternionArrayInterpolator (QuaternionArrayInterpolator *interpolator)
| 四元数回転配列補間の書き出し
virtual void | writeQuaternionLinearInterpolator (QuaternionLinearInterpolator *interpolator)
| 四元数回転線形補間の書き出し
virtual void | align ()
| アライメントを取る
virtual int | startBlock (const String &blockName)
| ブロックの開始
virtual void | endBlock (int blockStartAddress, int objectCount)
| ブロックの終了
## Protected Attributes
BinaryWriter * | writer_
| ライタ
AnimationManager * | manager_
| アニメーションマネージャ
int | animationCount_
| アニメーションカウント
int | animationDataCount_
| アニメーションデータカウント
int | animationSetCount_
| アニメーションセットカウント
int | cameraCount_
| カメラアニメーションカウント
int | cameraDataCount_
| カメラアニメーションデータカウント
int | sceneNodeCount_
| シーンノードアニメーションカウント
int | sceneNodeDataCount_
| シーンノードアニメーションデータカウント
int | characterModelCount_
| キャラクタモデルアニメーションカウント
int | characterModelDataCount_
| キャラクタモデルアニメーションデータカウント

## Detailed Description

バイナリアニメーションセーバ

Definition at line 54 of file BinaryAnimationSaver.h.

## Member Function Documentation

int Lamp::BinaryAnimationSaver::countObjects | ( |  | ) | `[protected, virtual]`

| オブジェクトのカウント Returns: オブジェクト数 Definition at line 91 of file BinaryAnimationSaver.cpp. References animationCount_, animationDataCount_, animationSetCount_, cameraCount_, cameraDataCount_, characterModelCount_, characterModelDataCount_, clearObjectCount(), ErrorOut, Lamp::AnimationManager::get(), Lamp::AnimationManager::getCount(), Lamp::AnimationManager::getData(), Lamp::AnimationManager::getDataCount(), Lamp::Animation::isAnimationSet(), Lamp::Animation::isCameraAnimation(), Lamp::AnimationData::isCameraAnimationData(), Lamp::Animation::isCharacterModelAnimation(), Lamp::AnimationData::isCharacterModelAnimationData(), Lamp::Animation::isSceneNodeAnimation(), Lamp::AnimationData::isSceneNodeAnimationData(), manager_, sceneNodeCount_, and sceneNodeDataCount_. Referenced by save().

void Lamp::BinaryAnimationSaver::endBlock | ( | int | blockStartAddress,
|  | int | objectCount
| ) | `[protected, virtual]`

  | ブロックの終了 Parameters:
  blockStartAddress | ブロック開始位置
  objectCount | オブジェクト数
Definition at line 624 of file BinaryAnimationSaver.cpp. References align(), Lamp::Writer::getPosition(), Lamp::Writer::setPosition(), Lamp::BinaryWriter::writeInt(), and writer_. Referenced by writeAnimationList(), and writeLink().

void Lamp::BinaryAnimationSaver::save | ( | BinaryWriter * | binaryWriter,
|  | AnimationManager * | manager
| ) | `[virtual]`

  | セーブ Parameters:
  binaryWriter | バイナリライタ
  manager | セーブするアニメーションマネージャ
Definition at line 64 of file BinaryAnimationSaver.cpp. References Assert, countObjects(), manager_, NULL, writeAnimationList(), writeHeader(), writeLink(), and writer_.

void Lamp::BinaryAnimationSaver::save | ( | const String & | filePath,
|  | AnimationManager * | manager
| ) | `[virtual]`

  | セーブ Parameters:
  filePath | ファイルパス
  manager | セーブするアニメーションマネージャ
Definition at line 56 of file BinaryAnimationSaver.cpp.

int Lamp::BinaryAnimationSaver::startBlock | ( | const String & | blockName | ) | `[protected, virtual]`

  | ブロックの開始 Parameters:
  blockName | ブロック名
Returns: プロック開始位置 Definition at line 612 of file BinaryAnimationSaver.cpp. References align(), Lamp::Writer::getPosition(), Lamp::BinaryWriter::writeInt(), writer_, and writeString(). Referenced by writeAnimationList(), and writeLink().

void Lamp::BinaryAnimationSaver::writeAnimationSet | ( | AnimationSet * | animation | ) | `[protected, virtual]`

  | アニメーションセットの書き出し Parameters:
  animation | 書き出すアニメーションセット
Definition at line 219 of file BinaryAnimationSaver.cpp. References align(), Lamp::Animation::getName(), Lamp::Animation::isEnabled(), Lamp::BinaryWriter::writeBool(), writer_, and writeString(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeAnimationSetLink | ( | AnimationSet * | animation | ) | `[protected, virtual]`

  | アニメーションセットリンクの書き出し Parameters:
  animation | リンクを書き出すアニメーションセット
Definition at line 411 of file BinaryAnimationSaver.cpp. References align(), Lamp::AnimationSet::getAnimation(), Lamp::AnimationSet::getAnimationCount(), Lamp::Animation::getName(), Lamp::BinaryWriter::writeInt(), writer_, and writeString(). Referenced by writeLink().

void Lamp::BinaryAnimationSaver::writeCameraAnimation | ( | CameraAnimation * | animation | ) | `[protected, virtual]`

  | カメラアニメーションの書き出し Parameters:
  animation | 書き出すカメラアニメーション
Definition at line 231 of file BinaryAnimationSaver.cpp. References align(), Lamp::Animation::getName(), Lamp::ObjectAnimation::getTargetName(), Lamp::Animation::isEnabled(), Lamp::BinaryWriter::writeBool(), writer_, and writeString(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeCameraAnimationData | ( | CameraAnimationData * | data | ) | `[protected, virtual]`

  | カメラアニメーションデータの書き出し Parameters:
  data | 書き出すカメラアニメーションデータ
Definition at line 243 of file BinaryAnimationSaver.cpp. References align(), Lamp::AnimationData::getName(), Lamp::CameraAnimationData::getRotation(), Lamp::CameraAnimationData::getSequenceCount(), Lamp::CameraAnimationData::getTranslation(), Lamp::AnimationData::isLooped(), Lamp::BinaryWriter::writeBool(), Lamp::BinaryWriter::writeInt(), writer_, writeRotationInterpolator(), writeString(), and writeVectorInterpolator(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeCameraAnimationLink | ( | CameraAnimation * | animation | ) | `[protected, virtual]`

  | カメラアニメーションリンクの書き出し Parameters:
  animation | リンクを書き出すカメラアニメーション
Definition at line 425 of file BinaryAnimationSaver.cpp. References align(), Lamp::CameraAnimation::getAnimationData(), Lamp::AnimationData::getName(), Lamp::Animation::getName(), and writeString(). Referenced by writeLink().

void Lamp::BinaryAnimationSaver::writeCharacterModelAnimation | ( | CharacterModelAnimation * | animation | ) | `[protected, virtual]`

  | キャラクタモデルアニメーションの書き出し Parameters:
  animation | 書き出すキャラクタモデルアニメーション
Definition at line 308 of file BinaryAnimationSaver.cpp. References align(), Lamp::CharacterModelAnimation::getBoneCount(), Lamp::CharacterModelAnimation::getBoneName(), Lamp::Animation::getName(), Lamp::ObjectAnimation::getTargetName(), Lamp::Animation::isEnabled(), Lamp::BinaryWriter::writeBool(), Lamp::BinaryWriter::writeInt(), writer_, and writeString(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeCharacterModelAnimationData | ( | CharacterModelAnimationData * | data | ) | `[protected, virtual]`

  | キャラクタモデルアニメーションデータの書き出し Parameters:
  data | 書き出すキャラクタモデルアニメーションデータ
Definition at line 328 of file BinaryAnimationSaver.cpp. References align(), Lamp::CharacterModelAnimationData::getBoneCount(), Lamp::AnimationData::getName(), Lamp::CharacterModelAnimationData::getRotation(), Lamp::CharacterModelAnimationData::getScale(), Lamp::CharacterModelAnimationData::getSequenceCount(), Lamp::CharacterModelAnimationData::getTranslation(), Lamp::AnimationData::isLooped(), Lamp::BinaryWriter::writeBool(), Lamp::BinaryWriter::writeInt(), writer_, writeRotationInterpolator(), writeString(), and writeVectorInterpolator(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeCharacterModelAnimationLink | ( | CharacterModelAnimation * | animation | ) | `[protected, virtual]`

  | キャラクタモデルアニメーションリンクの書き出し Parameters:
  animation | リンクを書き出すキャラクタモデルアニメーション
Definition at line 447 of file BinaryAnimationSaver.cpp. References align(), Lamp::CharacterModelAnimation::getAnimationData(), Lamp::AnimationData::getName(), Lamp::Animation::getName(), and writeString(). Referenced by writeLink().

void Lamp::BinaryAnimationSaver::writeEulerArrayInterpolator | ( | EulerArrayInterpolator * | interpolator | ) | `[protected, virtual]`

  | オイラー回転配列補間の書き出し Parameters:
  interpolator | オイラー回転配列補間
Definition at line 574 of file BinaryAnimationSaver.cpp. References Lamp::EulerArrayInterpolator::getSize(), Lamp::EulerArrayInterpolator::getValue(), Lamp::BinaryWriter::writeInt(), writer_, and writeVector3(). Referenced by writeRotationInterpolator().

void Lamp::BinaryAnimationSaver::writeQuaternion | ( | const Quaternion & | quaternion | ) | `[protected, virtual]`

  | 四元数の書き出し Parameters:
  quaternion | 四元数
Definition at line 473 of file BinaryAnimationSaver.cpp. References Lamp::Quaternion::array, Lamp::Writer::writeBytes(), and writer_. Referenced by writeQuaternionArrayInterpolator(), writeQuaternionLinearInterpolator(), and writeRotationConstantInterpolator().

void Lamp::BinaryAnimationSaver::writeQuaternionArrayInterpolator | ( | QuaternionArrayInterpolator * | interpolator | ) | `[protected, virtual]`

  | 四元数回転配列補間の書き出し Parameters:
  interpolator | 四元数回転配列補間
Definition at line 583 of file BinaryAnimationSaver.cpp. References Lamp::QuaternionArrayInterpolator::getSize(), Lamp::QuaternionArrayInterpolator::getValue(), Lamp::BinaryWriter::writeInt(), writeQuaternion(), and writer_. Referenced by writeRotationInterpolator().

void Lamp::BinaryAnimationSaver::writeQuaternionLinearInterpolator | ( | QuaternionLinearInterpolator * | interpolator | ) | `[protected, virtual]`

  | 四元数回転線形補間の書き出し Parameters:
  interpolator | 四元数回転線形補間
Definition at line 592 of file BinaryAnimationSaver.cpp. References Lamp::QuaternionLinearInterpolator::getKeyCount(), Lamp::QuaternionLinearInterpolator::getTime(), Lamp::QuaternionLinearInterpolator::getValue(), Lamp::BinaryWriter::writeFloat(), Lamp::BinaryWriter::writeInt(), writeQuaternion(), and writer_. Referenced by writeRotationInterpolator().

void Lamp::BinaryAnimationSaver::writeRotationConstantInterpolator | ( | RotationConstantInterpolator * | interpolator | ) | `[protected, virtual]`

  | 回転定数補間の書き出し Parameters:
  interpolator | 回転定数補間
Definition at line 565 of file BinaryAnimationSaver.cpp. References Lamp::RotationConstantInterpolator::getLength(), Lamp::RotationConstantInterpolator::getQuaternion(), Lamp::BinaryWriter::writeFloat(), writeQuaternion(), and writer_. Referenced by writeRotationInterpolator().

void Lamp::BinaryAnimationSaver::writeRotationInterpolator | ( | RotationInterpolator * | interpolator | ) | `[protected, virtual]`

  | 回転補間の書き出し Parameters:
  interpolator | 回転補間
Definition at line 537 of file BinaryAnimationSaver.cpp. References Lamp::RotationInterpolator::castEulerArrayInterpolator(), Lamp::RotationInterpolator::castQuaternionArrayInterpolator(), Lamp::RotationInterpolator::castQuaternionLinearInterpolator(), Lamp::RotationInterpolator::castRotationConstantInterpolator(), ErrorOut, Lamp::RotationInterpolator::isEulerArrayInterpolator(), Lamp::RotationInterpolator::isQuaternionArrayInterpolator(), Lamp::RotationInterpolator::isQuaternionLinearInterpolator(), Lamp::RotationInterpolator::isRotationConstantInterpolator(), NULL, writeEulerArrayInterpolator(), Lamp::BinaryWriter::writeInt(), writeQuaternionArrayInterpolator(), writeQuaternionLinearInterpolator(), writer_, and writeRotationConstantInterpolator(). Referenced by writeCameraAnimationData(), writeCharacterModelAnimationData(), and writeSceneNodeAnimationData().

void Lamp::BinaryAnimationSaver::writeSceneNodeAnimation | ( | SceneNodeAnimation * | animation | ) | `[protected, virtual]`

  | シーンノードアニメーションの書き出し Parameters:
  animation | 書き出すシーンノードアニメーション
Definition at line 268 of file BinaryAnimationSaver.cpp. References align(), Lamp::Animation::getName(), Lamp::ObjectAnimation::getTargetName(), Lamp::Animation::isEnabled(), Lamp::BinaryWriter::writeBool(), writer_, and writeString(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeSceneNodeAnimationData | ( | SceneNodeAnimationData * | data | ) | `[protected, virtual]`

  | シーンノードアニメーションデータの書き出し Parameters:
  data | 書き出すシーンノードアニメーションデータ
Definition at line 281 of file BinaryAnimationSaver.cpp. References align(), Lamp::AnimationData::getName(), Lamp::SceneNodeAnimationData::getRotation(), Lamp::SceneNodeAnimationData::getScale(), Lamp::SceneNodeAnimationData::getSequenceCount(), Lamp::SceneNodeAnimationData::getTranslation(), Lamp::AnimationData::isLooped(), Lamp::BinaryWriter::writeBool(), Lamp::BinaryWriter::writeInt(), writer_, writeRotationInterpolator(), writeString(), and writeVectorInterpolator(). Referenced by writeAnimationList().

void Lamp::BinaryAnimationSaver::writeSceneNodeAnimationLink | ( | SceneNodeAnimation * | animation | ) | `[protected, virtual]`

  | シーンノードアニメーションリンクの書き出し Parameters:
  animation | リンクを書き出すシーンノードアニメーション
Definition at line 436 of file BinaryAnimationSaver.cpp. References align(), Lamp::SceneNodeAnimation::getAnimationData(), Lamp::AnimationData::getName(), Lamp::Animation::getName(), and writeString(). Referenced by writeLink().

void Lamp::BinaryAnimationSaver::writeString | ( | const String & | string | ) | `[protected, virtual]`

  | 文字列の書き出し Parameters:
  string | 文字列
Definition at line 460 of file BinaryAnimationSaver.cpp. References align(), Lamp::String::getBytes(), Lamp::String::getSize(), Lamp::Writer::writeBytes(), Lamp::BinaryWriter::writeInt(), and writer_. Referenced by startBlock(), writeAnimationSet(), writeAnimationSetLink(), writeCameraAnimation(), writeCameraAnimationData(), writeCameraAnimationLink(), writeCharacterModelAnimation(), writeCharacterModelAnimationData(), writeCharacterModelAnimationLink(), writeHeader(), writeSceneNodeAnimation(), writeSceneNodeAnimationData(), and writeSceneNodeAnimationLink().

void Lamp::BinaryAnimationSaver::writeVector3 | ( | const Vector3 & | vector | ) | `[protected, virtual]`

  | 三次元ベクトルの書き出し Parameters:
  vector | 三次元ベクトル
Definition at line 468 of file BinaryAnimationSaver.cpp. References Lamp::Vector3::array, Lamp::Writer::writeBytes(), and writer_. Referenced by writeEulerArrayInterpolator(), writeVectorArrayInterpolator(), writeVectorConstantInterpolator(), and writeVectorLinearInterpolator().

void Lamp::BinaryAnimationSaver::writeVectorArrayInterpolator | ( | VectorArrayInterpolator * | interpolator | ) | `[protected, virtual]`

  | ベクトル配列補間の書き出し Parameters:
  interpolator | ベクトル配列補間
Definition at line 514 of file BinaryAnimationSaver.cpp. References Lamp::VectorArrayInterpolator::getSize(), Lamp::VectorArrayInterpolator::getValue(), Lamp::BinaryWriter::writeInt(), writer_, and writeVector3(). Referenced by writeVectorInterpolator().

void Lamp::BinaryAnimationSaver::writeVectorConstantInterpolator | ( | VectorConstantInterpolator * | interpolator | ) | `[protected, virtual]`

  | ベクトル定数補間の書き出し Parameters:
  interpolator | ベクトル定数補間
Definition at line 505 of file BinaryAnimationSaver.cpp. References Lamp::VectorConstantInterpolator::getLength(), Lamp::VectorConstantInterpolator::getValue(), Lamp::BinaryWriter::writeFloat(), writer_, and writeVector3(). Referenced by writeVectorInterpolator().

void Lamp::BinaryAnimationSaver::writeVectorInterpolator | ( | VectorInterpolator * | interpolator | ) | `[protected, virtual]`

  | ベクトル補間の書き出し Parameters:
  interpolator | ベクトル補間
Definition at line 480 of file BinaryAnimationSaver.cpp. References Lamp::VectorInterpolator::castVectorArrayInterpolator(), Lamp::VectorInterpolator::castVectorConstantInterpolator(), Lamp::VectorInterpolator::castVectorLinearInterpolator(), ErrorOut, Lamp::VectorInterpolator::isVectorArrayInterpolator(), Lamp::VectorInterpolator::isVectorConstantInterpolator(), Lamp::VectorInterpolator::isVectorLinearInterpolator(), NULL, Lamp::BinaryWriter::writeInt(), writer_, writeVectorArrayInterpolator(), writeVectorConstantInterpolator(), and writeVectorLinearInterpolator(). Referenced by writeCameraAnimationData(), writeCharacterModelAnimationData(), and writeSceneNodeAnimationData().

void Lamp::BinaryAnimationSaver::writeVectorLinearInterpolator | ( | VectorLinearInterpolator * | interpolator | ) | `[protected, virtual]`

  | ベクトル線形補間の書き出し Parameters:
  interpolator | ベクトル線形補間
Definition at line 523 of file BinaryAnimationSaver.cpp. References Lamp::VectorLinearInterpolator::getKeyCount(), Lamp::VectorLinearInterpolator::getTime(), Lamp::VectorLinearInterpolator::getValue(), Lamp::BinaryWriter::writeFloat(), Lamp::BinaryWriter::writeInt(), writer_, and writeVector3(). Referenced by writeVectorInterpolator().

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

- BinaryAnimationSaver.h
- BinaryAnimationSaver.cpp