Lumino.Math
 All Classes Functions Variables Friends
Public Member Functions
Lumino::ViewFrustum Class Reference

3D の視錐台を定義します。 More...

#include <ViewFrustum.h>

List of all members.

Public Member Functions

 ViewFrustum (const Matrix &viewProjMatrix)
 指定されたビュープロジェクション行列を使用して初期化します。
void SetViewProjMatrix (const Matrix &viewProjMatrix)
 指定されたビュープロジェクション行列を使用してこの視錐台を再構築します。
bool Intersects (const Vector3 &point) const
 指定した点がこの視錐台の内側にあるかを判定します。
bool Intersects (const Vector3 &center, float radius) const
 指定した球がこの視錐台と交差するかを判定します。
void GetCornerPoints (Vector3 *points) const
 錐台の各頂点を取得します。
const PlaneGetPlane (FrustumPlane plane) const
 錐台の指定した面を取得します。

Detailed Description

3D の視錐台を定義します。

視錐台は主に 3D 空間上のカメラの視野を表すために使用します。 カメラを表すビュープロジェクション行列から作成できます。

視錐台の外側にあるオブジェクトは通常、レンダリングする必要はありません。 Intersects() を使用して視錐台とオブジェクトの交差判定 (内側に存在するか) を行うことで、 レンダリングが必要かをチェックできます。


Constructor & Destructor Documentation

Lumino::ViewFrustum::ViewFrustum ( const Matrix viewProjMatrix)

指定されたビュープロジェクション行列を使用して初期化します。

Parameters:
[in]viewProjMatrix: 視錐台の生成に使用するビュープロジェクション行列

Member Function Documentation

錐台の各頂点を取得します。

Parameters:
[out]points: 頂点座標を格納する配列 (要素数は 8 であること)

頂点の順番は、Near平面の左上、右上、右下、左下、Far平面の左上、右上、右下、左下です。

bool Lumino::ViewFrustum::Intersects ( const Vector3 point) const

指定した点がこの視錐台の内側にあるかを判定します。

Parameters:
[in]point: 判定する点
Returns:
点が内側にある場合は true、そうでない場合は false。
bool Lumino::ViewFrustum::Intersects ( const Vector3 center,
float  radius 
) const

指定した球がこの視錐台と交差するかを判定します。

Parameters:
[in]center: 球の中心点
[in]radius: 球の半径
Returns:
交差する場合は true、そうでない場合は false。(接触している場合も true)
void Lumino::ViewFrustum::SetViewProjMatrix ( const Matrix viewProjMatrix)

指定されたビュープロジェクション行列を使用してこの視錐台を再構築します。

Parameters:
[in]viewProjMatrix: 視錐台の生成に使用するビュープロジェクション行列

The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends