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

モデルリソースクラス More...

#include <GxResModel.h>

Inheritance diagram for GxResModel:
Collaboration diagram for GxResModel:

Classes

struct  GxHeader
 モデルリソースヘッダ構造体 More...
 
struct  GxImportSetting
 インポート設定 More...
 
struct  GxJoint
 モデルリソース関節構造体 More...
 
struct  GxMesh
 モデルリソースメッシュ構造体 More...
 
struct  GxMeshFile
 モデルリソースメッシュ構造体(ファイル用) More...
 
struct  GxMeshGroup
 モデルリソースメッシュグループ構造体 More...
 
struct  GxMeshGroupFile
 モデルリソースメッシュグループ構造体(ファイル用) More...
 
struct  GxModelCreateCallbackData
 作成時コールバック用データ More...
 

Public Types

定義
enum class  LOD {
  SUPER_HIGH , HIGH , MIDDLE , LOW ,
  SUPER_LOW , AUTO , MAX = AUTO , DISTANCE_MAX = MAX - 1
}
 LOD定義 More...
 
enum class  VERTEX_DECLARATION_ELEMENT_PRECISION_GROUP {
  POSITION , COLOR , TEXCOORD , NORMAL ,
  BINORMAL , TANGENT = BINORMAL , BINORMAL_TANGENT = BINORMAL , BLEND_WEIGHT ,
  BLEND_INDICES , MAX
}
 頂点データの精度グループの定義 More...
 
enum class  VERTEX_DECLARATION_ELEMENT_PRECISION_TYPE { FLOAT , HALF , MAX }
 頂点データの精度タイプの定義 More...
 
- Public Types inherited from GxResBase
enum class  ASYNC_STATE {
  LOADING = 0 , COMPLETE , CANCEL_REQUAST , INITIALIZED ,
  ERROR_ = -1 , CANCELED = -2
}
 非同期ロード状態 More...
 
enum class  ASYNC_PRIORITY { NORMAL = 0 , LOW }
 非同期ロード優先 More...
 
enum class  RESOURCE_BASE_ATTRIBUTE {
  USE_DATA_FROM_SYSTEM , ANY_PATH_RESOURCE , USE_MAIN_MEMORY , REGISTERED_NON_REPLACED ,
  ASYNC_SET_RESOURCE
}
 基底リソース属性定義 More...
 

Public Member Functions

アクセサ
constexpr const GX_CHAR * getStringTable (void) const
 文字列テーブルを取得
 
constexpr u32 getJointCount (void) const
 関節数を取得
 
constexpr GxJointgetJoint (u32 index) const
 関節データを取得
 
constexpr GxMatrixAffinegetOrientMatrix (u32 index) const
 オリエントマトリクスを取得
 
constexpr GxMatrixAffinegetInversMatrix (u32 index) const
 逆行列を取得
 
constexpr u32 getPartsCount (void) const
 パーツ数を取得
 
s32 getPartsIndex (GX_CSTR partsName) const
 パーツ名からインデックスを取得
 
constexpr u32 getMeshCount (void) const
 メッシュ数を取得
 
constexpr const GxMeshgetMesh (u32 index) const
 メッシュデータを取得
 
constexpr u32 getMeshGroupCount (void) const
 メッシュグループ数を取得
 
constexpr GxMeshGroupgetMeshGroup (u32 index) const
 メッシュグループデータを取得
 
constexpr u32 getMaterialCount (void) const
 マテリアル数を取得
 
constexpr GxCriticalSectiongetMaterialCriticalSection (void)
 マテリアル構築に関わる処理に対するクリティカルセクション取得
 
GX_FORCE_INLINE b32 isEnableRemapVertexBuffer (void)
 頂点バッファの書き換え可否を取得
 
u32 getMeshIndexFromPartsIndex (u32 partsIndex) const
 パーツインデックスからメッシュインデックスを取得
 
u32 getMeshGroupIndexFromMeshIndex (u32 meshIndex) const
 メッシュインデックスからメッシュグループインデックスを取得
 
GxRenderVertexDeclarationgetPartsVertexDeclaration (u32 index) const
 パーツの頂点宣言を取得
 
