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

Lamp::Plane Class Reference

平面 More...

#include <Plane.h>

List of all members.

Public Member Functions

 Plane ()
 コンストラクタ

 Plane (const Vector3 &normal, float constant)
 コンストラクタ

 Plane (float normalX, float normalY, float normalZ, float constant)
 コンストラクタ

 Plane (const float *const source)
 コンストラクタ

 Plane (const Vector3 &vertex0, const Vector3 &vertex1, const Vector3 &vertex2)
 コンストラクタ

 Plane (const Vector3 &normal, const Vector3 &vertex)
 コンストラクタ

void set (const Vector3 &normal, float constant)
 値の設定

void set (float normalX, float normalY, float normalZ, float constant)
 値の設定

void set (const float *const source)
 値の設定

void set (const Vector3 &vertex0, const Vector3 &vertex1, const Vector3 &vertex2)
 値の設定

void set (const Vector3 &normal, const Vector3 &vertex)
 値の設定

void setNormal (float normalX, float normalY, float normalZ)
 法線の設定

void setNormal (const Vector3 &normal)
 法線の設定

void setConstant (float constant)
 定数の設定

const PlanesetLength (float length)
 長さの設定

const Vector3getNormal () const
 法線の取得

float getConstant () const
 定数の取得

float getLength () const
 長さの取得

float getSquaredLength () const
 長さの二乗を取得

const Planenormalize ()
 正規化

float dotProduct (const Vector3 &vector) const
 内積を行う

bool isZero () const
 ゼロ平面かどうか

bool isUnit () const
 単位平面かどうか

Plane transform (const Matrix33 &matrix) const
 トランスフォーム

Plane transform (const Matrix34 &matrix) const
 トランスフォーム

Plane transform (const Matrix44 &matrix) const
 トランスフォーム

Plane scaledTransform (const Matrix33 &matrix) const
 スケール有りトランスフォーム

Plane scaledTransform (const Matrix34 &matrix) const
 スケール有りトランスフォーム

Plane scaledTransform (const Matrix44 &matrix) const
 スケール有りトランスフォーム

float getDistance (const Vector3 &point) const
 点距離

float getSquaredDistance (const Vector3 &point) const
 点距離の二乗

float getDistance (const AxisAlignedBox &axisAlignedBox) const
 軸沿いボックス距離

float getSquaredDistance (const AxisAlignedBox &axisAlignedBox) const
 軸沿いボックス距離の二乗

float getDistance (const Capsule &capsule) const
 カプセル距離

float getSquaredDistance (const Capsule &capsule) const
 カプセル距離の二乗

float getDistance (const Cone &cone) const
 コーン距離

float getSquaredDistance (const Cone &cone) const
 コーン距離の二乗

float getDistance (const Line &line) const
 ライン距離

float getSquaredDistance (const Line &line) const
 ライン距離の二乗

float getDistance (const OrientedBox &orientedBox) const
 指向性ボックス距離

float getSquaredDistance (const OrientedBox &orientedBox) const
 指向性ボックス距離の二乗

float getDistance (const Plane &plane) const
 平面距離

float getSquaredDistance (const Plane &plane) const
 平面距離の二乗

float getDistance (const Ray &ray) const
 レイ距離

float getSquaredDistance (const Ray &ray) const
 レイ距離の二乗

float getDistance (const Segment &segment) const
 セグメント距離

float getSquaredDistance (const Segment &segment) const
 セグメント距離の二乗

float getDistance (const Sphere &sphere) const
 球距離

float getSquaredDistance (const Sphere &sphere) const
 球距離の二乗

float getDistance (const Triangle &triangle) const
 三角距離

float getSquaredDistance (const Triangle &triangle) const
 三角距離の二乗

bool intersect (const Vector3 &point, float range=Math::epsilon) const
 点交差

bool intersect (const AxisAlignedBox &axisAlignedBox) const
 軸沿いボックス交差

bool intersect (const Capsule &capsule) const
 カプセル交差

bool intersect (const Cone &cone) const
 コーン交差

bool intersect (const Line &line) const
 ライン交差

bool intersect (const OrientedBox &orientedBox) const
 指向性ボックス交差

bool intersect (const Plane &plane) const
 平面交差

bool intersect (const Ray &ray) const
 レイ交差

bool intersect (const Segment &segment) const
 セグメント交差

