UniDx
読み取り中…
検索中…
一致する文字列を見つけられません
UniDx::GltfModel クラス

glTF形式(.glb)のモデルデータを読み込んでレンダラーを生成するコンポーネント [詳解]

#include <GltfModel.h>

UniDx::GltfModel の継承関係図
UniDx::Component UniDx::Object

公開メンバ関数

const std::unordered_map< int, std::shared_ptr< Material > > & GetMaterials ()
template<typename TVertex>
bool Load (const u8string &modelPath, const u8string &shaderPath)
 glTF形式のモデルファイルを読み込む(モデルファイル、シェーダを指定) glb 内包テクスチャが存在する場合は、baseColorTexture を生成してマテリアルに設定する 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある
template<typename TVertex>
bool Load (const u8string &modelPath, const u8string &shaderPath, std::shared_ptr< Texture > texture)
 glTF形式のモデルファイルを読み込む(モデル、シェーダ、テクスチャ1枚を指定) 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある
template<typename TVertex>
bool Load (const u8string &modelPath, const u8string &shaderPath, const u8string &texturePath)
 glTF形式のモデルファイルを読み込む(モデル、シェーダ、1枚のテクスチャファイルを指定) 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある
template<typename TVertex>
bool Load (const u8string &modelPath, std::shared_ptr< Material > material)
 glTF形式のモデルファイルを読み込む(モデルファイル、共有マテリアルを指定) 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある
template<typename TVertex>
bool Load (const u8string &filePath, bool makeTextureMaterial, std::shared_ptr< Shader > shader)
void AddMaterial (int index, std::shared_ptr< Material > material)
void SetAddressModeUV (Texture *texture, int texIndex) const
基底クラス UniDx::Component に属する継承公開メンバ関数
void checkAwake ()
void checkStart ()
bool isDestroyed () const
virtual ~Component ()
基底クラス UniDx::Object に属する継承公開メンバ関数
virtual ~Object ()
 Object (ReadOnlyProperty< StringId >::Getter nameGet)

限定公開メンバ関数

virtual bool load_ (const char *filePath, bool makeTextureMaterial, std::shared_ptr< Shader > shader)
virtual void readPrimitive (UniDx::Mesh *mesh, const tinygltf::Primitive &primitive)
virtual void createNodeRecursive (const tinygltf::Model &model, int nodeIndex, GameObject *parentGO, bool attachIncludeMaterial)
virtual std::shared_ptr< TexturegetOrCreateTextureFromGltf_ (int textureIndex, bool isSRGB)
基底クラス UniDx::Component に属する継承限定公開メンバ関数
virtual void Awake ()
virtual void Start ()
virtual void OnEnable ()
virtual void OnDisable ()
virtual void OnDestroy ()
 Component ()
void doDestroy ()

限定公開変数類

std::vector< MeshRenderer * > renderer
std::unordered_map< int, std::shared_ptr< Material > > materials
std::unique_ptr< tinygltf::Model > model
std::vector< std::shared_ptr< Mesh > > meshes
std::unordered_map< int, std::shared_ptr< Texture > > textures
std::unordered_map< int, Transform * > nodes
std::unordered_map< int, SkinInstanceskinInstance
基底クラス UniDx::Component に属する継承限定公開変数類
bool isCalledAwake
bool isCalledStart
bool isCalledDestroy
bool _enabled

その他の継承メンバ

基底クラス UniDx::Component に属する継承公開変数類
Property< bool > enabled
ReadOnlyProperty< Transform * > transform
GameObjectgameObject = nullptr
基底クラス UniDx::Object に属する継承公開変数類
ReadOnlyProperty< StringIdname

詳解

glTF形式(.glb)のモデルデータを読み込んでレンダラーを生成するコンポーネント

関数詳解

◆ AddMaterial()

void UniDx::GltfModel::AddMaterial ( int index,
std::shared_ptr< Material > material )
inline

◆ createNodeRecursive()

void UniDx::GltfModel::createNodeRecursive ( const tinygltf::Model & model,
int nodeIndex,
GameObject * parentGO,
bool attachIncludeMaterial )
protectedvirtual

◆ GetMaterials()

const std::unordered_map< int, std::shared_ptr< Material > > & UniDx::GltfModel::GetMaterials ( )
inline

◆ getOrCreateTextureFromGltf_()

std::shared_ptr< Texture > UniDx::GltfModel::getOrCreateTextureFromGltf_ ( int textureIndex,
bool isSRGB )
protectedvirtual

◆ Load() [1/5]

template<typename TVertex>
bool UniDx::GltfModel::Load ( const u8string & filePath,
bool makeTextureMaterial,
std::shared_ptr< Shader > shader )
inline

◆ Load() [2/5]

template<typename TVertex>
bool UniDx::GltfModel::Load ( const u8string & modelPath,
const u8string & shaderPath )
inline

glTF形式のモデルファイルを読み込む(モデルファイル、シェーダを指定) glb 内包テクスチャが存在する場合は、baseColorTexture を生成してマテリアルに設定する 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある

◆ Load() [3/5]

template<typename TVertex>
bool UniDx::GltfModel::Load ( const u8string & modelPath,
const u8string & shaderPath,
const u8string & texturePath )
inline

glTF形式のモデルファイルを読み込む(モデル、シェーダ、1枚のテクスチャファイルを指定) 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある

◆ Load() [4/5]

template<typename TVertex>
bool UniDx::GltfModel::Load ( const u8string & modelPath,
const u8string & shaderPath,
std::shared_ptr< Texture > texture )
inline

glTF形式のモデルファイルを読み込む(モデル、シェーダ、テクスチャ1枚を指定) 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある

◆ Load() [5/5]

template<typename TVertex>
bool UniDx::GltfModel::Load ( const u8string & modelPath,
std::shared_ptr< Material > material )
inline

glTF形式のモデルファイルを読み込む(モデルファイル、共有マテリアルを指定) 内部で階層構造を構築するので、あらかじめ GameObject にアタッチしておく必要がある

◆ load_()

bool UniDx::GltfModel::load_ ( const char * filePath,
bool makeTextureMaterial,
std::shared_ptr< Shader > shader )
protectedvirtual

◆ readPrimitive()

void UniDx::GltfModel::readPrimitive ( UniDx::Mesh * mesh,
const tinygltf::Primitive & primitive )
protectedvirtual

◆ SetAddressModeUV()

void UniDx::GltfModel::SetAddressModeUV ( Texture * texture,
int texIndex ) const

メンバ詳解

◆ materials

std::unordered_map<int, std::shared_ptr<Material> > UniDx::GltfModel::materials
protected

◆ meshes

std::vector< std::shared_ptr<Mesh> > UniDx::GltfModel::meshes
protected

◆ model

std::unique_ptr< tinygltf::Model> UniDx::GltfModel::model
protected

◆ nodes

std::unordered_map<int, Transform*> UniDx::GltfModel::nodes
protected

◆ renderer

std::vector<MeshRenderer*> UniDx::GltfModel::renderer
protected

◆ skinInstance

std::unordered_map<int, SkinInstance> UniDx::GltfModel::skinInstance
protected

◆ textures

std::unordered_map<int, std::shared_ptr<Texture> > UniDx::GltfModel::textures
protected

このクラス詳解は次のファイルから抽出されました: