OROCHI
 
Loading...
Searching...
No Matches
GxAdjustHit::GxWorld Class Reference

背景あたりワールドクラス More...

#include <GxAdjustHit.h>

Inheritance diagram for GxAdjustHit::GxWorld:
Collaboration diagram for GxAdjustHit::GxWorld:

Classes

struct  GxAdjustInfo
 補正情報構造体 More...
 

Public Member Functions

初期化
 GxWorld (void)
 デフォルトコンストラクタ
 
 ~GxWorld (void) override
 デストラクタ
 
- Public Member Functions inherited from GxCollision::GxWorld
 GxWorld (void)
 デフォルトコンストラクタ
 
 ~GxWorld (void) override
 デストラクタ
 
virtual b32 alloc (u32 meshCount, const GxVector3 &worldAabbMin, const GxVector3 &worldAabbMax, u16 maxHandles, u32 stackAllocatorSize=GX_COLLISION_DEFAULT_STACK_ALLOCATOR_SIZE, u32 maxPersistentManifoldPoolSize=GX_COLLISION_DEFAULT_MAX_PERSISTENT_MANIFOLD_POOL_SIZE, u32 maxCollisionAlgorithmPoolSize=GX_COLLISION_DEFAULT_MAX_COLLISION_ALGORITHM_POOL_SIZE)
 ワールドのメモリ確保
 
virtual void prepareCheck (void)
 当たり判定チェック前準備
 
virtual void preBulletUpdate (void)
 
virtual GX_FORCE_INLINE void postCheck (void)
 check後処理
 
virtual void registerObject (GxCollision::GxObject *pObject)
 ワールドにオブジェクトを登録する
 
void banObject (GxCollision::GxObject *pObject)
 ワールドからオブジェクトを登録解除する
 
void addClass (u32 threadIndex, GxCollision *pObject)
 クラス登録
 
void detachClass (GxCollision *pCollision)
 クラス削除
 
void detachObjectFromBullet (GxObject *pObject)
 Bulletワールドからデタッチ
 
constexpr btCollisionWorld * getBulletWorld (void) const
 Bulletワールドを取得
 
b32 createBulletWorld (void)
 
b32 deleteBulletWorld (void)
 
void freeMesh (void)
 メッシュリストの解放
 
b32 addMesh (u32 index, GxCollision::GxObject *pMesh)
 背景当たりをリストに追加
 
b32 eraseMesh (GxCollision::GxObject *pMesh)
 メッシュをリストから削除(アドレス指定版)
 
virtual GxCollision::GxRayCallbackcreateRayCallback (const btVector3 &rayFrom, const btVector3 &rayEnd, GxConditionInformation *pConditionInfo)
 
b32 checkRayClosestVsWorld (GxCollision::GxRayResult &rayResult, const GxVector3 &startPosition, const GxVector3 &endPosition, GxConditionInformation *pConditionInfo=nullptr)
 登録されている全オブジェクトとのレイチェック(最も近い交差点)
 
b32 checkRayClosestVsSingle (GxCollision::GxRayResult &rayResult, GxObject *pTargetObject, const GxVector3 &startPosition, const GxVector3 &endPosition, GxConditionInformation *pConditionInfo=nullptr)
 指定オブジェクトとのレイチェック
 
virtual GxCollision::GxConvexCallbackcreateConvexCallback (const btVector3 &checkFrom, const btVector3 &checkEnd, GxConditionInformation *pConditionInfo)
 
b32 checkCapsuleClosestVsWorld (GxCollision::GxRayResult &rayResult, const GxVector3 &startPosition, const GxVector3 &endPosition, f32 radius, GxConditionInformation *pConditionInfo=nullptr)
 
b32 checkCapsuleClosestVsSingle (GxCollision::GxRayResult &rayResult, GxObject *pTargetObject, const GxVector3 &startPosition, const GxVector3 &endPosition, f32 radius, GxConditionInformation *pConditionInfo=nullptr)
 
GX_FORCE_INLINE void setActive (b32 active)
 アクティブ設定
 
GX_FORCE_INLINE b32 isActive (void)
 アクティブか判定
 
b32 setMeshCount (u32 count)
 メッシュ登録個数設定
 
GxCollision::GxObjectgetMesh (u32 index)
 メッシュアドレスの取得
 
constexpr u32 getMeshCount (void) const
 メッシュオブジェクト個数の取得
 
u32 getActiveMeshCount (void)
 アクティブな個数の取得
 
constexpr u32 getListClassCount (void) const
 リスト個数取得
 
b32 setListClassCount (u32 count)
 リスト個数設定
 
constexpr GxArrayClassBasegetListClass (u32 index) const
 リストの取得
 
constexpr u32 getCollisionCount (void) const
 登録コリジョンの個数を取得
 
GX_FORCE_INLINE GxArrayClassBasegetCollisionList (void)
 登録コリジョンリストを取得
 
- 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 GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

Protected Attributes

メンバ変数
u32 _checkLoopMax
 最大チェック回数(増やすとカドでのガタガタ等が減る。ただし重くなる。)
 
- Protected Attributes inherited from GxCollision::GxWorld
b32 _active
 処理を実行するかフラグ
 
u32 _listClassCount
 リストの個数
 
GxArrayClassBase ** _ppCollisionList
 AddされたCollisionクラスをスレッド毎に記憶するリスト
 
GxArrayClassBase _collisionList
 Collisionクラスを記憶するリスト
 
btCollisionConfiguration * _pBulletConfiguration
 BULLET当たり設定
 
btCollisionDispatcher * _pBulletDispatcher
 BULLET当たり判定用
 
btAxisSweep3 * _pBulletBroadphase
 BULLETブロードフェイズ処理用
 
btCollisionWorld * _pBulletWorld
 BULLETコリジョンワールド
 
btCollisionAlgorithmCreateFunc * _pBulletAlgorithmCreateFunction [COLLISION_ALGORITHM_NUM]
 BULLET判定用アルゴリズム
 
GxVector3 _worldAabbMin
 ワールドAABBのMin
 
GxVector3 _worldAabbMax
 ワールドAABBのMax
 
u16 _maxHandles
 当たり判定オブジェクト個数
 
u32 _btStackAllocatorSize
 Bulletのスタックアロケーターサイズ
 
u32 _btMaxPersistentManifoldPoolSize
 Bulletのマニフォールドの最大プールサイズ
 
u32 _btMaxCollisionAlgorithmPoolSize
 Bulletのコリジョンアルゴリズム最大プールサイズ
 

操作

void check (void) override
 
void postBulletUpdate (void) override
 
void executePostCheckCallback (void) override
 チェック後コールバックを実行
 
void calculateAdjustInformation (btPersistentManifold *pPersistentManifold)
 ヒットしたオブジェクト同士の補正情報計算
 
virtual void calculateAdjustVector (GxObject *pObjectA, GxObject *pObjectB, const GxAdjustInfo &adjustInfo)
 補正ベクトルの計算
 
void addAdjustInformation (GxObject *pObject, const f32 length, const GxVector3 &normal)
 補正情報の追加
 
virtual f32 calculateAdjustRate (GxObject *pObjectA, GxObject *pObjectB)
 補正割合の計算
 

Additional Inherited Members

- Static Public Member Functions inherited from GxCollision::GxWorld
static void customNearCallback (btBroadphasePair &collisionPair, btCollisionDispatcher &dispatcher, const btDispatcherInfo &dispatchInfo)
 近距離当たり判定コールバック(BULLETで用意されたものをオーバーライド)
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Static Public Attributes inherited from GxCollision::GxWorld
static constexpr u32 COLLISION_ALGORITHM_NUM = GxMath::VALUE_2
 アルゴリズム個数
 
static constexpr u32 GX_COLLISION_DEFAULT_STACK_ALLOCATOR_SIZE = GxMath::VALUE_64K
 コリジョンのスタックアロケーターサイズデフォルト値
 
static constexpr u32 GX_COLLISION_DEFAULT_MAX_PERSISTENT_MANIFOLD_POOL_SIZE = GxMath::VALUE_8
 コリジョンの汎用的な最大プールサイズデフォルト値
 
static constexpr u32 GX_COLLISION_DEFAULT_MAX_COLLISION_ALGORITHM_POOL_SIZE = GxMath::VALUE_8
 コリジョンのコリジョンアルゴリズム用最大プールサイズデフォルト値
 
- Protected Member Functions inherited from GxCollision::GxWorld
GX_FORCE_INLINE void getPropertyList (void *const pValue, u32 index)
 再生クラスアドレスの取得
 
GX_FORCE_INLINE void setPropertyList (const void *const, u32)
 再生クラスアドレスの設定
 
GX_FORCE_INLINE void setPropertyListClassCount (u32 count)
 リスト個数設定
 

Detailed Description

背景あたりワールドクラス

Member Function Documentation

◆ addAdjustInformation()

void GxAdjustHit::GxWorld::addAdjustInformation ( GxObject * pObject,
const f32 length,
const GxVector3 & direction )
protected

補正情報の追加

Parameters
pObject[in] オブジェクト
length[in] 追加する補正ベクトルの長さ
direction[in] 補正方向
Note
追加する補正ベクトル = length * direction
Here is the call graph for this function:

◆ calculateAdjustInformation()

void GxAdjustHit::GxWorld::calculateAdjustInformation ( btPersistentManifold * pPersistentManifold)
protected

ヒットしたオブジェクト同士の補正情報計算

Parameters
pPersistentManifold[in] BULLET側のオブジェクト同士の当たり情報
Here is the call graph for this function:

◆ calculateAdjustRate()

f32 GxAdjustHit::GxWorld::calculateAdjustRate ( GxObject * pObjectA,
GxObject * pObjectB )
protectedvirtual

補正割合の計算

Parameters
pObjectA[in] オブジェクトA
pObjectB[in] オブジェクトB
Returns
オブジェクトAが補正される割合

Reimplemented in GxBackgroundHit::GxWorld, and GxObjectHit::GxWorld.

Here is the call graph for this function:

◆ calculateAdjustVector()

void GxAdjustHit::GxWorld::calculateAdjustVector ( GxObject * pObjectA,
GxObject * pObjectB,
const GxAdjustInfo & adjustInformation )
protectedvirtual

補正ベクトルの計算

Parameters
pObjectA[in] オブジェクトA
pObjectB[in] オブジェクトB
adjustInformation[in] 補正情報

◆ check()

void GxAdjustHit::GxWorld::check ( void )
overridevirtual

当たり判定チェック

Note
update() -> Bulletでの計算 -> hit() -> adjust()
preBulletUpdate() -> Bulletでの計算 -> postBulletUpdate() -> executePostCheckCallback()

Reimplemented from GxCollision::GxWorld.

Here is the call graph for this function:

◆ executePostCheckCallback()

void GxAdjustHit::GxWorld::executePostCheckCallback ( void )
overridevirtual

チェック後コールバックを実行

Reimplemented from GxCollision::GxWorld.

◆ postBulletUpdate()

void GxAdjustHit::GxWorld::postBulletUpdate ( void )
overridevirtual

Bullet更新後処理

Note
コリジョンのデータをBulletから受け取る

Reimplemented from GxCollision::GxWorld.


The documentation for this class was generated from the following files: