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

# Lamp::CharacterMesh Class Reference

キャラクタメッシュ More...

`#include <CharacterMesh.h>`

Inheritance diagram for Lamp::CharacterMesh:

List of all members.

## Public Member Functions
virtual bool | isCharacterMesh () const
| キャラクタメッシュかどうか
virtual Mesh * | copy (u_int copyMask=0) const
| コピー
virtual CharacterMesh * | copyCharacterMesh (u_int copyMask=0) const
| キャラクタメッシュのコピー
virtual bool | requireNormalize () const
| 法線の正規化を必要とするか
virtual void | invalidateGraphicsDeviceObjects ()
| デバイスオブジェクトの無効化
## Static Public Attributes
const int | maxWeightPerVertex = 4
| 最大頂点あたりウェイト数
## Protected Member Functions
| CharacterMesh (const String &name, Scene *scene)
| コンストラクタ
virtual | ~CharacterMesh ()
| デストラクタ
virtual void | traverse (const Matrix34 &parentMatrix, bool parentEnabled, bool parentScaled, bool parentChanged)
| 走査
virtual bool | characterDeform ()
| キャラクタ変形
virtual void | deform ()
| 変形
virtual void | skinningDeformP (const Matrix34 *positionDeformMatrixArray)
| スキニング変形
virtual void | skinningDeformPN (const Matrix34 *positionDeformMatrixArray)
| スキニング変形
virtual void | skinningDeformPN (const Matrix34 *positionDeformMatrixArray, const Matrix33 *normalDeformMatrixArray)
| スキニング変形
virtual void | stitchingDeformP (const Matrix34 *positionDeformMatrixArray)
| スティッチング変形
virtual void | stitchingDeformPN (const Matrix34 *positionDeformMatrixArray)
| スティッチング変形
virtual void | stitchingDeformPN (const Matrix34 *positionDeformMatrixArray, const Matrix33 *normalDeformMatrixArray)
| スティッチング変形
virtual bool | setupVertexBuffer ()
| 頂点バッファセットアップ
virtual bool | createVertexDeclaration ()
| 頂点記述の構築
virtual bool | createVertexBuffer ()
| 頂点バッファの構築
virtual Direct3DVertexDeclaration * | getDeformedVertexDeclaration ()
| 変形頂点記述の取得
virtual int | getDeformedVertexSize ()
| 変形頂点サイズの取得
virtual Direct3DVertexBuffer * | getDeformedVertexBuffer ()
| 変形頂点バッファの構築
## Protected Attributes
Direct3DVertexDeclaration * | vertexDeclaration_
| 頂点記述
Direct3DVertexBuffer * | vertexBuffer_
| 頂点バッファ
int | vertexSize_
| 頂点サイズ
int | deformedVertexCount_
| 変形済み頂点数
Vector3 * | deformedPosition_
| 変形済み位置
Vector3 * | deformedNormal_
| 変形済み法線
## Friends
class | MeshManager

## Detailed Description

キャラクタメッシュ

デフォームはソフトウェアで行う。理由は以下に。 MaxVertexBlendMatrixIndexのハードウェア対応数が少ない。 この点はVS3とかで行列テクスチャにアクセスできれば解決するかも。 マルチパスレンダリング（影等）を行う際に複数回デフォームを行うことになる。

Definition at line 41 of file CharacterMesh.h.

## Constructor & Destructor Documentation

Lamp::CharacterMesh::CharacterMesh | ( | const String & | name,
|  | Scene * | scene
| ) | `[protected]`

  | コンストラクタ Parameters:
  name | 名前
  scene | シーン
Definition at line 37 of file CharacterMesh.cpp. References NULL.

## Member Function Documentation

bool Lamp::CharacterMesh::characterDeform | ( |  | ) | `[protected, virtual]`

| キャラクタ変形 Returns: キャラクタ変形を行ったらtrue Reimplemented from Lamp::Mesh. Definition at line 71 of file CharacterMesh.cpp. References createVertexBuffer(), createVertexDeclaration(), deform(), NULL, setupVertexBuffer(), vertexBuffer_, and vertexDeclaration_.

virtual Mesh* Lamp::CharacterMesh::copy | ( | u_int | copyMask = 0 | ) | const`[inline, virtual]`

  | コピー Parameters:
  copyMask | コピーマスク
Returns: コピーされたメッシュ Implements Lamp::Mesh. Definition at line 61 of file CharacterMesh.h. References copyCharacterMesh().

CharacterMesh * Lamp::CharacterMesh::copyCharacterMesh | ( | u_int | copyMask = 0 | ) | const`[virtual]`

  | キャラクタメッシュのコピー Parameters:
  copyMask | コピーマスク
Returns: コピーされたメッシュ Definition at line 52 of file CharacterMesh.cpp. References Lamp::Mesh::copyMeshValue(), Lamp::MeshManager::createCharacterMesh(), Lamp::Scene::getMeshManager(), Lamp::SceneObject::name_, Lamp::SceneObjectManagerTemplate< Mesh >::rename(), and Lamp::SceneObject::scene_. Referenced by copy().

bool Lamp::CharacterMesh::createVertexBuffer | ( |  | ) | `[protected, virtual]`

| 頂点バッファの構築 Returns: 成功すればtrueを返す Definition at line 381 of file CharacterMesh.cpp. References Assert, Lamp::RenderingDevice::createDynamicVertexBuffer(), createVertexDeclaration(), Lamp::Mesh::getVertexCount(), NULL, u_int, vertexBuffer_, vertexDeclaration_, and vertexSize_. Referenced by characterDeform(), and getDeformedVertexBuffer().

bool Lamp::CharacterMesh::createVertexDeclaration | ( |  | ) | `[protected, virtual]`

| 頂点記述の構築 Returns: 成功すればtrueを返す Definition at line 369 of file CharacterMesh.cpp. References Assert, Lamp::RenderingDevice::createVertexDeclaration(), Lamp::Mesh::getTexCoordSetCount(), Lamp::Mesh::getTexCoordTypeArray(), Lamp::Mesh::hasColor(), Lamp::Mesh::hasNormal(), NULL, vertexDeclaration_, and vertexSize_. Referenced by characterDeform(), createVertexBuffer(), getDeformedVertexDeclaration(), and getDeformedVertexSize().

virtual Direct3DVertexBuffer* Lamp::CharacterMesh::getDeformedVertexBuffer | ( |  | ) | `[inline, protected, virtual]`

| 変形頂点バッファの構築 Returns: 変形頂点バッファ Reimplemented from Lamp::Mesh. Definition at line 219 of file CharacterMesh.h. References createVertexBuffer(), Direct3DVertexBuffer, NULL, and vertexBuffer_.

virtual Direct3DVertexDeclaration* Lamp::CharacterMesh::getDeformedVertexDeclaration | ( |  | ) | `[inline, protected, virtual]`

| 変形頂点記述の取得 Returns: 変形頂点記述 Reimplemented from Lamp::Mesh. Definition at line 201 of file CharacterMesh.h. References createVertexDeclaration(), Direct3DVertexDeclaration, NULL, and vertexDeclaration_.

virtual int Lamp::CharacterMesh::getDeformedVertexSize | ( |  | ) | `[inline, protected, virtual]`

| 変形頂点サイズの取得 Returns: 変形頂点サイズ Reimplemented from Lamp::Mesh. Definition at line 210 of file CharacterMesh.h. References createVertexDeclaration(), NULL, vertexDeclaration_, and vertexSize_.

virtual bool Lamp::CharacterMesh::isCharacterMesh | ( |  | ) | const`[inline, virtual]`

| キャラクタメッシュかどうか Returns: キャラクタメッシュならtrue Reimplemented from Lamp::Mesh. Definition at line 53 of file CharacterMesh.h.

virtual bool Lamp::CharacterMesh::requireNormalize | ( |  | ) | const`[inline, virtual]`

| 法線の正規化を必要とするか Returns: 法線の正規化を必要とするならtrue Reimplemented from Lamp::Mesh. Definition at line 77 of file CharacterMesh.h.

bool Lamp::CharacterMesh::setupVertexBuffer | ( |  | ) | `[protected, virtual]`

| 頂点バッファセットアップ Returns: 成功すればtrueを返す Definition at line 352 of file CharacterMesh.cpp. References Assert, deformedNormal_, deformedPosition_, Lamp::Mesh::getColorArray(), Lamp::Mesh::getTexCoordArray(), Lamp::Mesh::getTexCoordSetCount(), Lamp::Mesh::getTexCoordTypeArray(), Lamp::Mesh::getVertexCount(), NULL, vertexBuffer_, vertexDeclaration_, vertexSize_, and Lamp::RenderingDevice::writeDynamicVertexBuffer(). Referenced by characterDeform().

void Lamp::CharacterMesh::skinningDeformP | ( | const Matrix34 * | positionDeformMatrixArray | ) | `[protected, virtual]`

  | スキニング変形 Parameters:
  positionDeformMatrixArray | 位置変形行列配列
Definition at line 137 of file CharacterMesh.cpp. References deformedPosition_, Lamp::Mesh::getBoneIndexArray(), Lamp::Mesh::getBonesPerVertex(), Lamp::Mesh::getPositionArray(), Lamp::Mesh::getVertexCount(), Lamp::Mesh::getWeightArray(), Lamp::Mesh::getWeightsPerVertex(), and u_char. Referenced by deform().

void Lamp::CharacterMesh::skinningDeformPN | ( | const Matrix34 * | positionDeformMatrixArray,
|  | const Matrix33 * | normalDeformMatrixArray
| ) | `[protected, virtual]`

  | スキニング変形 Parameters:
  positionDeformMatrixArray | 位置変形行列配列
  normalDeformMatrixArray | 法線変形行列配列
Definition at line 228 of file CharacterMesh.cpp. References deformedNormal_, deformedPosition_, Lamp::Mesh::getBoneIndexArray(), Lamp::Mesh::getBonesPerVertex(), Lamp::Mesh::getNormalArray(), Lamp::Mesh::getPositionArray(), Lamp::Mesh::getVertexCount(), Lamp::Mesh::getWeightArray(), Lamp::Mesh::getWeightsPerVertex(), Lamp::Mesh::hasNormal(), and u_char.

void Lamp::CharacterMesh::skinningDeformPN | ( | const Matrix34 * | positionDeformMatrixArray | ) | `[protected, virtual]`

  | スキニング変形 Parameters:
  positionDeformMatrixArray | 位置変形行列配列
Definition at line 177 of file CharacterMesh.cpp. References deformedNormal_, deformedPosition_, Lamp::Mesh::getBoneIndexArray(), Lamp::Mesh::getBonesPerVertex(), Lamp::Mesh::getNormalArray(), Lamp::Mesh::getPositionArray(), Lamp::Mesh::getVertexCount(), Lamp::Mesh::getWeightArray(), Lamp::Mesh::getWeightsPerVertex(), Lamp::Matrix34::multiply33(), and u_char. Referenced by deform().

void Lamp::CharacterMesh::stitchingDeformP | ( | const Matrix34 * | positionDeformMatrixArray | ) | `[protected, virtual]`

  | スティッチング変形 Parameters:
  positionDeformMatrixArray | 位置変形行列配列
Definition at line 286 of file CharacterMesh.cpp. References deformedPosition_, Lamp::Mesh::getBoneIndexArray(), Lamp::Mesh::getPositionArray(), Lamp::Mesh::getVertexCount(), and u_char. Referenced by deform().

void Lamp::CharacterMesh::stitchingDeformPN | ( | const Matrix34 * | positionDeformMatrixArray,
|  | const Matrix33 * | normalDeformMatrixArray
| ) | `[protected, virtual]`

  | スティッチング変形 Parameters:
  positionDeformMatrixArray | 位置変形行列配列
  normalDeformMatrixArray | 法線変形行列配列
Definition at line 325 of file CharacterMesh.cpp. References deformedNormal_, deformedPosition_, Lamp::Mesh::getBoneIndexArray(), Lamp::Mesh::getNormalArray(), Lamp::Mesh::getPositionArray(), Lamp::Mesh::getVertexCount(), and u_char.

void Lamp::CharacterMesh::stitchingDeformPN | ( | const Matrix34 * | positionDeformMatrixArray | ) | `[protected, virtual]`

  | スティッチング変形 Parameters:
  positionDeformMatrixArray | 位置変形行列配列
Definition at line 302 of file CharacterMesh.cpp. References deformedNormal_, deformedPosition_, Lamp::Mesh::getBoneIndexArray(), Lamp::Mesh::getNormalArray(), Lamp::Mesh::getPositionArray(), Lamp::Mesh::getVertexCount(), Lamp::Matrix34::multiply33(), and u_char. Referenced by deform().

void Lamp::CharacterMesh::traverse | ( | const Matrix34 & | parentMatrix,
|  | bool | parentEnabled,
|  | bool | parentScaled,
|  | bool | parentChanged
| ) | `[protected, virtual]`

  | 走査 Parameters:
  parentMatrix | 親行列
  parentEnabled | 親が有効か
  parentScaled | 親がスケールを使用しているか
  parentChanged | 親に変更があったか
Reimplemented from Lamp::Mesh. Definition at line 62 of file CharacterMesh.cpp. References Lamp::Mesh::isGlobalEnabled(), SafeRelease, and vertexBuffer_.

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

- CharacterMesh.h
- CharacterMesh.cpp