ランタイム
Frustum.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include "Mix/Geometry/AABB.h"
7 #include "Mix/Geometry/Plane.h"
8 #include "Mix/Geometry/Sphere.h"
9 
10 namespace Mix{ namespace Geometry{
11 
14  class Frustum
15  {
16  public:
20  {
21  PLANE_NEAR = 0,
22  PLANE_FAR = 1,
23  PLANE_TOP = 2,
25  PLANE_LEFT = 4,
27  };
28 
29  private:
30  Mix::Matrix4x4 m_ViewProjMat;
31  Mix::Geometry::Plane m_Planes[6];
32 
33  public:
35  Frustum( void );
38  Frustum( const Mix::Matrix4x4& viewProjMat );
39 
41  void Update( const Mix::Matrix4x4& viewProjMat );
42 
45  const Mix::Matrix4x4& GetViewProjectionMatrix( void ) const;
46 
51 
55  Boolean Contains( const Mix::Vector3& point ) const;
59  Boolean Contains( const Mix::Geometry::Sphere& sphere ) const;
63  Boolean ContainsTBLR( const Mix::Geometry::Sphere& sphere ) const;
68  Boolean Contains( const Mix::Geometry::AABB& aabb ) const;
73  Boolean ContainsTBLR( const Mix::Geometry::AABB& aabb ) const;
74  };
75 
76 }}
3次元浮動小数点ベクトルクラス
Definition: Vector3.h:12
フラスタムクラス
Definition: Frustum.h:14
スフィアクラスインクルードファイル
Definition: Frustum.h:22
const Mix::Geometry::Plane & GetPlane(Mix::Geometry::Frustum::PLANE_TYPE type) const
フラスタムを構成する平面を取得します
Definition: Frustum.h:23
Frustum(void)
コンストラクタ
AABBクラスインクルードファイル
AABBクラス
Definition: AABB.h:12
球クラス
Definition: Sphere.h:12
プレーンクラスインクルードファイル
Boolean ContainsTBLR(const Mix::Geometry::Sphere &sphere) const
球がフラスタム内に入っているかどうかを判定します( Top Bottom Left Right )
4x4行列クラス
Definition: Matrix4x4.h:12
const Mix::Matrix4x4 & GetViewProjectionMatrix(void) const
透視変換行列を取得します
Definition: Frustum.h:26
Definition: Frustum.h:24
ミックス
Definition: AtomicValue.h:6
PLANE_TYPE
プレーンタイプ列挙定数
Definition: Frustum.h:19
void Update(const Mix::Matrix4x4 &viewProjMat)
更新を行います
Boolean Contains(const Mix::Vector3 &point) const
点がフラスタム内に入っているかどうかを判定します
平面クラス
Definition: Plane.h:10
手前
Definition: Frustum.h:21
BOOL Boolean
32ビットブーリアン
Definition: Common.h:102
Definition: Frustum.h:25