カリング用オクツリー、階層的カリングを行う More...
#include <GxOtFrustumCulling.h>


Classes | |
| struct | GxCullingMeshParam |
| ジョブを投げる際に使うスレッド関数用のパラメータ More... | |
| class | GxCullingOctant |
| カリング用オクツリーのオクタント More... | |
| struct | GxHQeryParam |
| 階層クエリの為のパラメータ More... | |
Public Types | |
定義 | |
| enum | OCTANT { OCTANT_INSIDE = 2 , OCTANT_CROSS = 4 , OCTANT_OUTSIDE = 8 , OCTANT_FORCED = 16 , OCTANT_IGNORE = 32 , OCTANT_INIT = 64 } |
| オクタントステータス More... | |
Public Member Functions | |
初期化 | |
| GxOtFrustumCulling (void) | |
| デフォルトコンストラクタ | |
| GxOtFrustumCulling (GxAllocatorList::ALLOCATOR_TYPE allocateType) | |
| コンストラクタ | |
| ~GxOtFrustumCulling (void) override | |
| デストラクタ | |
アクセサ | |
| constexpr GxArray * | getGlobalMeshList (void) const |
| グローバルなメッシュリストを取得 | |
| constexpr GxArray * | getGlobalInstanceList (void) const |
| グローバルなインスタンスリストを取得 | |
| GX_FORCE_INLINE b32 | isJudgePartsFlagState (void) const |
| パーツフラグがOFFのメッシュならツリーに追加しないかどうかを判定 | |
| GX_FORCE_INLINE void | setJudgePartsFlagState (const b32 &value) |
| パーツフラグがOFFのメッシュならツリーに追加しないかどうかを設定 | |
| GX_FORCE_INLINE b32 | isEmpty (void) const override |
Public Member Functions inherited from GxOctree | |
| GxOctree (void) | |
| デフォルトコンストラクタ | |
| GxOctree (GxAllocatorList::ALLOCATOR_TYPE allocateType) | |
| コンストラクタ | |
| ~GxOctree (void) override | |
| デストラクタ | |
| 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) |
| 全てのオブジェクトを削除 | |
| 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) |
| ツリーのサイズを更新 | |
| GX_FORCE_INLINE void | startCulling (void) |
| カリング開始 | |
| GX_FORCE_INLINE void | endCulling (void) |
| カリング終了 | |
| u32 | getPointMortonCode (const f32 &x, const f32 &y, const f32 &z) const |
| 指定ポイントのモートン順序のコードを取得 | |
| u32 | getBBMortonCode (const GxVector3 &min, const GxVector3 &max) const |
| 二つの空間座標からBBが含まれる、最上位空間のモートンコードを取得 | |
| u32 | getMortonCode (const u32 &x, const u32 &y, const u32 &z) const |
| モートン順序のコードを取得 | |
| GX_FORCE_INLINE b32 | isRegisting (void) const |
| GX_FORCE_INLINE GxArray & | getNodeArray (void) |
| ノード配列を取得 | |
| GX_FORCE_INLINE const GxArray & | getNodeArray (void) const |
| ノード配列を取得 | |
| GX_FORCE_INLINE GxVector3 & | getUnitLength (void) |
| GX_FORCE_INLINE const GxVector3 & | getUnitLength (void) const |
| GX_FORCE_INLINE GxVector3 & | getMin (void) |
| GX_FORCE_INLINE const GxVector3 & | getMin (void) const |
| GX_FORCE_INLINE GxVector3 & | getMax (void) |
| GX_FORCE_INLINE const GxVector3 & | getMax (void) const |
| constexpr u32 | getTreeLevel (void) const |
| constexpr u32 | getNodeCount (void) const |
| GX_FORCE_INLINE const u32 | getLeafNodeCount (u32 leaf) const |
| GX_FORCE_INLINE const u32 | getUnitNodeCount (const u32 &level) const |
| constexpr GxArray * | getGlobalObjectList (void) const |
Public Member Functions inherited from GxClassBase | |
| constexpr | GxClassBase (void) |
| コンストラクタ | |
| constexpr | GxClassBase (const GxClassBase &base) |
| コピーコンストラクタ | |
| ~GxClassBase (void) override | |
| デストラクタ | |
Public Member Functions inherited from GxClassBaseRoot | |
| constexpr | GxClassBaseRoot (void) |
| コンストラクタ | |
| constexpr | GxClassBaseRoot (const GxClassBaseRoot &) |
| コピーコンストラクタ | |
| virtual | ~GxClassBaseRoot (void) |
| デストラクタ | |
| constexpr GxClassBaseRoot & | operator= (const GxClassBaseRoot &) |
| 代入演算子 | |
| virtual GxRtti & | getRtti (void) const =0 |
| Rttiの取得 | |
| virtual GX_FORCE_INLINE const GxTypedObject * | getDefaultObject (void) |
| デフォルトオブジェクトを取得 | |
| GX_FORCE_INLINE b32 | isDefaultObject (void) |
| デフォルトオブジェクト判定 | |
操作 | |
| void | eraseTree (void) override |
| ツリーの削除 | |
| void | resetCullingFlags (void) |
| 全てのオブジェクトのカリングフラグをリセット | |
| GxCullingMeshGroupAlias * | findMesh (const GxResModel::GxMesh *pMesh) const |
| メッシュが既に登録済みか検索 | |
| b32 | windowQueryForBB (GxArray &arvSpaces, const GxVector3 &min, const GxVector3 &max) override |
| ウインドウクエリを行う(階層カリング用) | |
| b32 | addMesh (const GxResModel::GxMesh *pMesh, const GxUnitModelBase *pUnit, u32 beginIndex, u32 endIndex, u8 ***pppCullingFlag, const GxVector3 &min, const GxVector3 &max) |
| オブジェクトをオクツリーに追加 | |
| b32 | eraseMesh (const GxResModel::GxMesh *pMesh, u32 beginIndex, u32 endIndex, const GxVector3 &min, const GxVector3 &max) |
| オブジェクトをオクツリーから削除 | |
| void | eraseAllMeshes (void) |
| 全てのオブジェクトを取り除く | |
| GxCullingInstanceAlias * | findInstance (const GxMatrixAffine *pMatrix, u32 index) |
| インスタンスが既に登録済みか検索 | |
| b32 | addInstance (const GxMatrixAffine *pMatrix, const GxUnitModelBase *pUnit, u32 beginIndex, u32 endIndex, u8 ***pppCullingFlag, const GxVector3 &min, const GxVector3 &max) |
| オブジェクトをオクツリーに追加 | |
| b32 | eraseInstance (GxMatrixAffine *pMatrix, u32 beginIndex, u32 endIndex, const GxVector3 &min, const GxVector3 &max) |
| オブジェクトをオクツリーから削除 | |
| void | eraseAllInstances (void) |
| 全てのオブジェクトを削除 | |
| void | hierarchicalQueryForFrustum (GxArray &arvSpaces, b32 **ppState, const GxShapeFrustum &frustum) |
| フラスタムを使って、階層的にクエリを行う | |
| void | hierarchicalQueryForFrustum (const GxShapeFrustum &frustum) |
| フラスタムを使って階層的にクエリを行う | |
| void | assembleHitNodeArray (GxArray &arvSpaces, b32 **ppState) |
| 階層カリングで交差判定が出たノードを取得 | |
| void | cullingMeshGroup (void *pArgument) |
| グループ単位でカリング処理(又はフラグ更新処理) | |
| void | cullingInstanceGroup (void *pArgument) |
| グループ単位でカリング処理(又はフラグ更新処理) | |
| void | cullingUnitGroup (void *pArgument) |
| グループ単位でカリング処理(又はフラグ更新処理) | |
| GxOctree::GxNode * | allocateNode (void) override |
| GxNodeのメモリ確保 | |
| void | hierarchicalQueryForFrustumCB (void *pArgument) |
| フラスタムを使って階層的にクエリを行う | |
Additional Inherited Members | |
Static Public Member Functions inherited from GxClassBaseRoot | |
| static GX_FORCE_INLINE GxRtti & | __getStaticRtti (void) |
| Rttiの取得 | |
Protected Member Functions inherited from GxOctree | |
| 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) |
| 下層の空間情報を取得 | |
| GX_FORCE_INLINE const u32 | getElementIndex (const u32 &level, const u32 &localIndex) const |
Protected Attributes inherited from GxOctree | |
| u32 | _level |
| u32 * | _pStartIndex |
| u32 * | _pUnitCount |
| GxVector3 | _leftTopBack |
| GxVector3 | _rightBottomFront |
| GxVector3 | _unitLength |
| GxArray | _nodePointerArray |
| b32 * | _pTemporaryFind |
| b32 * | _pDirtyFlags [GxThread::THREAD_MAX] |
| GxArray * | _pGlobalObjectList |
| インスタンスグローバルリスト | |
| GxCriticalSection | _criticalSectionArray |
| GxCriticalSection | _criticalSectionRegist |
| b32 | _inCulling |
| GxAllocatorList::ALLOCATOR_TYPE | _allocatorType |
| アロケータ種別 | |
カリング用オクツリー、階層的カリングを行う
| b32 GxOtFrustumCulling::addInstance | ( | const GxMatrixAffine * | pObject, |
| const GxUnitModelBase * | pWorldMatrix, | ||
| u32 | beginIndex, | ||
| u32 | endIndex, | ||
| u8 *** | pppCullingFlag, | ||
| const GxVector3 & | min, | ||
| const GxVector3 & | max ) |
オブジェクトをオクツリーに追加
| pObject | [in] 登録するオブジェクト |
| pWorldMatrix | [in] ワールドマトリクス |
| beginIndex | [in] 開始インデックス |
| endIndex | [in] 終了インデックス |
| pppCullingFlag | [in] カリングフラグ |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |

| b32 GxOtFrustumCulling::addMesh | ( | const GxResModel::GxMesh * | pObject, |
| const GxUnitModelBase * | pModel, | ||
| u32 | beginIndex, | ||
| u32 | endIndex, | ||
| u8 *** | pppCullingFlag, | ||
| const GxVector3 & | min, | ||
| const GxVector3 & | max ) |
オブジェクトをオクツリーに追加
| pObject | [in] オブジェクト |
| pModel | [in] モデル |
| beginIndex | [in] 開始インデックス |
| endIndex | [in] 終了インデックス |
| pppCullingFlag | [in] カリングフラグ |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |

|
overrideprotectedvirtual |
階層カリングで交差判定が出たノードを取得
| spaces | [in] バウンディングボックスに含まれる全てのノード |
| ppState | [in] ステータス |

| void GxOtFrustumCulling::cullingInstanceGroup | ( | void * | pArgument | ) |
グループ単位でカリング処理(又はフラグ更新処理)
| pArgument | [in] GxCullingInstanceParam型情報 |
| void GxOtFrustumCulling::cullingMeshGroup | ( | void * | pArgument | ) |
グループ単位でカリング処理(又はフラグ更新処理)
| pArgument | [in] GxCullingMeshParam型情報 |
| void GxOtFrustumCulling::cullingUnitGroup | ( | void * | pArgument | ) |
グループ単位でカリング処理(又はフラグ更新処理)
| pArgument | [in] GxCullingMeshParam型情報 |
| b32 GxOtFrustumCulling::eraseInstance | ( | GxMatrixAffine * | pObject, |
| u32 | beginIndex, | ||
| u32 | endIndex, | ||
| const GxVector3 & | min, | ||
| const GxVector3 & | max ) |
オブジェクトをオクツリーから削除
| pObject | [in] 登録するオブジェクト |
| beginIndex | [in] 開始インデックス |
| endIndex | [in] 終了インデックス |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |

| b32 GxOtFrustumCulling::eraseMesh | ( | const GxResModel::GxMesh * | pObject, |
| u32 | beginIndex, | ||
| u32 | endIndex, | ||
| const GxVector3 & | min, | ||
| const GxVector3 & | max ) |
オブジェクトをオクツリーから削除
| pObject | [in] オブジェクト |
| beginIndex | [in] 開始インデックス |
| endIndex | [in] 終了インデックス |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |

|
overridevirtual |
ツリーの削除
Reimplemented from GxOctree.


| GxCullingInstanceAlias * GxOtFrustumCulling::findInstance | ( | const GxMatrixAffine * | pObject, |
| u32 | index ) |
インスタンスが既に登録済みか検索
| pObject | [in] 検索対象のメッシュ |
| index | [in] 検索対象のメッシュインデックス |

| GxCullingMeshGroupAlias * GxOtFrustumCulling::findMesh | ( | const GxResModel::GxMesh * | pObject | ) | const |
メッシュが既に登録済みか検索
| pObject | [in] 検索対象のメッシュ |

| void GxOtFrustumCulling::hierarchicalQueryForFrustum | ( | const GxShapeFrustum & | frustum | ) |
フラスタムを使って階層的にクエリを行う
| frustum | フラスタム情報 |
| void GxOtFrustumCulling::hierarchicalQueryForFrustum | ( | GxArray & | spaces, |
| b32 ** | ppState, | ||
| const GxShapeFrustum & | frustum ) |
フラスタムを使って、階層的にクエリを行う
| spaces | [in] 全てのノード |
| ppState | [in] ステータス |
| frustum | [in] フラスタム情報 |

|
protected |
フラスタムを使って階層的にクエリを行う
| pArgument | クエリパラメータ |


|
inlineoverridevirtual |
|
overridevirtual |
ウインドウクエリを行う(階層カリング用)
| spaces | [in] バウンディングボックスに含まれる全てのノード |
| min | [in] バウンディングボックスのmin |
| max | [in] バウンディングボックスのmax |
Reimplemented from GxOctree.

