OROCHI
 
Loading...
Searching...
No Matches
GxFlock Class Reference

群集 More...

#include <GxFlock.h>

Inheritance diagram for GxFlock:
Collaboration diagram for GxFlock:

Classes

struct  GxMemberOrderData
 指令用構造体定義 More...
 

Public Member Functions

初期化
 GxFlock (void)
 コンストラクタ
 
 ~GxFlock (void) override
 デストラクタ
 
操作
virtual void update (void)
 更新処理
 
void updateAverage (void)
 平均値を更新
 
void searchPathAStar (GxPathSet *pPathSet, GxPathSet::GxPathSetArea::SEARCH_TYPE type=GxPathSet::GxPathSetArea::SEARCH_TYPE::NEAR_, GxPathSet::GxPathSetArea::SEARCH_LENGTH length=GxPathSet::GxPathSetArea::SEARCH_LENGTH::SHORT)
 A*探索を実行
 
void setRoute (GxPathSet *pPathSet, u32 route)
 ルートを設定
 
virtual b32 checkGoal (f32 goalRange=GOAL_RANGE_DEFAULT)
 到着判定
 
virtual const GxVector3 getMoveDirect (GxUnitCharacterBase *pCharacter)
 移動方向を取得する
 
void eraseMember (GxUnitCharacterBase *pCharacter)
 メンバーを削除
 
- 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)
 デフォルトオブジェクト判定
 

Static Public Attributes

各種定義
static constexpr u32 INVALID_ID = 0xFFFFFFFF
 無効なID
 
static const f32 GOAL_RANGE_DEFAULT = 1.5f
 到着判定範囲
 
static const f32 MEMBER_DISTANCE_DEFAULT = 2.0f
 メンバー間の距離のデフォルト値
 

メンバ変数

GxSysUnit::GxListUnit _memberList
 メンバーリスト
 

アクセサ

u32 getId (void) const
 IDを取得
 
void setId (u32 id)
 IDを設定
 
virtual void addMember (GxUnitCharacterBase *pCharacter)
 メンバーを追加
 
constexpr u32 getNumMember (void) const
 メンバー数を取得
 
u32 getIndex (GxUnitCharacterBase *pCharacter)
 インデックスを取得
 
u32 getIndexExceptLeader (GxUnitCharacterBase *pCharacter)
 リーダーを除いたインデックスを取得
 
GxUnitCharacterBasegetMemberIndex (u32 index)
 インデックスでメンバーを取得
 
GxUnitCharacterBasegetNearMember (GxUnitCharacterBase *pCharacter)
 近くのメンバーを取得
 
GX_FORCE_INLINE GxSysUnit::GxListUnitgetMemberList (void)
 メンバーリストを取得
 
constexpr GxUnitCharacterBasegetLeader (void) const
 リーダーを取得
 
GX_FORCE_INLINE b32 isLeader (GxUnitCharacterBase *pUnit) const
 リーダーか判定
 
void changeLeader (void)
 リーダーを交代
 
void setLeader (GxUnitCharacterBase *pLeader)
 リーダーを設定
 
constexpr GxFlockgetTargetFlock (void) const
 ターゲットの群集を取得
 
constexpr void setTargetFlock (GxFlock *pFlock)
 ターゲットの群集を設定
 
GX_FORCE_INLINE const GxVector3 getPosAverage (void) const
 平均座標を取得
 
GX_FORCE_INLINE const GxVector3 getMoveDirectAverage (void) const
 平均移動方向を取得
 
GX_FORCE_INLINE b32 isPath (void) const
 パス移動か判定
 
GX_FORCE_INLINE void setPathFlag (b32 flag)
 パス移動か設定
 
GX_FORCE_INLINE GxPathgetPath (void)
 パスを取得
 
GX_FORCE_INLINE b32 isMoveFlock (void) const
 群集移動か判定
 
GX_FORCE_INLINE void setMoveFlock (b32 flag)
 群集移動か設定
 
constexpr void setMemberDistance (f32 distance)
 メンバー間距離の設定
 
constexpr void setRatioSeparation (f32 ratio)
 引き離しベクトル比率の設定
 
constexpr void setRatioAlignment (f32 ratio)
 整列ベクトル比率の設定
 
constexpr void setRatioCohesion (f32 ratio)
 結合ベクトル比率の設定
 

Additional Inherited Members

- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 

Detailed Description

群集

Member Function Documentation

◆ addMember()

void GxFlock::addMember ( GxUnitCharacterBase * pCharacter)
virtual

メンバーを追加

Parameters
pCharacter[in] 追加メンバー
Here is the call graph for this function:

◆ checkGoal()

b32 GxFlock::checkGoal ( f32 goalRange = GOAL_RANGE_DEFAULT)
virtual

到着判定

Parameters
goalRange[in] ゴール範囲
Returns
到着ならtrue
Here is the call graph for this function:

◆ eraseMember()

void GxFlock::eraseMember ( GxUnitCharacterBase * pCharacter)

メンバーを削除

Parameters
pCharacter[in] 削除するキャラクタ
Here is the call graph for this function:

◆ getIndex()

u32 GxFlock::getIndex ( GxUnitCharacterBase * pCharacter)

インデックスを取得

Parameters
pCharacter[in] 対象キャラクタ
Returns
インデックス

◆ getIndexExceptLeader()

u32 GxFlock::getIndexExceptLeader ( GxUnitCharacterBase * pCharacter)

リーダーを除いたインデックスを取得

Parameters
pCharacter[in] 対象キャラクタ
Returns
インデックス

◆ getMemberIndex()

GxUnitCharacterBase * GxFlock::getMemberIndex ( u32 index)

インデックスでメンバーを取得

Parameters
index[in] インデックス
Returns
対象メンバー
Here is the call graph for this function:

◆ getMoveDirect()

const GxVector3 GxFlock::getMoveDirect ( GxUnitCharacterBase * pCharacter)
virtual

移動方向を取得する

Parameters
pCharacter[in] 対象キャラクタ
Returns
方向
Here is the call graph for this function:

◆ getNearMember()

GxUnitCharacterBase * GxFlock::getNearMember ( GxUnitCharacterBase * pCharacter)

近くのメンバーを取得

Parameters
pCharacter[in] 対象キャラクタ
近くのメンバー
Here is the call graph for this function:
Here is the caller graph for this function:

◆ searchPathAStar()

A*探索を実行

Parameters
type[in] 探索タイプ
length[in] 距離条件
Here is the call graph for this function:

◆ setId()

void GxFlock::setId ( u32 id)

IDを設定

Parameters
id[in] ID
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLeader()

void GxFlock::setLeader ( GxUnitCharacterBase * pLeader)

リーダーを設定

Parameters
pLeader[in] リーダー
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRoute()

void GxFlock::setRoute ( GxPathSet * pPathSet,
u32 route )

ルートを設定

Parameters
pPathSet[in] 経路セット
route[in] ルートインデックス
Here is the call graph for this function:

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