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

# Lamp::Camera Class Reference

カメラ More...

`#include <Camera.h>`

Inheritance diagram for Lamp::Camera:

List of all members.

## Public Member Functions
virtual int | getReferenceCount () const
| リファレンスカウントの取得
virtual Camera * | copy () const
| コピー
virtual const Matrix44 & | getProjectionMatrix ()
| 射影行列の取得
virtual void | setPerspectiveOffCenter (float left, float right, float bottom, float top, float nearClip, float farClip)
| 中心のずれたパースペクティブ設定
virtual void | setPerspective (float width, float height, float nearClip, float farClip)
| パースペクティブ設定
virtual void | setPerspectiveFovY (float fovY, float aspect, float nearClip, float farClip)
| 画角によるパースペクティブ設定
virtual void | setOrthoOffCenter (float left, float right, float bottom, float top, float nearClip, float farClip)
| 中心のずれた並行投影設定
virtual void | setOrtho (float width, float height, float nearClip, float farClip)
| 並行投影設定
virtual float | getLeft ()
| 左の取得
virtual float | getRight ()
| 右の取得
virtual float | getBottom ()
| 下の取得
virtual float | getTop ()
| 上の取得
virtual float | getNearClip ()
| ニアクリップの取得
virtual void | setNearClip (float nearClip)
| ニアクリップの設定
virtual float | getFarClip ()
| ファークリップの取得
virtual void | setFarClip (float farClip)
| ファークリップの設定
virtual bool | isPerspective ()
| パースペクティブかどうか
virtual float | getWidth ()
| 幅の取得
virtual float | getHeight ()
| 高さの取得
virtual float | getFovY ()
| 画角の取得
virtual void | setFovY (float fovY)
| 画角の設定
virtual float | getAspect ()
| アスペクト比の取得
virtual void | setAspect (float aspect)
| アスペクト比の設定
virtual const Matrix44 & | getViewMatrix ()
| ビュー行列の取得
virtual const Vector3 & | getPosition ()
| カメラ位置の取得
virtual const Vector3 & | getRotation ()
| カメラ回転の取得
virtual void | setViewMatrix (const Matrix44 &viewMatrix)
| ビュー行列の設定
virtual void | setTransformation (const Vector3 &rotationXYZ, const Vector3 &position)
| トランスフォーメーションの設定
virtual void | setTransformation (const Quaternion &rotation, const Vector3 &position)
| トランスフォーメーションの設定
virtual void | setLookAt (const Vector3 &position, const Vector3 &target, const Vector3 &up)
| ルックアットの設定
virtual Clipping::State | clipping (const Sphere &boundingSphere)
| クリッピング
virtual Clipping::State | clipping (const AxisAlignedBox &boundingBox)
| クリッピング
virtual const Vector3 & | getCorner (int index)
| コーナーの取得
virtual const Sphere & | getBoundingSphere ()
| バウンディングスフィアの取得
virtual bool | isCamera () const
| カメラかどうか
## Protected Member Functions
| Camera (const String &name, Scene *scene)
| コンストラクタ
virtual | ~Camera ()
| デストラクタ
virtual void | buildPerspectiveMatrix ()
| 射影行列の構築
virtual void | clippingSetup ()
| クリッピングのセットアップ
## Friends
class | SceneObjectManagerTemplate< Camera >
class | CameraManager

## Detailed Description

カメラ

Definition at line 37 of file Camera.h.

## Constructor & Destructor Documentation

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

  | コンストラクタ Parameters:
  name | 名前
  scene | シーン
Definition at line 34 of file Camera.cpp. References buildPerspectiveMatrix().

## Member Function Documentation

Clipping::State Lamp::Camera::clipping | ( | const AxisAlignedBox & | boundingBox | ) | `[virtual]`

  | クリッピング Parameters:
  boundingBox | バウンディングボックス
Returns: クリッピングステート Definition at line 220 of file Camera.cpp. References Lamp::AxisAlignedBox::getCornerArray(), and Lamp::Plane::getDistance().

Clipping::State Lamp::Camera::clipping | ( | const Sphere & | boundingSphere | ) | `[virtual]`

  | クリッピング Parameters:
  boundingSphere | バウンディングスフィア
Returns: クリッピングステート Definition at line 200 of file Camera.cpp. References Lamp::Sphere::getCenter(), Lamp::Plane::getDistance(), Lamp::Sphere::getRadius(), and Lamp::Sphere::intersect(). Referenced by Lamp::Scene::getMeshList().

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

| コピー Returns: コピーされたカメラ Definition at line 48 of file Camera.cpp. References Lamp::CameraManager::createCamera(), Lamp::Scene::getCameraManager(), Lamp::SceneObject::name_, Lamp::SceneObjectManagerTemplate< Camera >::rename(), and Lamp::SceneObject::scene_.

virtual float Lamp::Camera::getAspect | ( |  | ) | `[inline, virtual]`

| アスペクト比の取得 Returns: アスペクト比 Definition at line 276 of file Camera.h. Referenced by Lamp::PS2PadCameraController::control(), and setFovY().

virtual float Lamp::Camera::getBottom | ( |  | ) | `[inline, virtual]`

| 下の取得 Returns: 下 Definition at line 181 of file Camera.h. Referenced by setFarClip(), and setNearClip().

virtual const Sphere& Lamp::Camera::getBoundingSphere | ( |  | ) | `[inline, virtual]`

| バウンディングスフィアの取得 Returns: バウンディングスフィア Definition at line 387 of file Camera.h.

virtual const Vector3& Lamp::Camera::getCorner | ( | int | index | ) | `[inline, virtual]`

| コーナーの取得 以下の図のインデックスに沿ってコーナーを取得します。
        y+
        |  5----4
        | /|   /|
        |1-+--2 |
        || 6--+-7
        ||/   |/
        |0----3
        +-------- x+
       /
      z+
  Parameters:
  index | コーナーインデックス
Returns: コーナー Definition at line 377 of file Camera.h. References Assert.

virtual float Lamp::Camera::getFarClip | ( |  | ) | `[inline, virtual]`

| ファークリップの取得 Returns: ファークリップ Definition at line 215 of file Camera.h. Referenced by Lamp::PS2PadCameraController::control(), setAspect(), setFovY(), and setNearClip().

virtual float Lamp::Camera::getFovY | ( |  | ) | `[inline, virtual]`

| 画角の取得 Returns: 画角 Definition at line 256 of file Camera.h. Referenced by Lamp::PS2PadCameraController::control(), and setAspect().

virtual float Lamp::Camera::getHeight | ( |  | ) | `[inline, virtual]`

| 高さの取得 Returns: 高さ Definition at line 249 of file Camera.h.

virtual float Lamp::Camera::getLeft | ( |  | ) | `[inline, virtual]`

| 左の取得 Returns: 左 Definition at line 169 of file Camera.h. Referenced by setFarClip(), and setNearClip().

virtual float Lamp::Camera::getNearClip | ( |  | ) | `[inline, virtual]`

| ニアクリップの取得 Returns: ニアクリップ Definition at line 194 of file Camera.h. Referenced by Lamp::PS2PadCameraController::control(), setAspect(), setFarClip(), and setFovY().

virtual const Vector3& Lamp::Camera::getPosition | ( |  | ) | `[inline, virtual]`

| カメラ位置の取得 Returns: カメラ位置 Definition at line 301 of file Camera.h. Referenced by Lamp::Renderer::buildMeshList(), Lamp::PS2PadCameraController::control(), and Lamp::SceneNode::traverse().

virtual const Matrix44& Lamp::Camera::getProjectionMatrix | ( |  | ) | `[inline, virtual]`

| 射影行列の取得 Returns: 射影行列 Definition at line 60 of file Camera.h. Referenced by Lamp::Renderer::initializeGlobalSettings(), and Lamp::PrimitiveRenderer::render().