u32 getPartsVertexCount (u32 index) const
 パーツの頂点数を取得
 
u32 getPartsVertexStride (u32 index, u16 vertexStream) const
 パーツの頂点ストライドを取得
 
RENDER_INDEX_TYPE getPartsIndexType (u32 index) const
 パーツのインデックスタイプを取得
 
u32 getPartsIndexOffset (u32 index) const
 パーツのインデックスバッファオフセットを取得
 
u32 getPartsIndexCount (u32 index) const
 パーツのインデックス数を取得
 
u32 getPartsIndexMinimum (u32 index) const
 パーツの最小のインデックスを取得
 
GX_FORCE_INLINE const GxVector3getBoundingSphereCenter (void) const
 バウンディングスフィアの中心を取得
 
GX_FORCE_INLINE void setBoundingSphereCenter (const GxVector3 &center)
 バウンディングスフィアの中心を設定
 
constexpr f32 getBoundingSphereRadius (void) const
 バウンディングスフィアの半径を取得
 
constexpr void setBoundingSphereRadius (f32 radius)
 バウンディングスフィアの半径を設定
 
GX_FORCE_INLINE f32 getLodDistance (u32 index) const
 LOD距離を取得
 
GX_FORCE_INLINE void setLodDistance (u32 index, f32 distance)
 LOD距離を設定
 
- Public Member Functions inherited from GxResBase
s32 release (void) override
 解放
 
virtual GX_FORCE_INLINE void callback (void)
 
constexpr u64 getId (void) const
 ID取得
 
GX_FORCE_INLINE void setPath (GX_CSTR path)
 パス設定
 
constexpr GX_CSTR getPath (void) const
 パス取得
 
constexpr u32 getFileSize (void) const
 ファイルサイズ取得
 
constexpr u32 getSize (void) const
 サイズ取得
 
constexpr GxResBasegetConfig (void) const
 コンフィグ取得
 
constexpr ASYNC_STATE getAsyncState (void) const
 非同期ステート取得
 
GX_FORCE_INLINE b32 isAsyncState (ASYNC_STATE asyncState) const
 非同期ステート判定
 
GX_FORCE_INLINE b32 isAsyncStateWorking (void) const
 非同期動作中判定
 
constexpr ASYNC_PRIORITY getAsyncPriority (void) const
 非同期優先度取得
 
GX_FORCE_INLINE b32 isUsable (void) const
 使用可能判定
 
constexpr GX_CSTR getExtension (void) const
 拡張子取得
 
constexpr u32 getMagicNumber (void) const
 マジックナンバー取得
 
constexpr u32 getVersion (void) const
 バージョン取得
 
GX_FORCE_INLINE void setOriginalPath (GX_CSTR path)
 オリジナルパス設定
 
constexpr GX_CSTR getOriginalPath (void) const
 オリジナルパス取得
 
GX_FORCE_INLINE b32 isResourceBaseAttribute (RESOURCE_BASE_ATTRIBUTE attribute) const
 リソース属性判定
 
- Public Member Functions inherited from GxClassBaseReference
 GxClassBaseReference (void)
 コンストラクタ
 
 GxClassBaseReference (const GxClassBaseReference &base)
 コピーコンストラクタ
 
 ~GxClassBaseReference (void) override
 デストラクタ
 
constexpr GxClassBaseReferenceoperator= (const GxClassBaseReference &base)
 代入演算子
 
virtual s32 addReference (void)
 参照カウンタを加算
 
virtual s32 getReferenceCount (void) const
 参照カウンタを取得
 
constexpr void setDelayReleaseCount (s32 count)
 遅延解放カウンタを設定
 
void setDelayReleaseCountInfinity (b32 on)
 無限解放待ちの設定
 
- 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 _finalizedDataSize
 データサイズ
 
void * _pFinalizedData
 データ
 
GxHeader_pHeader
 ヘッダ
 
GX_CHAR * _pStringTable
 文字列テーブル
 
u16 * _pJointIndexTable
 関節インデックステーブル
 
GxJoint_pJoint
 関節
 
