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

Lamp::VectorInterpolationCompressor Class Reference

ベクトル補間圧縮 More...

#include <VectorInterpolationCompressor.h>

List of all members.

Public Member Functions

 VectorInterpolationCompressor ()
 コンストラクタ

virtual ~VectorInterpolationCompressor ()
 デストラクタ

virtual VectorInterpolatorcompress (VectorArrayInterpolator *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 (VectorArrayInterpolator *source, float tolerance)
 圧縮準備

virtual VectorInterpolatorcompressConstant (VectorArrayInterpolator *source)
 定数圧縮

virtual VectorInterpolatorcompressLinear (VectorArrayInterpolator *source)
 線形圧縮

virtual void recalcLinearError (VectorArrayInterpolator *source, LinearKey &preKey, LinearKey &key, LinearKey &postKey)
 線形圧縮誤差の再計算

virtual void setCompressedData (int compressedKeyCount, int compressedKeySize)
 圧縮結果の設定


Static Protected Attributes

const int sourceKeySize_ = sizeof(Vector3)
 ソースキーサイズ


Detailed Description

ベクトル補間圧縮

Definition at line 37 of file VectorInterpolationCompressor.h.


Member Function Documentation

VectorInterpolator * Lamp::VectorInterpolationCompressor::compress VectorArrayInterpolator source,
float  tolerance
[virtual]
 

圧縮

Parameters:
source 圧縮を行うベクトル配列補間
tolerance 許容誤差
Returns:
圧縮を行ったベクトル補間

Definition at line 50 of file VectorInterpolationCompressor.cpp.

References compressConstant(), compressLinear(), compressSetup(), Lamp::VectorArrayInterpolator::duplicate(), getSourceKeyCount(), NULL, setCompressedData(), and sourceKeySize_.

Referenced by Lamp::AnimationCompressor::compressScale(), and Lamp::AnimationCompressor::compressTranslation().

VectorInterpolator * Lamp::VectorInterpolationCompressor::compressConstant VectorArrayInterpolator source  )  [protected, virtual]
 

定数圧縮

Parameters:
source 圧縮を行うベクトル配列補間
Returns:
圧縮結果、失敗ならNULL

Definition at line 85 of file VectorInterpolationCompressor.cpp.

References Lamp::AxisAlignedBox::getCenter(), getLength(), Lamp::Vector3::getSquaredLength(), getTolerance(), Lamp::VectorArrayInterpolator::getValue(), Lamp::AxisAlignedBox::merge(), NULL, setCompressedData(), Lamp::VectorConstantInterpolator::setLength(), and Lamp::VectorConstantInterpolator::setValue().

Referenced by compress().

VectorInterpolator * Lamp::VectorInterpolationCompressor::compressLinear VectorArrayInterpolator source  )  [protected, virtual]
 

線形圧縮

Parameters:
source 圧縮を行うベクトル配列補間
Returns:
圧縮結果、失敗ならNULL

Definition at line 111 of file VectorInterpolationCompressor.cpp.

References Assert, Lamp::Deque< Type >::getCount(), getLength(), getSourceKeyCount(), getSourceSize(), getTolerance(), Lamp::VectorArrayInterpolator::getValue(), NULL, Lamp::Deque< Type >::pushBack(), recalcLinearError(), setCompressedData(), Lamp::VectorLinearInterpolator::setKey(), Lamp::VectorLinearInterpolator::setKeyCount(), Lamp::VectorInterpolationCompressor::LinearKey::squaredError_, Lamp::VectorInterpolationCompressor::LinearKey::time_, and Lamp::VectorInterpolationCompressor::LinearKey::value_.

Referenced by compress().

void Lamp::VectorInterpolationCompressor::compressSetup VectorArrayInterpolator source,
float  tolerance
[protected, virtual]
 

圧縮準備

Parameters:
source 圧縮を行うベクトル配列補間
tolerance 許容誤差

Definition at line 75 of file VectorInterpolationCompressor.cpp.