bool intersect (const Sphere &sphere) const
 球交差

bool intersect (const Triangle &triangle) const
 三角交差

bool operator== (const Plane &target) const
 平面が同じかどうか

bool epsilonEquals (const Plane &target, float epsilon) const
 平面が同じかどうか

bool operator!= (const Plane &target) const
 平面が同じでないかどうか

bool notEpsilonEquals (const Plane &target, float epsilon) const
 平面が同じでないかどうか

String toString () const
 文字列化


Static Public Attributes

const Plane zero
 ゼロ平面

const Plane unitX
 X単位平面.

const Plane unitY
 Y単位平面.

const Plane unitZ
 Z単位平面.


Detailed Description

平面

このクラスは継承しないで下さい。

Definition at line 51 of file Plane.h.


Constructor & Destructor Documentation

Lamp::Plane::Plane  )  [inline]
 

コンストラクタ

このコンストラクタは初期値の設定を行わないため値は不定です。

Definition at line 76 of file Plane.h.

Lamp::Plane::Plane const Vector3 normal,
float  constant
[inline]
 

コンストラクタ

Parameters:
normal 法線の初期値
constant 定数の初期値

Definition at line 84 of file Plane.h.

Lamp::Plane::Plane float  normalX,
float  normalY,
float  normalZ,
float  constant
[inline]
 

コンストラクタ

Parameters:
normalX 法線Xの初期値
normalY 法線Yの初期値
normalZ 法線Zの初期値
constant 定数の初期値

Definition at line 96 of file Plane.h.

Lamp::Plane::Plane const float *const  source  )  [inline, explicit]
 

コンストラクタ

Parameters:
source 初期値配列

Definition at line 104 of file Plane.h.

Lamp::Plane::Plane const Vector3 vertex0,
const Vector3 vertex1,
const Vector3 vertex2
[inline]
 

コンストラクタ

Parameters:
vertex0 平面上の頂点0
vertex1 平面上の頂点1
vertex2 平面上の頂点2

Definition at line 114 of file Plane.h.

References Lamp::Vector3::dotProduct().

Lamp::Plane::Plane const Vector3 normal,
const Vector3 vertex
[inline]
 

コンストラクタ

Parameters:
normal 法線の初期値
vertex 平面上の頂点

Definition at line 125 of file Plane.h.

References Lamp::Vector3::dotProduct().


Member Function Documentation

float Lamp::Plane::dotProduct const Vector3 vector  )  const [inline]
 

内積を行う

Returns:
内積した値

Definition at line 269 of file Plane.h.

References Lamp::Vector3::dotProduct().

Referenced by Lamp::PlaneDistance::distance(), and Lamp::AxisAlignedBoxIntersection::intersect().

bool Lamp::Plane::epsilonEquals const Plane target,
float  epsilon
const [inline]
 

平面が同じかどうか

Parameters:
target 比較する平面
epsilon 誤差
Returns:
誤差の範囲内で同じ値であればtrueを返す

Definition at line 698 of file Plane.h.

References Assert, constant_, Lamp::Vector3::epsilonEquals(), and normal_.

float Lamp::Plane::getConstant  )  const [inline]
 

定数の取得

Returns:
定数

Definition at line 236 of file Plane.h.

float Lamp::Plane::getDistance const Triangle triangle  )  const
 

三角距離

Parameters:
triangle 距離判定する三角
Returns:
距離

Definition at line 111 of file Plane.cpp.

float Lamp::Plane::getDistance const Sphere sphere  )  const
 

球距離

Parameters:
sphere 距離判定する球
Returns:
距離

Definition at line 106 of file Plane.cpp.

float Lamp::Plane::getDistance const Segment segment  )  const
 

セグメント距離

Parameters:
segment 距離判定するセグメント
Returns:
距離

Definition at line 101 of file Plane.cpp.

float Lamp::Plane::getDistance const Ray ray  )  const
 

レイ距離

Parameters:
ray 距離判定するレイ
Returns:
距離

Definition at line 96 of file Plane.cpp.

float Lamp::Plane::getDistance const Plane plane  )  const
 

平面距離

Parameters:
plane 距離判定する平面
Returns:
距離

Definition at line 86 of file Plane.cpp.

float Lamp::Plane::getDistance const OrientedBox orientedBox  )  const
 

指向性ボックス距離

Parameters:
orientedBox 距離判定する指向性ボックス
Returns:
距離

Definition at line 91 of file Plane.cpp.

float Lamp::Plane::getDistance const Line line  )  const
 

ライン距離

Parameters:
line 距離判定するライン
Returns:
距離

Definition at line 81 of file Plane.cpp.

float Lamp::Plane::getDistance const Cone cone  )  const
 

コーン距離

Parameters:
cone 距離判定するコーン
Returns:
距離

Definition at line 76 of file Plane.cpp.

float Lamp::Plane::getDistance const Capsule capsule  )  const
 

カプセル距離

Parameters:
capsule 距離判定するカプセル
Returns:
距離

Definition at line 71 of file Plane.cpp.

float Lamp::Plane::getDistance const AxisAlignedBox axisAlignedBox  )  const
 

軸沿いボックス距離

Parameters:
axisAlignedBox 距離判定する軸沿いボックス
Returns:
距離

Definition at line 66 of file Plane.cpp.

float Lamp::Plane::getDistance const Vector3 point  )  const
 

点距離

Parameters:
point 距離判定する点
Returns:
距離

Definition at line 61 of file Plane.cpp.

Referenced by Lamp::Camera::clipping(), getSquaredDistance(), Lamp::PlaneIntersection::intersect(), Lamp::OrientedBoxIntersection::intersect(), and Lamp::LineIntersection::intersect().

float Lamp::Plane::getLength  )  const [inline]
 

長さの取得

Returns:
長さ

Definition at line 242 of file Plane.h.

References Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z.

Referenced by isUnit(), and isZero().

const Vector3& Lamp::Plane::getNormal  )  const [inline]
 

法線の取得

Returns:
法線

Definition at line 230 of file Plane.h.

Referenced by Lamp::PlaneIntersection::intersect(), Lamp::OrientedBoxIntersection::intersect(), and Lamp::LineIntersection::intersect().

float Lamp::Plane::getSquaredDistance const Triangle triangle  )  const [inline]
 

三角距離の二乗

Parameters:
triangle 距離判定する三角
Returns:
距離の二乗

Definition at line 584 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Sphere sphere  )  const [inline]
 

球距離の二乗

Parameters:
sphere 距離判定する球
Returns:
距離の二乗

Definition at line 566 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Segment segment  )  const [inline]
 

セグメント距離の二乗

Parameters:
segment 距離判定するセグメント
Returns:
距離の二乗

Definition at line 548 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Ray ray  )  const [inline]
 

レイ距離の二乗

Parameters:
ray 距離判定するレイ
Returns:
距離の二乗

Definition at line 530 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Plane plane  )  const [inline]
 

平面距離の二乗

Parameters:
plane 距離判定する平面
Returns:
距離の二乗

Definition at line 512 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const OrientedBox orientedBox  )  const [inline]
 

指向性ボックス距離の二乗

Parameters:
orientedBox 距離判定する指向性ボックス
Returns:
距離の二乗

Definition at line 494 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Line line  )  const [inline]
 

ライン距離の二乗

Parameters:
line 距離判定するライン
Returns:
距離の二乗

Definition at line 476 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Cone cone  )  const [inline]
 

コーン距離の二乗

Parameters:
cone 距離判定するコーン
Returns:
距離の二乗

Definition at line 458 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Capsule capsule  )  const [inline]
 

カプセル距離の二乗

Parameters:
capsule 距離判定するカプセル
Returns:
距離の二乗

Definition at line 440 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const AxisAlignedBox axisAlignedBox  )  const [inline]
 

軸沿いボックス距離の二乗

Parameters:
axisAlignedBox 距離判定する軸沿いボックス
Returns:
距離の二乗

Definition at line 422 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredDistance const Vector3 point  )  const [inline]
 

点距離の二乗

Parameters:
point 距離判定する点
Returns:
距離の二乗

Definition at line 404 of file Plane.h.

References getDistance().

float Lamp::Plane::getSquaredLength  )  const [inline]
 

長さの二乗を取得

Returns:
長さの二乗

Definition at line 251 of file Plane.h.

References Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z.

bool Lamp::Plane::intersect const Triangle triangle  )  const
 

三角交差

Parameters:
triangle 交差判定する三角
Returns:
交差していればtrue

Definition at line 168 of file Plane.cpp.

bool Lamp::Plane::intersect const Sphere sphere  )  const
 

球交差

Parameters:
sphere 交差判定する球
Returns:
交差していればtrue

Definition at line 163 of file Plane.cpp.

bool Lamp::Plane::intersect const Segment segment  )  const
 

セグメント交差

Parameters:
segment 交差判定するセグメント
Returns:
交差していればtrue

Definition at line 158 of file Plane.cpp.

bool Lamp::Plane::intersect const Ray ray  )  const
 

レイ交差

Parameters:
ray 交差判定するレイ
Returns:
交差していればtrue

Definition at line 153 of file Plane.cpp.

bool Lamp::Plane::intersect const Plane plane  )  const
 

平面交差

Parameters:
plane 交差判定する平面
Returns:
交差していればtrue

Definition at line 148 of file Plane.cpp.

bool Lamp::Plane::intersect const OrientedBox orientedBox  )  const
 

指向性ボックス交差

Parameters:
orientedBox 交差判定する指向性ボックス
Returns:
交差していればtrue

Definition at line 143 of file Plane.cpp.

bool Lamp::Plane::intersect const Line line  )  const
 

ライン交差

Parameters:
line 交差判定するライン
Returns:
交差していればtrue

Definition at line 138 of file Plane.cpp.

bool Lamp::Plane::intersect const Cone cone  )  const
 

コーン交差

Parameters:
cone 交差判定するコーン
Returns:
交差していればtrue

Definition at line 133 of file Plane.cpp.

bool Lamp::Plane::intersect const Capsule capsule  )  const
 

カプセル交差

Parameters:
capsule 交差判定するカプセル
Returns:
交差していればtrue

Definition at line 128 of file Plane.cpp.

bool Lamp::Plane::intersect const AxisAlignedBox axisAlignedBox  )  const
 

軸沿いボックス交差

Parameters:
axisAlignedBox 交差判定する軸沿いボックス
Returns:
交差していればtrue

Definition at line 123 of file Plane.cpp.

bool Lamp::Plane::intersect const Vector3 point,
float  range = Math::epsilon
const
 

点交差

Parameters:
point 交差判定する点
range 交差範囲
Returns:
交差していればtrue

Definition at line 118 of file Plane.cpp.

bool Lamp::Plane::isUnit  )  const [inline]
 

単位平面かどうか

Returns:
単位平面ならtrueを返す

Definition at line 286 of file Plane.h.

References getLength().

Referenced by Lamp::PlaneDistance::distance().

bool Lamp::Plane::isZero  )  const [inline]
 

ゼロ平面かどうか

Returns:
ゼロ平面ならtrueを返す

Definition at line 278 of file Plane.h.

References getLength().

const Plane& Lamp::Plane::normalize  )  [inline]
 

正規化

Returns:
正規化された平面

Definition at line 263 of file Plane.h.

References setLength().

bool Lamp::Plane::notEpsilonEquals const Plane target,
float  epsilon
const [inline]
 

平面が同じでないかどうか

Parameters:
target 比較する平面
epsilon 誤差
Returns:
誤差の範囲内で同じでない値であればtrueを返す

Definition at line 720 of file Plane.h.

References Assert, constant_, normal_, and Lamp::Vector3::notEpsilonEquals().

bool Lamp::Plane::operator!= const Plane target  )  const [inline]
 

平面が同じでないかどうか

Parameters:
target 比較する平面
Returns:
同じでない値であればtrueを返す

Definition at line 710 of file Plane.h.

References constant_, and normal_.

bool Lamp::Plane::operator== const Plane target  )  const [inline]
 

平面が同じかどうか

Parameters:
target 比較する平面
Returns:
同じ値であればtrueを返す

Definition at line 688 of file Plane.h.

References constant_, and normal_.

Plane Lamp::Plane::scaledTransform const Matrix44 matrix  )  const [inline]
 

スケール有りトランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後の球

Definition at line 377 of file Plane.h.

References constant_, Lamp::Matrix44::getTranslation(), Lamp::Matrix33::invert(), normal_, Lamp::Matrix33::set(), and Lamp::Matrix33::transpose().

Plane Lamp::Plane::scaledTransform const Matrix34 matrix  )  const [inline]
 

スケール有りトランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後の球

Definition at line 360 of file Plane.h.

References constant_, Lamp::Matrix34::getTranslation(), Lamp::Matrix33::invert(), normal_, Lamp::Matrix33::set(), and Lamp::Matrix33::transpose().