virtual int Lamp::Camera::getReferenceCount | ( |  | ) | const`[inline, virtual]`

| リファレンスカウントの取得 Returns: リファレンスカウント Implements Lamp::SceneObject. Definition at line 45 of file Camera.h.

virtual float Lamp::Camera::getRight | ( |  | ) | `[inline, virtual]`

| 右の取得 Returns: 右 Definition at line 175 of file Camera.h. Referenced by setFarClip(), and setNearClip().

virtual const Vector3& Lamp::Camera::getRotation | ( |  | ) | `[inline, virtual]`

| カメラ回転の取得 Returns: カメラ回転 Definition at line 307 of file Camera.h. Referenced by Lamp::PS2PadCameraController::control().

virtual float Lamp::Camera::getTop | ( |  | ) | `[inline, virtual]`

| 上の取得 Returns: 上 Definition at line 187 of file Camera.h. Referenced by setFarClip(), and setNearClip().

virtual const Matrix44& Lamp::Camera::getViewMatrix | ( |  | ) | `[inline, virtual]`

| ビュー行列の取得 Returns: ビュー行列 Definition at line 295 of file Camera.h. Referenced by Lamp::Renderer::initializeGlobalSettings(), and Lamp::PrimitiveRenderer::render().

virtual float Lamp::Camera::getWidth | ( |  | ) | `[inline, virtual]`

| 幅の取得 Returns: 幅 Definition at line 243 of file Camera.h.

virtual bool Lamp::Camera::isCamera | ( |  | ) | const`[inline, virtual]`

| カメラかどうか Returns: カメラならtrue Reimplemented from Lamp::SceneObject. Definition at line 396 of file Camera.h.

virtual bool Lamp::Camera::isPerspective | ( |  | ) | `[inline, virtual]`

| パースペクティブかどうか Returns: パースペクティブならtrue Definition at line 236 of file Camera.h.

virtual void Lamp::Camera::setAspect | ( | float | aspect | ) | `[inline, virtual]`

  | アスペクト比の設定 Parameters:
  aspect | アスペクト比
Definition at line 282 of file Camera.h. References Assert, getFarClip(), getFovY(), getNearClip(), and setPerspectiveFovY().

virtual void Lamp::Camera::setFarClip | ( | float | farClip | ) | `[inline, virtual]`

  | ファークリップの設定 Parameters:
  farClip | ファークリップ
Definition at line 221 of file Camera.h. References getBottom(), getLeft(), getNearClip(), getRight(), getTop(), setOrthoOffCenter(), and setPerspectiveOffCenter().

virtual void Lamp::Camera::setFovY | ( | float | fovY | ) | `[inline, virtual]`

  | 画角の設定 Parameters:
  fovY | 画角
Definition at line 265 of file Camera.h. References Assert, getAspect(), getFarClip(), getNearClip(), and setPerspectiveFovY().

void Lamp::Camera::setLookAt | ( | const Vector3 & | position,
|  | const Vector3 & | target,
|  | const Vector3 & | up
| ) | `[virtual]`

  | ルックアットの設定 Parameters:
  position | ビュー位置
  target | 目標
  up | 上ベクトル
