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

# Lamp::CollisionObject Class Reference

コリジョンオブジェクト More...

`#include <CollisionObject.h>`

Inheritance diagram for Lamp::CollisionObject:

List of all members.

## Public Member Functions
virtual void | traverse ()
| 走査
virtual const String & | getName () const
| 名前の取得
virtual CollisionScene * | getScene () const
| シーンの取得
virtual CollisionNode * | getParent () const
| 親の取得
virtual void | setEnabled (bool enabled)
| 有効、無効の設定
virtual bool | isEnabled () const
| 有効、無効の取得
virtual bool | isGlobalEnabled () const
| グローバルでの有効、無効の取得
virtual void | setUserData (void *userData)
| ユーザデータの設定
virtual void * | getUserData ()
| ユーザデータの取得
virtual bool | isGlobalChanged () const
| グローバルでの変更フラグの取得
virtual CollisionObject * | copy () const=0
| コピー
virtual bool | isCollisionNode () const
| コリジョンノードかどうか
virtual CollisionNode * | castCollisionNode () const
| コリジョンノードへのキャスト
virtual bool | isCollisionLeaf () const
| コリジョンリーフかどうか
virtual CollisionLeaf * | castCollisionLeaf () const
| コリジョンリーフへのキャスト
virtual bool | isStaticCollisionLeaf () const
| 静的コリジョンリーフかどうか
virtual StaticCollisionLeaf * | castStaticCollisionLeaf () const
| 静的コリジョンリーフへのキャスト
virtual bool | isStaticSphereCollision () const
| 静的球コリジョンかどうか
virtual StaticSphereCollision * | castStaticSphereCollision () const
| 静的球コリジョンへのキャスト
virtual bool | isStaticDeformedMeshCollision () const
| 静的変形メッシュコリジョンかどうか
virtual StaticDeformedMeshCollision * | castStaticDeformedMeshCollision () const
| 静的変形メッシュコリジョンへのキャスト
virtual bool | isDynamicCollisionLeaf () const
| 動的コリジョンリーフかどうか
virtual DynamicCollisionLeaf * | castDynamicCollisionLeaf () const
| 動的コリジョンリーフへのキャスト
## Static Public Member Functions
int | recursiveDestroy (CollisionObject *collisionObject)
| 再帰的破棄
## Protected Member Functions
| CollisionObject (const String &name, CollisionScene *scene)
| コンストラクタ
virtual | ~CollisionObject ()
| デストラクタ
virtual void | copyCollisionObjectValue (CollisionObject *destination) const
| コリジョンオブジェクトの値コピー
virtual void | traverseImplement (const Matrix34 &parentMatrix, bool parentEnabled, bool parentScaled, bool parentChanged)=0
| 走査
virtual void | setGlobalEnabled (bool globalEnabled)
| グローバルでの有効、無効の設定
virtual bool | isChanged () const
| 変更フラグの取得
virtual void | setChanged (bool changed)
| 変更フラグの設定
virtual void | setGlobalChanged (bool globalChanged)
| グローバルでの変更フラグの設定
virtual void | setParent (CollisionNode *parent)
| 親の設定
virtual void | removeParent (CollisionNode *parent)
| 親の削除
## Friends
class | CollisionScene
class | CollisionNode

## Detailed Description

コリジョンオブジェクト

Definition at line 42 of file CollisionObject.h.

## Constructor & Destructor Documentation

Lamp::CollisionObject::CollisionObject | ( | const String & | name,
|  | CollisionScene * | scene
| ) | `[inline, protected]`

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

## Member Function Documentation

virtual CollisionLeaf* Lamp::CollisionObject::castCollisionLeaf | ( |  | ) | const`[inline, virtual]`

| コリジョンリーフへのキャスト Returns: コリジョンリーフ。型が違えばNULLを返す。 Definition at line 170 of file CollisionObject.h. References isCollisionLeaf(), and NULL. Referenced by recursiveDestroy().

virtual CollisionNode* Lamp::CollisionObject::castCollisionNode | ( |  | ) | const`[inline, virtual]`

| コリジョンノードへのキャスト Returns: コリジョンノード。型が違えばNULLを返す。 Definition at line 154 of file CollisionObject.h. References isCollisionNode(), and NULL. Referenced by recursiveDestroy().

virtual DynamicCollisionLeaf* Lamp::CollisionObject::castDynamicCollisionLeaf | ( |  | ) | const`[inline, virtual]`

| 動的コリジョンリーフへのキャスト Returns: 動的コリジョンリーフ。型が違えばNULLを返す。 Definition at line 241 of file CollisionObject.h. References isDynamicCollisionLeaf(), and NULL.