GxMatrixAffine_pOrientMatrix
 オリエントマトリクス
 
GxMatrixAffine_pInversMatrix
 逆行列
 
u32 * _pDestructionPartsCount
 破壊用パーツ数
 
GxMesh_pMesh
 メッシュ
 
GxMeshGroup_pMeshGroup
 メッシュグループ
 
GxCriticalSection _materialCriticalSection
 マテリアル構築に関わる処理に対するクリティカルセクション
 
b32 _enableRemapVertexBuffer
 頂点バッファの再mapを使うかどうか
 
- Protected Attributes inherited from GxClassBaseReference
s32 _referenceCount
 参照カウンタ
 
s32 _delayReleaseCount
 遅延解放カウンタ
 

初期化

 GxResModel (void)
 コンストラクタ (※本クラスの直接インスタンス化禁止)
 
void cleanup (void) override
 解放
 

操作

b32 loadMesh (const GxMeshFile *pMeshFile)
 メッシュを読み込む
 
b32 loadMeshGroup (const GxMeshGroupFile *pMeshGroupFile, const void *pVertexBufferFile, const void *pIndexBufferFile, const GxRenderVertexElement *pVertexElementFile)
 メッシュグループを読み込む
 
b32 load (GxStream &stream, u32 dataSize)
 リソース読み込み
 
void * mapPartsVertexBuffer (u32 index, u16 vertexStream, u32 mappingType)
 パーツの頂点バッファのマッピング開始
 
void unmapPartsVertexBuffer (u32 index, u16 vertexStream)
 パーツの頂点バッファのマッピング終了
 
void * mapPartsIndexBuffer (u32 index, u32 mappingType)
 パーツのインデックスバッファのマッピング開始
 
void unmapPartsIndexBuffer (u32 index)
 パーツのインデックスバッファのマッピング終了
 
void createCallback (void *pUser)
 リソース作成時コールバック
 

Additional Inherited Members

- Static Public Member Functions inherited from GxResBase
static void registerCustomProperty (void)
 カスタムプロパティ登録
 
static void customPropertyToString (GxProperty &property, GxTypedObject *pOwner, u32 index, GxString *pString, u32 &stringCount)
 カスタムプロパティ処理 (プロパティ → 文字列)
 
static void customPropertyFromString (GxProperty &property, GxTypedObject *pOwner, u32 index, GxString *pString, u32 stringCount)
 カスタムプロパティ処理 (文字列 → プロパティ)
 
static u32 customPropertyGetSerializedBinarySize (GxProperty &property, GxTypedObject *pOwner, u32 index)
 カスタムプロパティ処理 (シリアライズ後バイナリサイズ取得)
 
static void * customPropertySerializeBinary (GxProperty &property, GxTypedObject *pOwner, u32 index, void *pData)
 カスタムプロパティ処理 (バイナリシリアライズ)
 
static const void * customPropertyDeserializeBinary (GxProperty &property, GxTypedObject *pOwner, u32 index, const void *pData)
 カスタムプロパティ処理 (バイナリデシリアライズ)
 
- Static Public Member Functions inherited from GxClassBaseReference
static void initializeDelayRelease (void)
 遅延解放リストの初期化
 
static void terminateDelayRelease (void)
 遅延解放リストの終了
 
static void updateDelayRelease (void)
 遅延解放リストの更新
 
static b32 isDelayReleaseEnable (void)
 遅延解放システムの有効判定
 
static u32 getDelayReleaseListCount (void)
 遅延解放待ちの数を取得
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Static Public Attributes inherited from GxResBase
static const u32 RESOURCE_VERSION = 2
 リソースバージョン定義
 
static constexpr u32 RESOURCE_PATH_MAX = GxMath::VALUE_256
 リソースパス最大長
 
static constexpr u32 RESOURCE_CUSTOM_PROPERTY_STRING_NUM = GxMath::VALUE_2
 リソースカスタムプロパティ文字列登録数 (クラス名 + パス)
 
static constexpr u32 RESOURCE_PATH_ENCRYPT_KEY_NUM = GxMath::VALUE_8
 暗号化キー個数
 
