8分木クラス
More...
#include <GxOctree.h>
|
| b32 | findObject (GxClassBaseRoot *pObject) const |
| | オブジェクトを検索
|
| |
| b32 | addObject (GxClassBaseRoot *pObject, const GxVector3 &min, const GxVector3 &max) |
| | オブジェクトをオクツリーに追加
|
| |
| b32 | eraseObject (GxClassBaseRoot *pObject, const GxVector3 &min, const GxVector3 &max) |
| | オブジェクトをオクツリーから削除
|
| |
|
void | eraseAllObject (void) |
| | 全てのオブジェクトを削除
|
| |
| virtual b32 | windowQueryForBB (GxArray &arvSpaces, const GxVector3 &min, const GxVector3 &max) |
| | ウインドウクエリを行う
|
| |
| void | initialize (u32 level, GxVector3 &min, GxVector3 &max, u32 levelNonShared=0, u32 numCsecShared=10) |
| |
|
virtual void | beginBuildTree (void) |
| | ツリーの構築
|
| |
|
virtual void | finishBuildTree (void) |
| | ツリーの破棄
|
| |
| b32 | updateTreeSize (GxVector3 &min, GxVector3 &max) |
| | ツリーのサイズを更新
|
| |
| virtual void | eraseTree (void) |
| | 全体を削除
|
| |
|
GX_FORCE_INLINE void | startCulling (void) |
| | カリング開始
|
| |
|
GX_FORCE_INLINE void | endCulling (void) |
| | カリング終了
|
| |
| virtual GxOctree::GxNode * | allocateNode (void) |
| | GxNodeのメモリ確保
|
| |
|
constexpr u32 | part1By2 (u32 value) const |
| | 3ビットトビに分割
|
| |
| void | queryHighLevel (s32 &levelCount, u32 &arExorN, const GxVector3 &min, const GxVector3 &max) const |
| | 与えれれた座標でAABB、直線などが作られる場合にのオブジェクトが含まれれる最上位空間を取得
|
| |
| void | queryLowerLevelSpaces (const GxVector3 &leftTopBack, const u32 &initialAABB, const u32 &aunParentLevelN, const u32 &aunParentSpace, b32 *pDirtyFlags) |
| | 下層の空間情報を取得
|
| |
|
|
static GX_FORCE_INLINE GxRtti & | __getStaticRtti (void) |
| | Rttiの取得
|
| |
◆ GxOctree()
◆ addObject()
オブジェクトをオクツリーに追加
- Parameters
-
| pObject | [in] 登録するオブジェクト |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |
- Returns
- 成功したらtrue
◆ allocateNode()
◆ eraseObject()
オブジェクトをオクツリーから削除
- Parameters
-
| pObject | [in] 削除するオブジェクト |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |
- Returns
- 成功したらtrue
◆ eraseTree()
| void GxOctree::eraseTree |
( |
void | | ) |
|
|
virtual |
◆ findObject()
オブジェクトを検索
- Parameters
-
- Returns
- 発見したらtrue
◆ getBBMortonCode()
二つの空間座標からBBが含まれる、最上位空間のモートンコードを取得
- Parameters
-
| min | バウンディングボックスのmin座標 |
| max | バウンディングボックスのmax座標 |
- Returns
- モートンコード
◆ getElementIndex()
| GX_FORCE_INLINE const u32 GxOctree::getElementIndex |
( |
const u32 & | level, |
|
|
const u32 & | localIndex ) const |
|
inlineprotected |
要素数を取得
- Parameters
-
| level | [in] レベル |
| localIndex | [in] インデックス |
- Returns
- 要素数
◆ getGlobalObjectList()
| GxArray * GxOctree::getGlobalObjectList |
( |
void | | ) |
const |
|
inlineconstexpr |
グローバルのオブジェクトリストを取得
- Returns
- リスト
◆ getLeafNodeCount()
| GX_FORCE_INLINE const u32 GxOctree::getLeafNodeCount |
( |
u32 | leaf | ) |
const |
|
inline |
葉のノード数の取得
- Parameters
-
- Returns
- ノード数
◆ getMax() [1/2]
| GX_FORCE_INLINE GxVector3 & GxOctree::getMax |
( |
void | | ) |
|
|
inline |
ツリーのAABBの最大値を取得
- Returns
- 最大値
◆ getMax() [2/2]
| GX_FORCE_INLINE const GxVector3 & GxOctree::getMax |
( |
void | | ) |
const |
|
inline |
ツリーのAABBの最大値を取得
- Returns
- 最大値
◆ getMin() [1/2]
| GX_FORCE_INLINE GxVector3 & GxOctree::getMin |
( |
void | | ) |
|
|
inline |
ツリーのAABBの最小値を取得
- Returns
- 最小値
◆ getMin() [2/2]
| GX_FORCE_INLINE const GxVector3 & GxOctree::getMin |
( |
void | | ) |
const |
|
inline |
ツリーのAABBの最小値を取得
- Returns
- 最小値
◆ getMortonCode()
| u32 GxOctree::getMortonCode |
( |
const u32 & | x, |
|
|
const u32 & | y, |
|
|
const u32 & | z ) const |
モートン順序のコードを取得
- Parameters
-
- Returns
- モートンコード
◆ getNodeArray() [1/2]
| GX_FORCE_INLINE GxArray & GxOctree::getNodeArray |
( |
void | | ) |
|
|
inline |
◆ getNodeArray() [2/2]
| GX_FORCE_INLINE const GxArray & GxOctree::getNodeArray |
( |
void | | ) |
const |
|
inline |
◆ getNodeCount()
| u32 GxOctree::getNodeCount |
( |
void | | ) |
const |
|
inlineconstexpr |
◆ getPointMortonCode()
| u32 GxOctree::getPointMortonCode |
( |
const f32 & | x, |
|
|
const f32 & | y, |
|
|
const f32 & | z ) const |
指定ポイントのモートン順序のコードを取得
- Parameters
-
| x | [in] X座標 |
| y | [in] Y座標 |
| z | [in] Z座標 |
- Returns
- モートンコード
◆ getTreeLevel()
| u32 GxOctree::getTreeLevel |
( |
void | | ) |
const |
|
inlineconstexpr |
◆ getUnitLength() [1/2]
| GX_FORCE_INLINE GxVector3 & GxOctree::getUnitLength |
( |
void | | ) |
|
|
inline |
ツリーの最下層オクタントのサイズを取得
- Returns
- サイズ
◆ getUnitLength() [2/2]
| GX_FORCE_INLINE const GxVector3 & GxOctree::getUnitLength |
( |
void | | ) |
const |
|
inline |
ツリーの最下層オクタントのサイズを取得
- Returns
- サイズ
◆ getUnitNodeCount()
| GX_FORCE_INLINE const u32 GxOctree::getUnitNodeCount |
( |
const u32 & | level | ) |
const |
|
inline |
各軸に配置されるノード数を取得
- Parameters
-
- Returns
- ノード数
◆ initialize()
| void GxOctree::initialize |
( |
u32 | level, |
|
|
GxVector3 & | min, |
|
|
GxVector3 & | max, |
|
|
u32 | levelNonShared = 0, |
|
|
u32 | numCriticalSectionShared = 10 ) |
ツリーを初期化 levelNonShared, numCsecSharedを変更することで、使用する同期オブジェクト数が変わる。
- Parameters
-
| level | [in] ツリーの深さ |
| min | [in] オクツリーのバウンディングボックスのmin |
| max | [in] オクツリーのバウンディングボックスのmax |
| levelNonShared | [in] 同期オブジェクトを共有しないツリー深さ。生成されるオブジェクト数は1で1+8, 2で1+8+64, 3で1+8+64+512... |
| numCriticalSectionShared | [in] 共有同期オブジェクトの数 |
◆ isEmpty()
| virtual b32 GxOctree::isEmpty |
( |
void | | ) |
const |
|
inlinevirtual |
◆ isRegisting()
| GX_FORCE_INLINE b32 GxOctree::isRegisting |
( |
void | | ) |
const |
|
inline |
カリング中判定
- Returns
- カリング中ならtrue
◆ queryHighLevel()
| void GxOctree::queryHighLevel |
( |
s32 & | levelCount, |
|
|
u32 & | arExorN, |
|
|
const GxVector3 & | min, |
|
|
const GxVector3 & | max ) const |
|
protected |
与えれれた座標でAABB、直線などが作られる場合にのオブジェクトが含まれれる最上位空間を取得
- Parameters
-
| levelCount | [out] ツリーの深さ |
| arExorN | [out] ??? |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |
◆ queryLowerLevelSpaces()
| void GxOctree::queryLowerLevelSpaces |
( |
const GxVector3 & | leftTopBack, |
|
|
const u32 & | initAABB, |
|
|
const u32 & | parentLevelCount, |
|
|
const u32 & | parentSpace, |
|
|
b32 * | pDirtyFlags ) |
|
protected |
下層の空間情報を取得
- Parameters
-
| leftTopBack | [in] 左上前座標 |
| initAABB | [in] 最初のAABB |
| parentLevelCount | [in] 親のレベル階層 |
| parentSpace | [in] 親の空間 |
| pDirtyFlags | [in] ダーティフラグ |
◆ updateTreeSize()
ツリーのサイズを更新
- Parameters
-
| min | オクツリーのバウンディングボックスのmin |
| max | オクツリーのバウンディングボックスのmax |
- Returns
- ツリーの定義域に変化があればtrue,なければfalse
◆ windowQueryForBB()
ウインドウクエリを行う
- Parameters
-
| spaces | [out] BoudingBoxに含まれる全てのノード |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |
- Returns
- ノードが1つ以上あればtrue
Reimplemented in GxOtFrustumCulling.
The documentation for this class was generated from the following files:
- C:/Users/t-arai/Documents/workspace/orochi_package_windows/middleware/GxCore/src/GxOctree.h
- C:/Users/t-arai/Documents/workspace/orochi_package_windows/middleware/GxCore/src/GxOctree.cpp