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

オブジェクトあたりワールドクラス More...

#include <GxAttackHit.h>

Inheritance diagram for GxAttackHit::GxWorld:
Collaboration diagram for GxAttackHit::GxWorld:

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 check (void)
 
virtual void preBulletUpdate (void)
 
virtual void executePostCheckCallback (void)
 chekc後コールバックを実行
 
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)
 メッシュをリストから削除(アドレス指定版)
 
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)
 指定オブジェクトとのレイチェック
 
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)
 デフォルトオブジェクト判定
 

操作

void postBulletUpdate (void) override
 
GxCollision::GxRayCallbackcreateRayCallback (const btVector3 &rayFrom, const btVector3 &rayEnd, GxConditionInformation *pConditionInfo) override
 
GxCollision::GxConvexCallbackcreateConvexCallback (const btVector3 &checkFrom, const btVector3 &checkEnd, GxConditionInformation *pConditionInfo) override
 
void calculateHitObject (btPersistentManifold *pPersistentManifold)
 ヒットしたオブジェクトの処理
 
virtual void calculateAttackDirection (GxVector3 &direction, GxObject *pAttack, GxObject *pDamage, const GxVector3 &hitPositionOnDamage)
 攻撃方向ベクトルを計算
 

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)
 リスト個数設定
 
- 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のコリジョンアルゴリズム最大プールサイズ
 

Detailed Description

オブジェクトあたりワールドクラス

Member Function Documentation

◆ calculateAttackDirection()

void GxAttackHit::GxWorld::calculateAttackDirection ( GxVector3 & direction,
GxObject * pAttack,
GxObject * pDamage,
const GxVector3 & hitPositionOnDamage )
protectedvirtual

攻撃方向ベクトルを計算

Parameters
direction[out] 攻撃方向(正規化済)
pAttack[in] 攻撃側あたりオブジェクト
pDamage[in] ダメージ側あたりオブジェクト
hitPositionOnDamage[in] ダメージ側あたり上のヒット位置
Here is the call graph for this function:

◆ calculateHitObject()

void GxAttackHit::GxWorld::calculateHitObject ( btPersistentManifold * pManifold)
protected

ヒットしたオブジェクトの処理

Parameters
pManifold[in] マニフォルド
Here is the call graph for this function:

◆ createConvexCallback()

GxCollision::GxConvexCallback * GxAttackHit::GxWorld::createConvexCallback ( const btVector3 & rayFrom,
const btVector3 & rayTo,
GxConditionInformation * pConditionInformation )
overridevirtual

カプセルチェック用コールバックを生成 この関数が返すGxConvexCallbackをカスタマイズすることで フラグチェックなどのの挙動を変更することが出来ます。 詳しくはGxCollision::GxConvexCallbackのコメントを参照してください。

Parameters
rayFrom[in] 始点
rayTo[in] 終点
pConditionInformation[in] 条件情報
Returns
コールバック

Reimplemented from GxCollision::GxWorld.

◆ createRayCallback()

GxCollision::GxRayCallback * GxAttackHit::GxWorld::createRayCallback ( const btVector3 & rayFrom,
const btVector3 & rayTo,
GxConditionInformation * pConditionInformation )
overridevirtual

レイチェック用コールバックを生成 この関数が返すGxRayCallbackをカスタマイズすることで フラグチェックなどのの挙動を変更することが出来ます。 詳しくはGxCollision::GxRayCallbackのコメントを参照してください。

Parameters
rayFrom[in] 始点
rayTo[in] 終点
pConditionInformation[in] 条件情報
Returns
コールバック

Reimplemented from GxCollision::GxWorld.

◆ postBulletUpdate()

void GxAttackHit::GxWorld::postBulletUpdate ( void )
overridevirtual

Bullet更新後処理

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

Reimplemented from GxCollision::GxWorld.


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