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

# Lamp::TextCollisionLoader Class Reference

テキストコリジョンローダ More...

`#include <TextCollisionLoader.h>`

List of all members.

## Public Member Functions
| TextCollisionLoader ()
| コンストラクタ
virtual | ~TextCollisionLoader ()
| デストラクタ
virtual void | load (const String &filePath, CollisionScene *scene)
| ロード
virtual void | load (const String &filePath, CollisionScene *scene, CollisionNode *node)
| ロード
virtual void | load (TextReader *textReader, CollisionScene *scene)
| ロード
virtual void | load (TextReader *textReader, CollisionScene *scene, CollisionNode *node)
| ロード
## Protected Member Functions
virtual void | readHeader ()
| ------------------------------------------------------------------------------
virtual void | readCollisionNodeList ()
| コリジョンノードリストの読み込み
virtual void | readCollisionNode (const String &name)
| コリジョンノードの読み込み
virtual void | readCollisionLeafList ()
| コリジョンリーフリストの読み込み
virtual void | readStaticSphere (const String &name)
| 静的球コリジョンの読み込み
virtual void | readStaticDeformedMesh (const String &name)
| 静的変形メッシュコリジョンの読み込み
virtual void | readCollisionLinkList ()
| コリジョンリンクリストの読み込み
virtual void | readCollisionLink (const String &name)
| コリジョンリンクの読み込み
virtual bool | readBool ()
| bool値の読み込み
virtual int | readInt ()
| int値の読み込み
virtual u_int | readUInt ()
| u_int値の読み込み
virtual float | readFloat ()
| float値の読み込み
virtual Vector3 | readVector3 ()
| Vector3値の読み込み.
virtual AxisAlignedBox | readAxisAlignedBox ()
| 軸沿いボックスの読み込み
virtual Sphere | readSphere ()
| 球の読み込み
virtual Triangle | readTriangle ()
| 三角の読み込み
virtual String | readToken (const String &caller)
| トークンの読み込み
virtual void | skipWord (const String &word)
| 指定ワードの読み飛ばし
virtual void | openChunk ()
| チャンクを開く
virtual void | closeChunk ()
| チャンクを閉じる
virtual void | skipChunk ()
| チャンクの読み飛ばし
## Protected Attributes
StreamTokenizer * | tokenizer_
| トークナイザ
CollisionScene * | scene_
| シーン
CollisionNode * | rootNode_
| ルートノード

## Detailed Description

テキストコリジョンローダ

Definition at line 39 of file TextCollisionLoader.h.

## Member Function Documentation

void Lamp::TextCollisionLoader::load | ( | TextReader * | textReader,
|  | CollisionScene * | scene,
|  | CollisionNode * | node
| ) | `[virtual]`

  | ロード Parameters:
  textReader | テキストリーダ
  scene | ロード先シーン
  node | ロード先ノード
Definition at line 71 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), Lamp::StreamTokenizer::getToken(), Lamp::CollisionObject::isEnabled(), Lamp::StreamTokenizer::nextToken(), readCollisionLeafList(), readCollisionLinkList(), readCollisionNodeList(), readHeader(), rootNode_, scene_, Lamp::CollisionObject::setEnabled(), and tokenizer_.

void Lamp::TextCollisionLoader::load | ( | TextReader * | textReader,
|  | CollisionScene * | scene
| ) | `[virtual]`

  | ロード Parameters:
  textReader | テキストリーダ
  scene | ロード先シーン
Definition at line 66 of file TextCollisionLoader.cpp. References Lamp::CollisionScene::getRootNode(), and load().

void Lamp::TextCollisionLoader::load | ( | const String & | filePath,
|  | CollisionScene * | scene,
|  | CollisionNode * | node
| ) | `[virtual]`

  | ロード Parameters:
  filePath | ファイルパス
  scene | ロード先シーン
  node | ロード先ノード
Definition at line 52 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::FilePath::existFile(), Lamp::String::getBytes(), and load().

void Lamp::TextCollisionLoader::load | ( | const String & | filePath,
|  | CollisionScene * | scene
| ) | `[virtual]`

  | ロード Parameters:
  filePath | ファイルパス
  scene | ロード先シーン
Definition at line 47 of file TextCollisionLoader.cpp. References Lamp::CollisionScene::getRootNode(). Referenced by load().

AxisAlignedBox Lamp::TextCollisionLoader::readAxisAlignedBox | ( |  | ) | `[protected, virtual]`

| 軸沿いボックスの読み込み Returns: 軸沿いボックス Definition at line 332 of file TextCollisionLoader.cpp. References closeChunk(), openChunk(), readFloat(), Lamp::AxisAlignedBox::set(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z. Referenced by readStaticDeformedMesh().

bool Lamp::TextCollisionLoader::readBool | ( |  | ) | `[protected, virtual]`

| bool値の読み込み Returns: bool値 Definition at line 272 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), readToken(), and tokenizer_. Referenced by readCollisionNode(), readStaticDeformedMesh(), and readStaticSphere().

void Lamp::TextCollisionLoader::readCollisionLink | ( | const String & | name | ) | `[protected, virtual]`

  | コリジョンリンクの読み込み Parameters:
  name | 名前
Definition at line 226 of file TextCollisionLoader.cpp. References Lamp::CollisionNode::addChild(), Lamp::String::equals(), ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), NULL, openChunk(), readToken(), rootNode_, scene_, Lamp::CollisionScene::searchLeaf(), Lamp::CollisionScene::searchNode(), and tokenizer_. Referenced by readCollisionLinkList().