Definition at line 104 of file Camera.cpp. References Assert, clippingSetup(), Lamp::Vector3::crossProduct(), Lamp::Vector3::dotProduct(), Lamp::Vector3::epsilonEquals(), Lamp::Vector3::normalize(), Lamp::Matrix44::set(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z.

virtual void Lamp::Camera::setNearClip | ( | float | nearClip | ) | `[inline, virtual]`

  | ニアクリップの設定 Parameters:
  nearClip | ニアクリップ
Definition at line 200 of file Camera.h. References getBottom(), getFarClip(), getLeft(), getRight(), getTop(), setOrthoOffCenter(), and setPerspectiveOffCenter().

virtual void Lamp::Camera::setOrtho | ( | float | width,
|  | float | height,
|  | float | nearClip,
|  | float | farClip
| ) | `[inline, virtual]`

  | 並行投影設定 Parameters:
  width | 幅
  height | 高さ
  nearClip | 最小Z値
  farClip | 最大Z値
Definition at line 152 of file Camera.h. References buildPerspectiveMatrix().

virtual void Lamp::Camera::setOrthoOffCenter | ( | float | left,
|  | float | right,
|  | float | bottom,
|  | float | top,
|  | float | nearClip,
|  | float | farClip
| ) | `[inline, virtual]`

  | 中心のずれた並行投影設定 Parameters:
  left | 最小X値
  right | 最大X値
  bottom | 最小Y値
  top | 最大Y値
  nearClip | 最小Z値
  farClip | 最大Z値
Definition at line 132 of file Camera.h. References buildPerspectiveMatrix(). Referenced by setFarClip(), and setNearClip().

virtual void Lamp::Camera::setPerspective | ( | float | width,
|  | float | height,
|  | float | nearClip,
|  | float | farClip
| ) | `[inline, virtual]`

  | パースペクティブ設定 Parameters:
  width | 幅
  height | 高さ
  nearClip | 最小Z値
  farClip | 最大Z値
Definition at line 92 of file Camera.h. References buildPerspectiveMatrix().

virtual void Lamp::Camera::setPerspectiveFovY | ( | float | fovY,
|  | float | aspect,
|  | float | nearClip,
|  | float | farClip
| ) | `[inline, virtual]`

  | 画角によるパースペクティブ設定 Parameters:
  fovY | Y軸方向の画角
  aspect | アスペクト比(width / height)
  nearClip | 最小Z値
  farClip | 最大Z値
Definition at line 111 of file Camera.h. References buildPerspectiveMatrix(). Referenced by Lamp::PS2PadCameraController::control(), setAspect(), setFovY(), and Lamp::FirstPersonCameraController::setup().

virtual void Lamp::Camera::setPerspectiveOffCenter | ( | float | left,
|  | float | right,
|  | float | bottom,
|  | float | top,
|  | float | nearClip,
|  | float | farClip
| ) | `[inline, virtual]`

  | 中心のずれたパースペクティブ設定 Parameters:
  left | 最小X値
  right | 最大X値
  bottom | 最小Y値
  top | 最大Y値
  nearClip | 最小Z値
  farClip | 最大Z値
Definition at line 72 of file Camera.h. References buildPerspectiveMatrix(). Referenced by setFarClip(), and setNearClip().

void Lamp::Camera::setTransformation | ( | const Quaternion & | rotation,
|  | const Vector3 & | position
| ) | `[virtual]`

  | トランスフォーメーションの設定 Parameters:
  rotation | ビューの四元数回転
  position | ビューの位置
Definition at line 94 of file Camera.cpp. References Lamp::Matrix44::addRotationQuaternion(), clippingSetup(), Lamp::Matrix44::setTranslation(), and Lamp::Quaternion::unitInvert().

void Lamp::Camera::setTransformation | ( | const Vector3 & | rotationXYZ,
|  | const Vector3 & | position
| ) | `[virtual]`

  | トランスフォーメーションの設定 Parameters:
  rotationXYZ | ビューのXYZ回転
  position | ビューの位置
Definition at line 86 of file Camera.cpp. References Lamp::Matrix44::addRotationZYX(), clippingSetup(), and Lamp::Matrix44::setTranslation(). Referenced by Lamp::CameraAnimation::animate(), Lamp::SceneFramework::clearScene(), Lamp::PS2PadCameraController::control(), Lamp::SceneFramework::loadScene(), and Lamp::FirstPersonCameraController::setup().

void Lamp::Camera::setViewMatrix | ( | const Matrix44 & | viewMatrix | ) | `[virtual]`

  | ビュー行列の設定 Parameters:
  viewMatrix | ビュー行列
Definition at line 80 of file Camera.cpp. References clippingSetup().

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

- Camera.h
- Camera.cpp