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

# Lamp::RotationInterpolationCompressor Class Reference

回転補間圧縮 More...

`#include <RotationInterpolationCompressor.h>`

List of all members.

## Public Member Functions
| RotationInterpolationCompressor ()
| コンストラクタ
virtual | ~RotationInterpolationCompressor ()
| デストラクタ
virtual RotationInterpolator * | compress (EulerArrayInterpolator *source, float tolerance)
| 圧縮
virtual RotationInterpolator * | compress (QuaternionArrayInterpolator *source, float tolerance)
| 圧縮
virtual float | getTolerance () const
| 許容誤差の取得
virtual float | getLength () const
| 長さの取得
virtual int | getSourceKeyCount () const
| ソースキー数の取得
virtual int | getSourceSize () const
| ソースサイズの取得
virtual int | getCompressedKeyCount () const
| 圧縮後キー数の取得
virtual int | getCompressedSize () const
| 圧縮後サイズの取得
virtual float | getCompressionRate () const
| 圧縮率の取得
virtual String | getResultString () const
| 結果文字列の取得
## Protected Member Functions
virtual void | compressSetup (QuaternionArrayInterpolator *source, float tolerance)
| 圧縮準備
virtual RotationInterpolator * | compressConstant (QuaternionArrayInterpolator *source)
| 定数圧縮
virtual RotationInterpolator * | compressLinear (QuaternionArrayInterpolator *source)
| 線形圧縮
virtual void | recalcLinearError (QuaternionArrayInterpolator *source, LinearKey &preKey, LinearKey &key, LinearKey &postKey)
| 線形圧縮誤差の再計算
virtual void | setCompressedData (int compressedKeyCount, int compressedKeySize)
| 圧縮結果の設定
## Static Protected Attributes
const int | sourceKeySize_ = sizeof(Quaternion)
| ソースキーサイズ

## Detailed Description

回転補間圧縮

Definition at line 38 of file RotationInterpolationCompressor.h.

## Member Function Documentation

RotationInterpolator * Lamp::RotationInterpolationCompressor::compress | ( | QuaternionArrayInterpolator * | source,
|  | float | tolerance
| ) | `[virtual]`

  | 圧縮 Parameters:
  source | 圧縮を行う四元数回転配列補間
  tolerance | 許容誤差の角度をラジアンで指定する
Returns: 圧縮を行った回転補間 Definition at line 62 of file RotationInterpolationCompressor.cpp. References compressConstant(), compressLinear(), compressSetup(), Lamp::QuaternionArrayInterpolator::duplicate(), getSourceKeyCount(), NULL, setCompressedData(), and sourceKeySize_.

RotationInterpolator * Lamp::RotationInterpolationCompressor::compress | ( | EulerArrayInterpolator * | source,
|  | float | tolerance
| ) | `[virtual]`

  | 圧縮 Parameters:
  source | 圧縮を行うオイラー回転配列補間
  tolerance | 許容誤差の角度をラジアンで指定する
Returns: 圧縮を行った回転補間 Definition at line 51 of file RotationInterpolationCompressor.cpp. References Lamp::EulerArrayInterpolator::convertQuaternionArrayInterpolator(). Referenced by Lamp::AnimationCompressor::compressRotation().

RotationInterpolator * Lamp::RotationInterpolationCompressor::compressConstant | ( | QuaternionArrayInterpolator * | source | ) | `[protected, virtual]`

  | 定数圧縮 Parameters:
  source | 圧縮を行う四元数回転配列補間
Returns: 圧縮結果、失敗ならNULL Definition at line 98 of file RotationInterpolationCompressor.cpp. References Assert, Lamp::Quaternion::dotProduct(), getLength(), getTolerance(), Lamp::QuaternionArrayInterpolator::getValue(), Lamp::Quaternion::isUnit(), NULL, setCompressedData(), Lamp::RotationConstantInterpolator::setLength(), and Lamp::RotationConstantInterpolator::setQuaternion(). Referenced by compress().

RotationInterpolator * Lamp::RotationInterpolationCompressor::compressLinear | ( | QuaternionArrayInterpolator * | source | ) | `[protected, virtual]`

  | 線形圧縮 Parameters:
  source | 圧縮を行う四元数回転配列補間
Returns: 圧縮結果、失敗ならNULL Definition at line 122 of file RotationInterpolationCompressor.cpp. References Assert, Lamp::Quaternion::dotProduct(), Lamp::RotationInterpolationCompressor::LinearKey::errorCos_, Lamp::Deque< Type >::getCount(), getLength(), getSourceKeyCount(), getSourceSize(), getTolerance(), Lamp::QuaternionArrayInterpolator::getValue(), NULL, Lamp::Deque< Type >::pushBack(), recalcLinearError(), Lamp::Deque< Type >::remove(), setCompressedData(), Lamp::QuaternionLinearInterpolator::setKey(), Lamp::QuaternionLinearInterpolator::setKeyCount(), Lamp::RotationInterpolationCompressor::LinearKey::time_, and Lamp::RotationInterpolationCompressor::LinearKey::value_. Referenced by compress().