- Static Public Attributes inherited from GxClassBaseReference
static constexpr s32 DELAY_RELEASE_COUNT_INFINITY = -1
 遅延解放の無限待ち定義
 
- Protected Member Functions inherited from GxResBase
 GxResBase (void)
 コンストラクタ (※本クラスの直接インスタンス化禁止)
 
void createCallback (void *pUser)
 生成時コールバック
 
b32 load (GxStream &stream, u32 size)
 ロード
 
b32 loadBinary (GxStream &stream)
 バイナリリソースのロード
 
constexpr void setId (u64 id)
 ID設定
 
constexpr void setFileSize (u32 fileSize)
 ファイルサイズ設定
 
constexpr void setSize (u32 size)
 サイズ設定
 
GX_FORCE_INLINE void setConfig (GxResBase *pConfig)
 コンフィグ設定
 
constexpr void setAsyncState (ASYNC_STATE asyncState)
 非同期ステート設定
 
constexpr void setAsyncPriority (ASYNC_PRIORITY asyncPriority)
 非同期優先度設定
 
constexpr GX_HANDLE getAsyncHandle (void) const
 非同期読込みハンドル取得
 
constexpr void setAsyncHandle (GX_HANDLE handle)
 非同期読込みハンドル設定
 
GX_FORCE_INLINE void setUsable (b32 flag)
 使用可能設定
 
GX_FORCE_INLINE GxZlibgetZlib (void)
 Zlib取得
 
constexpr void * getDataFromSystem (void)
 システム受け渡しデータを取得
 
GX_FORCE_INLINE void setResourceBaseAttribute (RESOURCE_BASE_ATTRIBUTE attribute, b32 enable)
 リソース属性設定
 

Detailed Description

モデルリソースクラス

Member Enumeration Documentation

◆ LOD

enum class GxResModel::LOD
strong

LOD定義

Enumerator
SUPER_HIGH 

最高クオリティ

HIGH 

高クオリティ

MIDDLE 

通常

LOW 

低クオリティ

SUPER_LOW 

最低クオリティ

AUTO 

自動設定

MAX 

定義数

DISTANCE_MAX 

LOD距離の定義数

◆ VERTEX_DECLARATION_ELEMENT_PRECISION_GROUP

頂点データの精度グループの定義

Enumerator
POSITION 

座標

COLOR 

TEXCOORD 

UV.

NORMAL 

法線

BINORMAL 

従法線

TANGENT 

接線

BINORMAL_TANGENT 

従接線

BLEND_WEIGHT 

ブレンドウェイト

BLEND_INDICES 

ブレンド

MAX 

定義数

◆ VERTEX_DECLARATION_ELEMENT_PRECISION_TYPE

頂点データの精度タイプの定義

Enumerator
FLOAT 

32bit

HALF 

16bit

MAX 

定義数

Member Function Documentation

◆ cleanup()

void GxResModel::cleanup ( void )
overridevirtual

解放

Reimplemented from GxResBase.

◆ createCallback()

void GxResModel::createCallback ( void * pUser)

リソース作成時コールバック

Parameters
pUser[in] ユーザーデータ

◆ getMeshGroupIndexFromMeshIndex()

u32 GxResModel::getMeshGroupIndexFromMeshIndex ( u32 meshIndex) const

メッシュインデックスからメッシュグループインデックスを取得

Parameters
meshIndexメッシュインデックス
Returns
メッシュグループインデックス
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMeshIndexFromPartsIndex()

u32 GxResModel::getMeshIndexFromPartsIndex ( u32 partsIndex) const

パーツインデックスからメッシュインデックスを取得

Parameters
partsIndexパーツインデックス
Returns
メッシュインデックス
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPartsIndex()

s32 GxResModel::getPartsIndex ( GX_CSTR partsName) const

パーツ名からインデックスを取得

Parameters
partsName[in] パーツ名
Returns
インデックス
Here is the call graph for this function:

◆ getPartsIndexCount()

u32 GxResModel::getPartsIndexCount ( u32 index) const

パーツのインデックス数を取得

