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

Lamp::Segment Class Reference

セグメント More...

#include <Segment.h>

List of all members.

Public Member Functions

 Segment ()
 コンストラクタ

 Segment (const Vector3 &origin, const Vector3 &direction)
 コンストラクタ

 Segment (float originX, float originY, float originZ, float directionX, float directionY, float directionZ)
 コンストラクタ

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

void set (const Vector3 &origin, const Vector3 &direction)
 値の設定

void set (float originX, float originY, float originZ, float directionX, float directionY, float directionZ)
 値の設定

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

void setOrigin (const Vector3 &origin)
 原点の設定

void setDirection (const Vector3 &direction)
 方向の設定

void setPositions (const Vector3 &source, const Vector3 &target)
 位置の設定

const Vector3getOrigin () const
 原点の取得

const Vector3getDirection () const
 方向の取得

const Vector3getSourcePosition () const
 ソース位置の取得

Vector3 getTargetPosition () const
 ターゲット位置の取得

bool isZero () const
 ゼロセグメントかどうか

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

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

Segment transform (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, float range=Math::epsilon) const
 ライン交差

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

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

bool intersect (const Ray &ray, float range=Math::epsilon) const
 レイ交差

bool intersect (const Segment &segment, float range=Math::epsilon) const
 セグメント交差

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

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

bool operator== (const Segment &target) const
 セグメントが同じかどうか

bool epsilonEquals (const Segment &target, float epsilon) const
 セグメントが同じかどうか

bool operator!= (const Segment &target) const
 セグメントが同じでないかどうか

bool notEpsilonEquals (const Segment &target, float epsilon) const
 セグメントが同じでないかどうか

String toString () const
 文字列化


Static Public Attributes

const Segment zero
 ゼロセグメント


Detailed Description

セグメント

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

Definition at line 51 of file Segment.h.


Constructor & Destructor Documentation

Lamp::Segment::Segment  )  [inline]
 

コンストラクタ

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

Definition at line 67 of file Segment.h.

Referenced by transform().

Lamp::Segment::Segment const Vector3 origin,
const Vector3 direction
[inline]
 

コンストラクタ

Parameters:
origin 原点の初期値
direction 方向の初期値

Definition at line 74 of file Segment.h.

Lamp::Segment::Segment float  originX,
float  originY,
float  originZ,
float  directionX,
float  directionY,
float  directionZ
[inline]
 

コンストラクタ

Parameters:
originX 原点Xの初期値
originY 原点Yの初期値
originZ 原点Zの初期値
directionX 方向Xの初期値
directionY 方向Yの初期値
directionZ 方向Zの初期値

Definition at line 87 of file Segment.h.

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

コンストラクタ

Parameters:
source 初期値配列

Definition at line 97 of file Segment.h.


Member Function Documentation

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

セグメントが同じかどうか

Parameters:
target 比較するセグメント
epsilon 誤差
Returns:
誤差の範囲内で同じ値であればtrueを返す

Definition at line 537 of file Segment.h.

References Assert, direction_, Lamp::Vector3::epsilonEquals(), and origin_.

const Vector3& Lamp::Segment::getDirection  )  const [inline]
 

方向の取得

Returns:
方向

Definition at line 178 of file Segment.h.

Referenced by Lamp::PlaneIntersection::intersect(), Lamp::AxisAlignedBoxIntersection::intersect(), Lamp::SegmentDistance::squaredDistance(), Lamp::RayDistance::squaredDistance(), and Lamp::LineDistance::squaredDistance().

float Lamp::Segment::getDistance const Triangle triangle  )  const [inline]
 

三角距離

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

Definition at line 413 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Sphere sphere  )  const [inline]
 

球距離

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

Definition at line 396 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Segment segment  )  const [inline]
 

セグメント距離

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

Definition at line 379 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Ray ray  )  const [inline]
 

レイ距離

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

Definition at line 362 of file Segment.h.

References getSquaredDistance().

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

平面距離

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

Definition at line 86 of file Segment.cpp.

float Lamp::Segment::getDistance const OrientedBox orientedBox  )  const [inline]
 

指向性ボックス距離

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

Definition at line 327 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Line line  )  const [inline]
 

ライン距離

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

Definition at line 310 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Cone cone  )  const [inline]
 

コーン距離

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

Definition at line 293 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Capsule capsule  )  const [inline]
 

カプセル距離

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

Definition at line 276 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const AxisAlignedBox axisAlignedBox  )  const [inline]
 

軸沿いボックス距離

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

Definition at line 259 of file Segment.h.

References getSquaredDistance().

float Lamp::Segment::getDistance const Vector3 point  )  const [inline]
 

点距離

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

Definition at line 242 of file Segment.h.

References getSquaredDistance().

Referenced by getSquaredDistance().

const Vector3& Lamp::Segment::getOrigin  )  const [inline]
 

原点の取得

Returns:
原点

Definition at line 172 of file Segment.h.

Referenced by Lamp::PlaneIntersection::intersect(), Lamp::AxisAlignedBoxIntersection::intersect(), Lamp::SegmentDistance::squaredDistance(), Lamp::RayDistance::squaredDistance(), and Lamp::LineDistance::squaredDistance().

const Vector3& Lamp::Segment::getSourcePosition  )  const [inline]
 

ソース位置の取得

