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

Lamp::Model Class Reference

モデル More...

#include <Model.h>

Inheritance diagram for Lamp::Model:

Lamp::SceneLeaf Lamp::SceneObject Lamp::CharacterModel Lamp::StandardModel List of all members.

Public Member Functions

virtual Model * copyModel (u_int copyMask=0) const=0
 モデルのコピー

virtual void addMesh (Mesh *mesh)
 メッシュの追加

virtual void removeMesh (Mesh *mesh)
 メッシュの削除

virtual int getMeshCount () const
 メッシュ数の取得

virtual Mesh * getMesh (int index) const
 メッシュの取得

virtual bool isModel () const
 モデルかどうか

virtual bool isStandardModel () const
 標準モデルかどうか

virtual StandardModel * castStandardModel () const
 標準モデルへのキャスト

virtual bool isCharacterModel () const
 キャラクタモデルかどうか

virtual CharacterModel * castCharacterModel () const
 キャラクタモデルへのキャスト


Static Public Member Functions

int recursiveDestroy (Model *model)
 再帰的破棄


Protected Member Functions

 Model (const String &name, Scene *scene)
 コンストラクタ

virtual ~Model ()
 デストラクタ

virtual void copyModelValue (Model *destination, u_int copyMask) const
 モデルの値コピー

virtual void traverse (const Matrix34 &parentMatrix, bool parentEnabled, bool parentScaled, bool parentChanged)
 走査


Friends

class SceneObjectManagerTemplate< Model >
class ModelManager

Detailed Description

モデル

Definition at line 40 of file Model.h.


Constructor & Destructor Documentation

Lamp::Model::Model (  const String &  name,
Scene *  scene
)  [protected]
 

コンストラクタ

Parameters:
name 名前
scene シーン

Definition at line 34 of file Model.cpp.


Member Function Documentation

void Lamp::Model::addMesh (  Mesh *  mesh  )  [virtual]
 

メッシュの追加

Parameters:
mesh 追加するメッシュ

Reimplemented in Lamp::CharacterModel, and Lamp::StandardModel.

Definition at line 80 of file Model.cpp.

References Lamp::ArrayList< Mesh * >::add(), and Lamp::Mesh::setParent().

Referenced by copyModelValue(), Lamp::TextSceneLoader::readModelLink(), and Lamp::BinarySceneLoader::readModelLink().

virtual CharacterModel* Lamp::Model::castCharacterModel (   )  const [inline, virtual]
 

キャラクタモデルへのキャスト

Returns:
キャラクタモデル。型が違えばNULLを返す。

Definition at line 127 of file Model.h.

References isCharacterModel(), and NULL.

Referenced by Lamp::CharacterModelAnimation::bind(), Lamp::CharacterMesh::deform(), Lamp::TextSceneSaver::writeModelList(), and Lamp::BinarySceneSaver::writeModelList().

virtual StandardModel* Lamp::Model::castStandardModel (   )  const [inline, virtual]
 

標準モデルへのキャスト

Returns:
標準モデル。型が違えばNULLを返す。

Definition at line 111 of file Model.h.

References isStandardModel(), and NULL.

Referenced by Lamp::TextSceneSaver::writeModelList(), and Lamp::BinarySceneSaver::writeModelList().

virtual Model* Lamp::Model::copyModel (  u_int  copyMask = 0  )  const [pure virtual]
 

モデルのコピー

Parameters:
copyMask コピーマスク
Returns:
コピーされたモデル

Implemented in Lamp::CharacterModel, and Lamp::StandardModel.

void Lamp::Model::copyModelValue (  Model *  destination,
u_int  copyMask
)  const [protected, virtual]
 

モデルの値コピー

Parameters:
destination コピー先モデル
copyMask コピーマスク

Definition at line 42 of file Model.cpp.

References addMesh(), Lamp::SceneLeaf::copy(), Lamp::SceneLeaf::copySceneLeafValue(), getMesh(), and getMeshCount().

Referenced by Lamp::CharacterModel::copyCharacterModel(), and Lamp::StandardModel::copyStandardModel().

virtual Mesh* Lamp::Model::getMesh (  int  index  )  const [inline, virtual]
 

メッシュの取得

Parameters:
index インデックス
Returns:
メッシュ

Definition at line 85 of file Model.h.

References Assert, Lamp::ArrayList< Mesh * >::get(), and getMeshCount().

Referenced by Lamp::CollisionConverter::convertLeaf(), copyModelValue(), recursiveDestroy(), traverse(), Lamp::TextSceneSaver::writeModelLink(), and Lamp::BinarySceneSaver::writeModelLink().

virtual int Lamp::Model::getMeshCount (   )  const [inline, virtual]
 

メッシュ数の取得

Returns:
メッシュ数

Definition at line 78 of file Model.h.

References Lamp::ArrayList< Mesh * >::getCount().

Referenced by Lamp::CollisionConverter::convertLeaf(), copyModelValue(), Lamp::SceneLogicCheckFilter::filterModel(), getMesh(), recursiveDestroy(), traverse(), Lamp::TextSceneSaver::writeModelLink(), and Lamp::BinarySceneSaver::writeModelLink().

virtual bool Lamp::Model::isCharacterModel (   )  const [inline, virtual]
 

キャラクタモデルかどうか

Returns:
キャラクタモデルならtrue

Reimplemented in Lamp::CharacterModel.

Definition at line 121 of file Model.h.

Referenced by castCharacterModel(), Lamp::TextSceneSaver::writeModelList(), and Lamp::BinarySceneSaver::writeModelList().

virtual bool Lamp::Model::isModel (   )  const [inline, virtual]
 

モデルかどうか

Returns:
モデルならtrue

Reimplemented from Lamp::SceneObject.

Definition at line 98 of file Model.h.

virtual bool Lamp::Model::isStandardModel (   )  const [inline, virtual]
 

標準モデルかどうか

Returns:
標準モデルならtrue

Reimplemented in Lamp::StandardModel.

Definition at line 105 of file Model.h.

Referenced by castStandardModel(), Lamp::TextSceneSaver::writeModelList(), and Lamp::BinarySceneSaver::writeModelList().

int Lamp::Model::recursiveDestroy (  Model *  model  )  [static]
 

再帰的破棄

Parameters:
model 破棄するモデル
Returns:
破棄したオブジェクト数

Definition at line 53 of file Model.cpp.

References Assert, Lamp::SceneObjectManagerTemplate< Model >::destroy(), getMesh(), getMeshCount(), Lamp::Scene::getModelManager(), Lamp::SceneObject::getScene(), and NULL.

void Lamp::Model::removeMesh (  Mesh *  mesh  )  [virtual]
 

メッシュの削除

Parameters:
mesh 削除するメッシュ

Definition at line 86 of file Model.cpp.

References Lamp::ArrayList< Mesh * >::removeByValue(), and Lamp::Mesh::removeParent().

Referenced by Lamp::Mesh::recursiveDestroy().

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

走査

Parameters:
parentMatrix 親行列
parentEnabled 親が有効か
parentScaled 親がスケールを使用しているか
parentChanged 親に変更があったか

Reimplemented from Lamp::SceneLeaf.

Definition at line 67 of file Model.cpp.

References getMesh(), getMeshCount(), Lamp::SceneLeaf::isGlobalEnabled(), and Lamp::Mesh::traverse().


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