Parameters
index[in] パーツインデックス
Returns
パーツのインデックス数
Here is the call graph for this function:

◆ getPartsIndexMinimum()

u32 GxResModel::getPartsIndexMinimum ( u32 index) const

パーツの最小のインデックスを取得

Parameters
index[in] パーツインデックス
Returns
パーツの最小のインデックス
Here is the call graph for this function:

◆ getPartsIndexOffset()

u32 GxResModel::getPartsIndexOffset ( u32 index) const

パーツのインデックスバッファオフセットを取得

Parameters
index[in] パーツインデックス
Returns
パーツのインデックスバッファオフセット
Here is the call graph for this function:

◆ getPartsIndexType()

RENDER_INDEX_TYPE GxResModel::getPartsIndexType ( u32 index) const

パーツのインデックスタイプを取得

Parameters
index[in] パーツインデックス
Returns
パーツのインデックスタイプ
Here is the call graph for this function:

◆ getPartsVertexCount()

u32 GxResModel::getPartsVertexCount ( u32 index) const

パーツの頂点数を取得

Parameters
index[in] パーツインデックス
Returns
パーツの頂点数
Here is the call graph for this function:

◆ getPartsVertexDeclaration()

GxRenderVertexDeclaration * GxResModel::getPartsVertexDeclaration ( u32 index) const

パーツの頂点宣言を取得

Parameters
index[in] パーツインデックス
Returns
パーツの頂点宣言
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPartsVertexStride()

u32 GxResModel::getPartsVertexStride ( u32 index,
u16 vertexStream ) const

パーツの頂点ストライドを取得

Parameters
index[in] パーツインデックス
vertexStream[in] 頂点ストリーム
Returns
パーツの頂点ストライド
Here is the call graph for this function:

◆ load()

b32 GxResModel::load ( GxStream & stream,
u32 dataSize )

リソース読み込み

Parameters
stream[in,out] 読み込み元ストリーム
dataSize[in] データサイズ
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadMesh()

b32 GxResModel::loadMesh ( const GxMeshFile * pMeshFile)
protected

メッシュを読み込む

Parameters
pMeshFile[in] ファイル用メッシュ
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadMeshGroup()

b32 GxResModel::loadMeshGroup ( const GxMeshGroupFile * pMeshGroupFile,
const void * pVertexBufferFile,
const void * pIndexBufferFile,
const GxRenderVertexElement * pVertexElementFile )
protected

メッシュグループを読み込む

Parameters
pMeshGroupFile[in] ファイル用メッシュグループ
pVertexBufferFile[in] ファイル用頂点バッファ
pIndexBufferFile[in] ファイル用インデックスバッファ
pVertexElementFile[in] ファイル用頂点要素
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapPartsIndexBuffer()

void * GxResModel::mapPartsIndexBuffer ( u32 index,
u32 mappingType )

パーツのインデックスバッファのマッピング開始

Parameters
index[in] パーツインデックス
mappingType[in] マッピングタイプ(RENDER_MAPPING_READONLY のみ有効)
Returns
マッピングされたアドレス
Here is the call graph for this function:

◆ mapPartsVertexBuffer()

void * GxResModel::mapPartsVertexBuffer ( u32 index,
u16 vertexStream,
u32 mappingType )

パーツの頂点バッファのマッピング開始

Parameters
indexパーツインデックス
vertexStream頂点ストリーム
mappingTypeマッピングタイプ(RENDER_MAPPING_READONLY または RENDER_MAPPING_WRITEONLY)
Returns
マッピングされたアドレス
Here is the call graph for this function:

◆ unmapPartsIndexBuffer()

void GxResModel::unmapPartsIndexBuffer ( u32 index)

パーツのインデックスバッファのマッピング終了

Parameters
index[in] パーツインデックス
Here is the call graph for this function:

◆ unmapPartsVertexBuffer()

void GxResModel::unmapPartsVertexBuffer ( u32 index,
u16 vertexStream )

パーツの頂点バッファのマッピング終了

Parameters
index[in] パーツインデックス
vertexStream[in] 頂点ストリーム
Here is the call graph for this function:

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