Plane Lamp::Plane::scaledTransform const Matrix33 matrix  )  const [inline]
 

スケール有りトランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後の球

Definition at line 345 of file Plane.h.

References constant_, Lamp::Matrix33::invert(), normal_, and Lamp::Matrix33::transpose().

void Lamp::Plane::set const Vector3 normal,
const Vector3 vertex
[inline]
 

値の設定

Parameters:
normal 設定する法線
vertex 平面上の頂点

Definition at line 182 of file Plane.h.

References Lamp::Vector3::dotProduct().

void Lamp::Plane::set const Vector3 vertex0,
const Vector3 vertex1,
const Vector3 vertex2
[inline]
 

値の設定

Parameters:
vertex0 平面上の頂点0
vertex1 平面上の頂点1
vertex2 平面上の頂点2

Definition at line 171 of file Plane.h.

References Lamp::Vector3::dotProduct().

void Lamp::Plane::set const float *const  source  )  [inline]
 

値の設定

Parameters:
source 設定値配列

Definition at line 160 of file Plane.h.

References Lamp::Vector3::set().

void Lamp::Plane::set float  normalX,
float  normalY,
float  normalZ,
float  constant
[inline]
 

値の設定

Parameters:
normalX 設定する法線X
normalY 設定する法線Y
normalZ 設定する法線Z
constant 設定する定数

Definition at line 150 of file Plane.h.

References Lamp::Vector3::set().

void Lamp::Plane::set const Vector3 normal,
float  constant
[inline]
 

値の設定

Parameters:
normal 設定する法線
constant 設定する定数

Definition at line 138 of file Plane.h.

Referenced by Lamp::Camera::clippingSetup().

void Lamp::Plane::setConstant float  constant  )  [inline]
 

定数の設定

Parameters:
constant 設定する定数

Definition at line 207 of file Plane.h.

const Plane& Lamp::Plane::setLength float  length  )  [inline]
 

長さの設定

Parameters:
length 設定する長さ

Definition at line 213 of file Plane.h.

References Assert, and Lamp::Vector3::getLength().

Referenced by normalize().

void Lamp::Plane::setNormal const Vector3 normal  )  [inline]
 

法線の設定

Parameters:
normal 設定する法線

Definition at line 201 of file Plane.h.

void Lamp::Plane::setNormal float  normalX,
float  normalY,
float  normalZ
[inline]
 

法線の設定

Parameters:
normalX 設定する法線X
normalY 設定する法線Y
normalZ 設定する法線Z

Definition at line 193 of file Plane.h.

References Lamp::Vector3::set().

String Lamp::Plane::toString  )  const [inline]
 

文字列化

Returns:
平面の文字列表記

Definition at line 734 of file Plane.h.

References Lamp::String::format(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z.

Plane Lamp::Plane::transform const Matrix44 matrix  )  const [inline]
 

トランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後の球

Definition at line 327 of file Plane.h.

References constant_, Lamp::Vector3::dotProduct(), Lamp::Matrix44::getTranslation(), Lamp::Matrix44::m00, Lamp::Matrix44::m01, Lamp::Matrix44::m02, Lamp::Matrix44::m10, Lamp::Matrix44::m11, Lamp::Matrix44::m12, Lamp::Matrix44::m20, Lamp::Matrix44::m21, Lamp::Matrix44::m22, Lamp::Matrix44::multiply33(), normal_, Lamp::Vector3::set(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z.

Plane Lamp::Plane::transform const Matrix34 matrix  )  const [inline]
 

トランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後の球

Definition at line 310 of file Plane.h.

References constant_, Lamp::Vector3::dotProduct(), Lamp::Matrix34::getTranslation(), Lamp::Matrix34::m00, Lamp::Matrix34::m01, Lamp::Matrix34::m02, Lamp::Matrix34::m10, Lamp::Matrix34::m11, Lamp::Matrix34::m12, Lamp::Matrix34::m20, Lamp::Matrix34::m21, Lamp::Matrix34::m22, Lamp::Matrix34::multiply33(), normal_, Lamp::Vector3::set(), Lamp::Vector3::x, Lamp::Vector3::y, and Lamp::Vector3::z.

Plane Lamp::Plane::transform const Matrix33 matrix  )  const [inline]
 

トランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後の球

Definition at line 298 of file Plane.h.

References constant_, and normal_.


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