Returns:
ソース位置

Definition at line 185 of file Segment.h.

float Lamp::Segment::getSquaredDistance const Triangle triangle  )  const
 

三角距離の二乗

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

Definition at line 106 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Sphere sphere  )  const
 

球距離の二乗

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

Definition at line 101 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Segment segment  )  const
 

セグメント距離の二乗

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

Definition at line 96 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Ray ray  )  const
 

レイ距離の二乗

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

Definition at line 91 of file Segment.cpp.

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

平面距離の二乗

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

Definition at line 351 of file Segment.h.

References getDistance().

float Lamp::Segment::getSquaredDistance const OrientedBox orientedBox  )  const
 

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

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

Definition at line 81 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Line line  )  const
 

ライン距離の二乗

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

Definition at line 76 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Cone cone  )  const
 

コーン距離の二乗

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

Definition at line 71 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Capsule capsule  )  const
 

カプセル距離の二乗

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

Definition at line 66 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const AxisAlignedBox axisAlignedBox  )  const
 

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

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

Definition at line 61 of file Segment.cpp.

float Lamp::Segment::getSquaredDistance const Vector3 point  )  const
 

点距離の二乗

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

Definition at line 56 of file Segment.cpp.

Referenced by getDistance(), and Lamp::SegmentIntersection::intersect().

Vector3 Lamp::Segment::getTargetPosition  )  const [inline]
 

ターゲット位置の取得

Returns:
ターゲット位置

Definition at line 191 of file Segment.h.

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

三角交差

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

Definition at line 163 of file Segment.cpp.

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

球交差

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

Definition at line 158 of file Segment.cpp.

bool Lamp::Segment::intersect const Segment segment,
float  range = Math::epsilon
const
 

セグメント交差

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

Definition at line 153 of file Segment.cpp.

bool Lamp::Segment::intersect const Ray ray,
float  range = Math::epsilon
const
 

レイ交差

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

Definition at line 148 of file Segment.cpp.

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

平面交差

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

Definition at line 143 of file Segment.cpp.

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

指向性ボックス交差

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

Definition at line 138 of file Segment.cpp.

bool Lamp::Segment::intersect const Line line,
float  range = Math::epsilon
const
 

ライン交差

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

Definition at line 133 of file Segment.cpp.

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

コーン交差

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

Definition at line 128 of file Segment.cpp.

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

カプセル交差

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

Definition at line 123 of file Segment.cpp.

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

軸沿いボックス交差

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

Definition at line 118 of file Segment.cpp.

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

点交差

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

Definition at line 113 of file Segment.cpp.

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

ゼロセグメントかどうか

Returns:
ゼロセグメントならtrue

Definition at line 200 of file Segment.h.

References Lamp::Vector3::epsilonEquals().

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

セグメントが同じでないかどうか

Parameters:
target 比較するセグメント
epsilon 誤差
Returns:
誤差の範囲内で同じでない値であればtrueを返す

Definition at line 560 of file Segment.h.

References Assert, direction_, Lamp::Vector3::notEpsilonEquals(), and origin_.

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

セグメントが同じでないかどうか

Parameters:
target 比較するセグメント
Returns:
同じでない値であればtrueを返す

Definition at line 549 of file Segment.h.

References direction_, and origin_.

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

セグメントが同じかどうか

Parameters:
target 比較するセグメント
Returns:
同じ値であればtrueを返す

Definition at line 526 of file Segment.h.

References direction_, and origin_.

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

値の設定

Parameters:
source 設定値配列

Definition at line 134 of file Segment.h.

References Lamp::Vector3::set().

void Lamp::Segment::set float  originX,
float  originY,
float  originZ,
float  directionX,
float  directionY,
float  directionZ
[inline]
 

値の設定

Parameters:
originX 設定する原点X
originY 設定する原点Y
originZ 設定する原点Z
directionX 設定する方向X
directionY 設定する方向Y
directionZ 設定する方向Z

Definition at line 124 of file Segment.h.

References Lamp::Vector3::set().

void Lamp::Segment::set const Vector3 origin,
const Vector3 direction
[inline]
 

値の設定

Parameters:
origin 設定する原点
direction 設定する方向

Definition at line 110 of file Segment.h.

void Lamp::Segment::setDirection const Vector3 direction  )  [inline]
 

方向の設定

Parameters:
direction 設定する方向

Definition at line 150 of file Segment.h.

void Lamp::Segment::setOrigin const Vector3 origin  )  [inline]
 

原点の設定

Parameters:
origin 設定する原点

Definition at line 144 of file Segment.h.

void Lamp::Segment::setPositions const Vector3 source,
const Vector3 target
[inline]
 

位置の設定

Parameters:
source ソース位置
target ターゲット位置

Definition at line 160 of file Segment.h.

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

文字列化

Returns:
セグメントの文字列表記

Definition at line 574 of file Segment.h.

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

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

トランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後のセグメント

Definition at line 230 of file Segment.h.

References Lamp::Matrix44::multiply33(), and Segment().

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

トランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後のセグメント

Definition at line 221 of file Segment.h.

References Lamp::Matrix34::multiply33(), and Segment().

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

トランスフォーム

Parameters:
matrix 乗算する行列
Returns:
変換後のセグメント

Definition at line 212 of file Segment.h.

References Segment().


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