virtual StaticCollisionLeaf* Lamp::CollisionObject::castStaticCollisionLeaf | ( |  | ) | const`[inline, virtual]`

| 静的コリジョンリーフへのキャスト Returns: 静的コリジョンリーフ。型が違えばNULLを返す。 Definition at line 188 of file CollisionObject.h. References isStaticCollisionLeaf(), and NULL.

virtual StaticDeformedMeshCollision* Lamp::CollisionObject::castStaticDeformedMeshCollision | ( |  | ) | const`[inline, virtual]`

| 静的変形メッシュコリジョンへのキャスト Returns: 静的変形メッシュコリジョン。型が違えばNULLを返す。 Definition at line 221 of file CollisionObject.h. References isStaticDeformedMeshCollision(), and NULL. Referenced by Lamp::CollisionRenderer::renderingSetup(), and Lamp::TextCollisionSaver::save().

virtual StaticSphereCollision* Lamp::CollisionObject::castStaticSphereCollision | ( |  | ) | const`[inline, virtual]`

| 静的球コリジョンへのキャスト Returns: 静的球コリジョン。型が違えばNULLを返す。 Definition at line 204 of file CollisionObject.h. References isStaticSphereCollision(), and NULL. Referenced by Lamp::CollisionRenderer::renderingSetup(), and Lamp::TextCollisionSaver::save().

virtual CollisionObject* Lamp::CollisionObject::copy | ( |  | ) | const`[pure virtual]`

| コピー Returns: コピーされたコリジョンオブジェクト Implemented in Lamp::StaticDeformedMeshCollision, Lamp::StaticSphereCollision, and Lamp::CollisionNode.

virtual void Lamp::CollisionObject::copyCollisionObjectValue | ( | CollisionObject * | destination | ) | const`[inline, protected, virtual]`

  | コリジョンオブジェクトの値コピー Parameters:
  destination | コピー先コリジョンオブジェクト
Definition at line 273 of file CollisionObject.h. References Assert, changed_, and enabled_. Referenced by Lamp::CollisionLeaf::copyCollisionLeafValue(), and Lamp::CollisionNode::copyCollisionNode().

virtual const String& Lamp::CollisionObject::getName | ( |  | ) | const`[inline, virtual]`

| 名前の取得 Returns: 名前 Definition at line 61 of file CollisionObject.h. Referenced by Lamp::CollisionScene::clear(), Lamp::CollisionNode::copyCollisionNode(), Lamp::StaticDeformedMeshCollision::copyStaticDeformedMeshCollision(), Lamp::StaticSphereCollision::copyStaticSphereCollision(), Lamp::CollisionScene::destroyLeaf(), Lamp::CollisionScene::destroyNode(), Lamp::TextCollisionSaver::save(), Lamp::TextCollisionSaver::writeCollisionLeaf(), Lamp::TextCollisionSaver::writeCollisionNode(), Lamp::TextCollisionSaver::writeCollisionNodeLink(), and Lamp::CollisionScene::~CollisionScene().

virtual CollisionNode* Lamp::CollisionObject::getParent | ( |  | ) | const`[inline, virtual]`

| 親の取得 Returns: 親 Definition at line 75 of file CollisionObject.h. Referenced by Lamp::CollisionLeaf::destroy(), Lamp::CollisionLeaf::getLocalMatrix(), Lamp::CollisionLeaf::getRotationQuaternion(), Lamp::CollisionLeaf::getRotationXYZ(), Lamp::CollisionLeaf::getScale(), Lamp::CollisionLeaf::getTranslation(), Lamp::CollisionLeaf::getWorldMatrix(), Lamp::StaticDeformedMeshCollision::getWorldMesh(), Lamp::CollisionLeaf::isGlobalScaled(), Lamp::CollisionLeaf::isScaled(), Lamp::CollisionNode::recursiveDestroy(), Lamp::CollisionLeaf::setRotationQuaternion(), Lamp::CollisionLeaf::setRotationXYZ(), Lamp::CollisionLeaf::setScale(), and Lamp::CollisionLeaf::setTranslation().

virtual CollisionScene* Lamp::CollisionObject::getScene | ( |  | ) | const`[inline, virtual]`

| シーンの取得 Returns: シーン Definition at line 68 of file CollisionObject.h. Referenced by Lamp::CollisionNode::copyCollisionNode(), Lamp::StaticDeformedMeshCollision::copyStaticDeformedMeshCollision(), Lamp::StaticSphereCollision::copyStaticSphereCollision(), Lamp::CollisionLeaf::destroy(), and Lamp::CollisionNode::recursiveDestroy().