void Lamp::TextCollisionLoader::readCollisionNode | ( | const String & | name | ) | `[protected, virtual]`

  | コリジョンノードの読み込み Parameters:
  name | 名前
Definition at line 130 of file TextCollisionLoader.cpp. References closeChunk(), Lamp::CollisionScene::createCollisionNode(), openChunk(), readBool(), readVector3(), scene_, Lamp::CollisionObject::setEnabled(), Lamp::CollisionNode::setRotationXYZ(), Lamp::CollisionNode::setScale(), Lamp::CollisionNode::setTranslation(), and skipWord(). Referenced by readCollisionNodeList().

float Lamp::TextCollisionLoader::readFloat | ( |  | ) | `[protected, virtual]`

| float値の読み込み Returns: float値 Definition at line 308 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), Lamp::String::parseFloat(), readToken(), and tokenizer_. Referenced by readAxisAlignedBox(), readSphere(), readTriangle(), and readVector3().

int Lamp::TextCollisionLoader::readInt | ( |  | ) | `[protected, virtual]`

| int値の読み込み Returns: int値 Definition at line 282 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), Lamp::String::parseInt(), readToken(), and tokenizer_. Referenced by readStaticDeformedMesh().

Sphere Lamp::TextCollisionLoader::readSphere | ( |  | ) | `[protected, virtual]`

| 球の読み込み Returns: 球 Definition at line 350 of file TextCollisionLoader.cpp. References closeChunk(), openChunk(), readFloat(), Lamp::Sphere::setCenter(), Lamp::Sphere::setRadius(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z. Referenced by readStaticDeformedMesh(), and readStaticSphere().

void Lamp::TextCollisionLoader::readStaticDeformedMesh | ( | const String & | name | ) | `[protected, virtual]`

  | 静的変形メッシュコリジョンの読み込み Parameters:
  name | 名前
Definition at line 187 of file TextCollisionLoader.cpp. References closeChunk(), Lamp::CollisionScene::createStaticDeformedMeshCollision(), openChunk(), readAxisAlignedBox(), readBool(), readInt(), readSphere(), readTriangle(), readUInt(), scene_, Lamp::StaticDeformedMeshCollision::setBoundingBox(), Lamp::StaticDeformedMeshCollision::setBoundingSphere(), Lamp::CollisionLeaf::setCollisionMask(), Lamp::CollisionObject::setEnabled(), Lamp::StaticDeformedMeshCollision::setTriangle(), Lamp::StaticDeformedMeshCollision::setTriangleCount(), and skipWord(). Referenced by readCollisionLeafList().

void Lamp::TextCollisionLoader::readStaticSphere | ( | const String & | name | ) | `[protected, virtual]`

  | 静的球コリジョンの読み込み Parameters:
  name | 名前
Definition at line 173 of file TextCollisionLoader.cpp. References Lamp::CollisionScene::createStaticSphereCollision(), readBool(), readSphere(), readUInt(), scene_, Lamp::CollisionLeaf::setCollisionMask(), Lamp::CollisionObject::setEnabled(), Lamp::StaticSphereCollision::setSphere(), and skipWord(). Referenced by readCollisionLeafList().

String Lamp::TextCollisionLoader::readToken | ( | const String & | caller | ) | `[protected, virtual]`

  | トークンの読み込み Parameters:
  caller | 呼び出し元
Definition at line 381 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), Lamp::StreamTokenizer::getToken(), Lamp::StreamTokenizer::nextToken(), and tokenizer_. Referenced by readBool(), readCollisionLeafList(), readCollisionLink(), readCollisionLinkList(), readCollisionNodeList(), readFloat(), readInt(), readUInt(), and skipWord().

Triangle Lamp::TextCollisionLoader::readTriangle | ( |  | ) | `[protected, virtual]`

| 三角の読み込み Returns: 三角 Definition at line 364 of file TextCollisionLoader.cpp. References closeChunk(), openChunk(), readFloat(), Lamp::Triangle::setVertex(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z. Referenced by readStaticDeformedMesh().

u_int Lamp::TextCollisionLoader::readUInt | ( |  | ) | `[protected, virtual]`

| u_int値の読み込み Returns: u_int値 Definition at line 295 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), Lamp::String::parseUInt(), readToken(), tokenizer_, and u_int. Referenced by readStaticDeformedMesh(), and readStaticSphere().

Vector3 Lamp::TextCollisionLoader::readVector3 | ( |  | ) | `[protected, virtual]`

| Vector3値の読み込み. Returns: Vector3値 Definition at line 321 of file TextCollisionLoader.cpp. References closeChunk(), openChunk(), readFloat(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z. Referenced by readCollisionNode().

void Lamp::TextCollisionLoader::skipWord | ( | const String & | word | ) | `[protected, virtual]`

  | 指定ワードの読み飛ばし Parameters:
  word | 読み飛ばすワード
Definition at line 391 of file TextCollisionLoader.cpp. References ErrorOut, Lamp::String::getBytes(), Lamp::StreamTokenizer::getLineNumber(), readToken(), and tokenizer_. Referenced by closeChunk(), openChunk(), readCollisionLeafList(), readCollisionNode(), readHeader(), readStaticDeformedMesh(), and readStaticSphere().

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

- TextCollisionLoader.h
- TextCollisionLoader.cpp