void Lamp::RotationInterpolationCompressor::compressSetup | ( | QuaternionArrayInterpolator * | source,
|  | float | tolerance
| ) | `[protected, virtual]`

  | 圧縮準備 Parameters:
  source | 圧縮を行う四元数回転配列補間
  tolerance | 許容誤差
Definition at line 87 of file RotationInterpolationCompressor.cpp. References Assert, Lamp::QuaternionArrayInterpolator::getLength(), Lamp::QuaternionArrayInterpolator::getSize(), and NULL. Referenced by compress().

virtual int Lamp::RotationInterpolationCompressor::getCompressedKeyCount | ( |  | ) | const`[inline, virtual]`

| 圧縮後キー数の取得 Returns: 圧縮後キー数 Definition at line 110 of file RotationInterpolationCompressor.h. Referenced by getCompressedSize(), and getResultString().

virtual int Lamp::RotationInterpolationCompressor::getCompressedSize | ( |  | ) | const`[inline, virtual]`

| 圧縮後サイズの取得 Returns: 圧縮後サイズ Definition at line 116 of file RotationInterpolationCompressor.h. References getCompressedKeyCount(). Referenced by getCompressionRate(), and getResultString().

virtual float Lamp::RotationInterpolationCompressor::getCompressionRate | ( |  | ) | const`[inline, virtual]`

| 圧縮率の取得 Returns: 圧縮率 Definition at line 125 of file RotationInterpolationCompressor.h. References getCompressedSize(), and getSourceSize(). Referenced by getResultString().

virtual float Lamp::RotationInterpolationCompressor::getLength | ( |  | ) | const`[inline, virtual]`

| 長さの取得 Returns: 長さ Definition at line 88 of file RotationInterpolationCompressor.h. Referenced by compressConstant(), compressLinear(), and getResultString().

String Lamp::RotationInterpolationCompressor::getResultString | ( |  | ) | const`[virtual]`

| 結果文字列の取得 Returns: 結果文字列 Definition at line 235 of file RotationInterpolationCompressor.cpp. References Lamp::String::format(), getCompressedKeyCount(), getCompressedSize(), getCompressionRate(), getLength(), getSourceKeyCount(), and getSourceSize().

virtual int Lamp::RotationInterpolationCompressor::getSourceKeyCount | ( |  | ) | const`[inline, virtual]`

| ソースキー数の取得 Returns: ソースキー数 Definition at line 95 of file RotationInterpolationCompressor.h. Referenced by compress(), compressLinear(), getResultString(), and getSourceSize().

virtual int Lamp::RotationInterpolationCompressor::getSourceSize | ( |  | ) | const`[inline, virtual]`

| ソースサイズの取得 Returns: ソースサイズ Definition at line 101 of file RotationInterpolationCompressor.h. References getSourceKeyCount(), and sourceKeySize_. Referenced by compressLinear(), getCompressionRate(), and getResultString().

virtual float Lamp::RotationInterpolationCompressor::getTolerance | ( |  | ) | const`[inline, virtual]`

| 許容誤差の取得 Returns: 許容誤差 Definition at line 82 of file RotationInterpolationCompressor.h. Referenced by compressConstant(), and compressLinear().

void Lamp::RotationInterpolationCompressor::recalcLinearError | ( | QuaternionArrayInterpolator * | source,
|  | LinearKey & | preKey,
|  | LinearKey & | key,
|  | LinearKey & | postKey
| ) | `[protected, virtual]`

  | 線形圧縮誤差の再計算 Parameters:
  source | 圧縮を行う四元数回転配列補間
  preKey | 前のキー
  key | 再計算するキー
  postKey | 後ろのキー
Definition at line 210 of file RotationInterpolationCompressor.cpp. References Lamp::Quaternion::dotProduct(), Lamp::RotationInterpolationCompressor::LinearKey::errorCos_, Lamp::QuaternionArrayInterpolator::getValue(), Lamp::RotationInterpolationCompressor::LinearKey::time_, and Lamp::RotationInterpolationCompressor::LinearKey::value_. Referenced by compressLinear().

virtual void Lamp::RotationInterpolationCompressor::setCompressedData | ( | int | compressedKeyCount,
|  | int | compressedKeySize
| ) | `[inline, protected, virtual]`

  | 圧縮結果の設定 Parameters:
  compressedKeyCount | 圧縮後キー数
  compressedKeySize | 圧縮後キーサイズ
Definition at line 192 of file RotationInterpolationCompressor.h. Referenced by compress(), compressConstant(), and compressLinear().

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

- RotationInterpolationCompressor.h
- RotationInterpolationCompressor.cpp