![]() |
OpenSiv3D
v0.6.5
C++20 framework for creative coding
|
3D モデル More...
#include <Model.hpp>
Inherits s3d::AssetHandle< Model >.
Public Member Functions | |
| SIV3D_NODISCARD_CXX20 | Model () |
| デフォルトコンストラクタ More... | |
| SIV3D_NODISCARD_CXX20 | Model (FilePathView path, ColorOption colorOption=ColorOption::Default) |
| 3D モデルを読み込みます。 More... | |
| virtual | ~Model () |
| デストラクタ More... | |
| const Array< ModelObject > & | objects () const noexcept |
| 3D モデルを構成するモデルパーツ一覧を返します。 More... | |
| const Array< Material > & | materials () const noexcept |
| 3D モデルに登録されているマテリアル一覧を返します。 More... | |
| Array< String > | diffuseTextureNames () const |
| 3D モデルに登録されているディフューズテクスチャの名前(パス)を返します。 More... | |
| const Sphere & | boundingSphere () const noexcept |
| 3D モデルのバウンディングスフィアを返します。 More... | |
| const Box & | boundingBox () const noexcept |
| 3D モデルのバウンディングボックスを返します。 More... | |
| void | draw () const |
| 3D モデルを描画します。 More... | |
| void | draw (double x, double y, double z) const |
| 3D モデルを描画します。 More... | |
| void | draw (const Vec3 &pos) const |
| 3D モデルを描画します。 More... | |
| void | draw (double x, double y, double z, const Quaternion &rotation) const |
| 3D モデルを描画します。 More... | |
| void | draw (const Vec3 &pos, const Quaternion &rotation) const |
| 3D モデルを描画します。 More... | |
| void | draw (const Mat4x4 &mat) const |
| 3D モデルを描画します。 More... | |
| void | swap (Model &other) noexcept |
| 別の 3D モデルと中身を交換します。 More... | |
Public Member Functions inherited from s3d::AssetHandle< Model > | |
| SIV3D_NODISCARD_CXX20 | AssetHandle () |
| SIV3D_NODISCARD_CXX20 | AssetHandle (std::shared_ptr< AssetIDWrapperType > &&id) |
| IDType | id () const noexcept |
| アセットの内部管理 ID を返します。 More... | |
| bool | isEmpty () const noexcept |
| アセットが空であるかを返します。 More... | |
| operator bool () const noexcept | |
| アセットが空でないかを返します。 More... | |
| bool | operator== (const AssetHandle &other) const noexcept |
| 2 つのアセットが同じオブジェクトであるかを返します。 More... | |
| bool | operator!= (const AssetHandle &other) const noexcept |
| 2 つのアセットが異なるオブジェクトであるかを返します。 More... | |
| void | release () |
| このハンドルが管理するアセットを解放します。 More... | |
Static Public Member Functions | |
| static bool | RegisterDiffuseTextures (const Model &model, TextureDesc textureDesc=TextureDesc::MippedSRGB) |
| 3D モデルに含まれるテクスチャ情報をもとに、テクスチャアセットを登録します。 More... | |
Additional Inherited Members | |
Public Types inherited from s3d::AssetHandle< Model > | |
| using | AssetIDWrapperType = AssetIDWrapper< AssetHandle > |
| アセット ID ラッパー型 More... | |
| using | IDType = typename AssetIDWrapperType::IDType |
| アセット ID 型 More... | |
Protected Attributes inherited from s3d::AssetHandle< Model > | |
| std::shared_ptr< AssetIDWrapperType > | m_handle |
3D モデル
| SIV3D_NODISCARD_CXX20 s3d::Model::Model | ( | ) |
デフォルトコンストラクタ
|
explicit |
3D モデルを読み込みます。
| path | ファイルのパス(対応している形式は Wavefront OBJ) |
| colorOption | 色空間 |
|
virtual |
デストラクタ
|
noexcept |
3D モデルのバウンディングボックスを返します。
|
noexcept |
3D モデルのバウンディングスフィアを返します。
3D モデルに登録されているディフューズテクスチャの名前(パス)を返します。
| void s3d::Model::draw | ( | ) | const |
3D モデルを描画します。
| void s3d::Model::draw | ( | const Mat4x4 & | mat | ) | const |
3D モデルを描画します。
| mat | 座標変換行列 |
| void s3d::Model::draw | ( | const Vec3 & | pos | ) | const |
3D モデルを描画します。
| pos | ワールドの座標 |
| void s3d::Model::draw | ( | const Vec3 & | pos, |
| const Quaternion & | rotation | ||
| ) | const |
3D モデルを描画します。
| pos | ワールドの座標 |
| rotation | 回転 |
| void s3d::Model::draw | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) | const |
3D モデルを描画します。
| x | ワールドの X 座標 |
| y | ワールドの Y 座標 |
| z | ワールドの Z 座標 |
| void s3d::Model::draw | ( | double | x, |
| double | y, | ||
| double | z, | ||
| const Quaternion & | rotation | ||
| ) | const |
3D モデルを描画します。
| x | ワールドの X 座標 |
| y | ワールドの Y 座標 |
| z | ワールドの Z 座標 |
| rotation | 回転 |
3D モデルに登録されているマテリアル一覧を返します。
|
noexcept |
3D モデルを構成するモデルパーツ一覧を返します。
|
static |
3D モデルに含まれるテクスチャ情報をもとに、テクスチャアセットを登録します。
| model | 3D モデル |
| textureDesc | テクスチャの設定 |
|
noexcept |
別の 3D モデルと中身を交換します。
| other | 別の 3D モデル |