virtual void* Lamp::CollisionObject::getUserData | ( |  | ) | `[inline, virtual]`

| ユーザデータの取得 Returns: ユーザデータ Definition at line 114 of file CollisionObject.h.

virtual bool Lamp::CollisionObject::isChanged | ( |  | ) | const`[inline, protected, virtual]`

| 変更フラグの取得 Returns: 変更されていればtrue Reimplemented in Lamp::CollisionNode. Definition at line 310 of file CollisionObject.h. Referenced by Lamp::CollisionLeaf::traverseSetup().

virtual bool Lamp::CollisionObject::isCollisionLeaf | ( |  | ) | const`[inline, virtual]`

| コリジョンリーフかどうか Returns: コリジョンリーフならtrue Reimplemented in Lamp::CollisionLeaf. Definition at line 164 of file CollisionObject.h. Referenced by castCollisionLeaf(), and recursiveDestroy().

virtual bool Lamp::CollisionObject::isCollisionNode | ( |  | ) | const`[inline, virtual]`

| コリジョンノードかどうか Returns: コリジョンノードならtrue Reimplemented in Lamp::CollisionNode. Definition at line 148 of file CollisionObject.h. Referenced by castCollisionNode(), recursiveDestroy(), and Lamp::TextCollisionSaver::writeCollisionNodeLink().

virtual bool Lamp::CollisionObject::isDynamicCollisionLeaf | ( |  | ) | const`[inline, virtual]`

| 動的コリジョンリーフかどうか Returns: 動的コリジョンリーフならtrue Reimplemented in Lamp::DynamicCollisionLeaf. Definition at line 235 of file CollisionObject.h. Referenced by castDynamicCollisionLeaf().

virtual bool Lamp::CollisionObject::isEnabled | ( |  | ) | const`[inline, virtual]`

| 有効、無効の取得 Returns: trueなら有効、falseなら無効 Definition at line 93 of file CollisionObject.h. Referenced by Lamp::TextCollisionLoader::load(), Lamp::CollisionNode::traverseImplement(), Lamp::CollisionLeaf::traverseSetup(), Lamp::TextCollisionSaver::writeCollisionLeaf(), and Lamp::TextCollisionSaver::writeCollisionNode().

virtual bool Lamp::CollisionObject::isGlobalChanged | ( |  | ) | const`[inline, virtual]`

| グローバルでの変更フラグの取得 Returns: グローバルで変更されていればtrue Definition at line 123 of file CollisionObject.h. Referenced by traverse().

virtual bool Lamp::CollisionObject::isGlobalEnabled | ( |  | ) | const`[inline, virtual]`

| グローバルでの有効、無効の取得 Returns: trueなら有効、falseなら無効 Definition at line 99 of file CollisionObject.h. Referenced by Lamp::StaticDeformedMeshCollision::getWorldMesh(), Lamp::StaticSphereCollision::getWorldSphere(), Lamp::StaticSphereCollision::intersection(), Lamp::StaticDeformedMeshCollision::intersection(), Lamp::CollisionScene::intersection(), Lamp::CollisionRenderer::renderingSetup(), traverse(), and Lamp::CollisionNode::traverseImplement().

virtual bool Lamp::CollisionObject::isStaticCollisionLeaf | ( |  | ) | const`[inline, virtual]`

| 静的コリジョンリーフかどうか Returns: 静的コリジョンリーフならtrue Reimplemented in Lamp::StaticCollisionLeaf. Definition at line 182 of file CollisionObject.h. Referenced by castStaticCollisionLeaf().

virtual bool Lamp::CollisionObject::isStaticDeformedMeshCollision | ( |  | ) | const`[inline, virtual]`

| 静的変形メッシュコリジョンかどうか Returns: 静的変形メッシュコリジョンならtrue Reimplemented in Lamp::StaticDeformedMeshCollision. Definition at line 214 of file CollisionObject.h. Referenced by castStaticDeformedMeshCollision(), Lamp::CollisionRenderer::renderingSetup(), and Lamp::TextCollisionSaver::save().

virtual bool Lamp::CollisionObject::isStaticSphereCollision | ( |  | ) | const`[inline, virtual]`

| 静的球コリジョンかどうか Returns: 静的球コリジョンならtrue Reimplemented in Lamp::StaticSphereCollision. Definition at line 198 of file CollisionObject.h. Referenced by castStaticSphereCollision(), Lamp::CollisionRenderer::renderingSetup(), and Lamp::TextCollisionSaver::save().