References Assert, Lamp::VectorArrayInterpolator::getLength(), Lamp::VectorArrayInterpolator::getSize(), and NULL.

Referenced by compress().

virtual int Lamp::VectorInterpolationCompressor::getCompressedKeyCount  )  const [inline, virtual]
 

圧縮後キー数の取得

Returns:
圧縮後キー数

Definition at line 99 of file VectorInterpolationCompressor.h.

Referenced by getCompressedSize(), and getResultString().

virtual int Lamp::VectorInterpolationCompressor::getCompressedSize  )  const [inline, virtual]
 

圧縮後サイズの取得

Returns:
圧縮後サイズ

Definition at line 105 of file VectorInterpolationCompressor.h.

References getCompressedKeyCount().

Referenced by getCompressionRate(), and getResultString().

virtual float Lamp::VectorInterpolationCompressor::getCompressionRate  )  const [inline, virtual]
 

圧縮率の取得

Returns:
圧縮率

Definition at line 114 of file VectorInterpolationCompressor.h.

References getCompressedSize(), and getSourceSize().

Referenced by getResultString().

virtual float Lamp::VectorInterpolationCompressor::getLength  )  const [inline, virtual]
 

長さの取得

Returns:
長さ

Definition at line 77 of file VectorInterpolationCompressor.h.

Referenced by compressConstant(), compressLinear(), and getResultString().

String Lamp::VectorInterpolationCompressor::getResultString  )  const [virtual]
 

結果文字列の取得

Returns:
結果文字列

Definition at line 217 of file VectorInterpolationCompressor.cpp.

References Lamp::String::format(), getCompressedKeyCount(), getCompressedSize(), getCompressionRate(), getLength(), getSourceKeyCount(), and getSourceSize().

virtual int Lamp::VectorInterpolationCompressor::getSourceKeyCount  )  const [inline, virtual]
 

ソースキー数の取得

Returns:
ソースキー数

Definition at line 84 of file VectorInterpolationCompressor.h.

Referenced by compress(), compressLinear(), getResultString(), and getSourceSize().

virtual int Lamp::VectorInterpolationCompressor::getSourceSize  )  const [inline, virtual]
 

ソースサイズの取得

Returns:
ソースサイズ

Definition at line 90 of file VectorInterpolationCompressor.h.

References getSourceKeyCount(), and sourceKeySize_.

Referenced by compressLinear(), getCompressionRate(), and getResultString().

virtual float Lamp::VectorInterpolationCompressor::getTolerance  )  const [inline, virtual]
 

許容誤差の取得

Returns:
許容誤差

Definition at line 71 of file VectorInterpolationCompressor.h.

Referenced by compressConstant(), and compressLinear().

void Lamp::VectorInterpolationCompressor::recalcLinearError VectorArrayInterpolator source,
LinearKey preKey,
LinearKey key,
LinearKey postKey
[protected, virtual]
 

線形圧縮誤差の再計算

Parameters:
source 圧縮を行うベクトル配列補間
preKey 前のキー
key 再計算するキー
postKey 後ろのキー

Definition at line 191 of file VectorInterpolationCompressor.cpp.

References Lamp::Vector3::getSquaredLength(), Lamp::VectorArrayInterpolator::getValue(), Lamp::VectorInterpolationCompressor::LinearKey::squaredError_, Lamp::VectorInterpolationCompressor::LinearKey::time_, and Lamp::VectorInterpolationCompressor::LinearKey::value_.

Referenced by compressLinear().

virtual void Lamp::VectorInterpolationCompressor::setCompressedData int  compressedKeyCount,
int  compressedKeySize
[inline, protected, virtual]
 

圧縮結果の設定

Parameters:
compressedKeyCount 圧縮後キー数
compressedKeySize 圧縮後キーサイズ

Definition at line 181 of file VectorInterpolationCompressor.h.

Referenced by compress(), compressConstant(), and compressLinear().


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:53 2005 for Lamp by doxygen 1.3.2