int Lamp::CollisionObject::recursiveDestroy | ( | CollisionObject * | collisionObject | ) | `[static]`

  | 再帰的破棄 Parameters:
  collisionObject | 破棄するコリジョンオブジェクト
Returns: 破棄したオブジェクト数 Definition at line 34 of file CollisionObject.cpp. References Assert, castCollisionLeaf(), castCollisionNode(), ErrorOut, isCollisionLeaf(), isCollisionNode(), and NULL.

virtual void Lamp::CollisionObject::removeParent | ( | CollisionNode * | parent | ) | `[inline, protected, virtual]`

  | 親の削除 Parameters:
  parent | 削除する親
Reimplemented in Lamp::CollisionLeaf, and Lamp::CollisionNode. Definition at line 345 of file CollisionObject.h. References Assert, NULL, and setChanged(). Referenced by Lamp::CollisionNode::removeChild().

virtual void Lamp::CollisionObject::setChanged | ( | bool | changed | ) | `[inline, protected, virtual]`

  | 変更フラグの設定 Parameters:
  changed | trueなら有効、falseなら無効
Definition at line 316 of file CollisionObject.h. Referenced by Lamp::StaticDeformedMeshCollision::calculateBounding(), removeParent(), Lamp::StaticDeformedMeshCollision::setBoundingBox(), Lamp::StaticDeformedMeshCollision::setBoundingSphere(), Lamp::StaticSphereCollision::setCenter(), setEnabled(), setParent(), Lamp::StaticSphereCollision::setRadius(), Lamp::StaticSphereCollision::setSphere(), Lamp::StaticDeformedMeshCollision::setTriangle(), Lamp::StaticDeformedMeshCollision::setTriangleCount(), Lamp::CollisionNode::traverseImplement(), and Lamp::CollisionLeaf::traverseSetup().

virtual void Lamp::CollisionObject::setEnabled | ( | bool | enabled | ) | `[inline, virtual]`

  | 有効、無効の設定 Parameters:
  enabled | trueなら有効、falseなら無効
Definition at line 84 of file CollisionObject.h. References setChanged(). Referenced by Lamp::CollisionConverter::convertNode(), Lamp::TextCollisionLoader::load(), Lamp::TextCollisionLoader::readCollisionNode(), Lamp::TextCollisionLoader::readStaticDeformedMesh(), Lamp::TextCollisionLoader::readStaticSphere(), and Lamp::CollisionConverter::setCollisionLeafData().

virtual void Lamp::CollisionObject::setGlobalChanged | ( | bool | globalChanged | ) | `[inline, protected, virtual]`

  | グローバルでの変更フラグの設定 Parameters:
  globalChanged | trueなら有効、falseなら無効
Definition at line 322 of file CollisionObject.h. Referenced by Lamp::CollisionNode::traverseImplement(), and Lamp::CollisionLeaf::traverseSetup().

virtual void Lamp::CollisionObject::setGlobalEnabled | ( | bool | globalEnabled | ) | `[inline, protected, virtual]`

  | グローバルでの有効、無効の設定 Parameters:
  globalEnabled | trueなら有効、falseなら無効
Definition at line 299 of file CollisionObject.h. Referenced by Lamp::CollisionLeaf::CollisionLeaf(), Lamp::CollisionNode::CollisionNode(), Lamp::CollisionNode::removeParent(), Lamp::CollisionLeaf::removeParent(), Lamp::CollisionNode::setParent(), Lamp::CollisionLeaf::setParent(), Lamp::CollisionNode::traverseImplement(), and Lamp::CollisionLeaf::traverseSetup().

virtual void Lamp::CollisionObject::setParent | ( | CollisionNode * | parent | ) | `[inline, protected, virtual]`

  | 親の設定 Parameters:
  parent | 設定する親
Reimplemented in Lamp::CollisionLeaf, and Lamp::CollisionNode. Definition at line 333 of file CollisionObject.h. References Assert, NULL, and setChanged(). Referenced by Lamp::CollisionNode::addChild().

virtual void Lamp::CollisionObject::setUserData | ( | void * | userData | ) | `[inline, virtual]`

  | ユーザデータの設定 Parameters:
  userData | ユーザデータ
Definition at line 108 of file CollisionObject.h.

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

  | 走査 Parameters:
  parentMatrix | 親行列
  parentEnabled | 親が有効か
  parentScaled | 親がスケールを使用しているか
  parentChanged | 親に変更があったか
Implemented in Lamp::StaticDeformedMeshCollision, Lamp::StaticSphereCollision, and Lamp::CollisionNode. Referenced by traverse(), and Lamp::CollisionNode::traverseImplement().

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

- CollisionObject.h
- CollisionObject.cpp