![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <model.hpp>
Public Member Functions | |
| Model (ID3D11Device &device) | |
| Model (const Model &model)=delete | |
| Model (Model &&model) noexcept | |
| virtual | ~Model () |
| Model & | operator= (const Model &model)=delete |
| Model & | operator= (Model &&model) noexcept |
| void | SetMesh (SharedPtr< const Mesh > mesh, std::size_t start_index, std::size_t nb_indices, AABB aabb, BoundingSphere bs) |
| const AABB & | GetAABB () const noexcept |
| const BoundingSphere & | GetBoundingSphere () const noexcept |
| std::size_t | GetStartIndex () const noexcept |
| std::size_t | GetNumberOfIndices () const noexcept |
| void | BindMesh (ID3D11DeviceContext &device_context) const noexcept |
| void | BindMesh (ID3D11DeviceContext &device_context, D3D11_PRIMITIVE_TOPOLOGY topology) const noexcept |
| void | Draw (ID3D11DeviceContext &device_context) const noexcept |
| TextureTransform2D & | GetTextureTransform () noexcept |
| const TextureTransform2D & | GetTextureTransform () const noexcept |
| Material & | GetMaterial () noexcept |
| const Material & | GetMaterial () const noexcept |
| bool | OccludesLight () const noexcept |
| void | EnableLightOcclusion () noexcept |
| void | DissableLightOcclusion () noexcept |
| void | ToggleLightOcclusion () noexcept |
| void | SetLightOcclusion (bool light_occlusion) noexcept |
| void | UpdateBuffer (ID3D11DeviceContext &device_context) const |
| template<typename PipelineStageT > | |
| void | BindBuffer (ID3D11DeviceContext &device_context, U32 slot) const noexcept |
Public Member Functions inherited from mage::Component | |
| virtual | ~Component () |
| Component & | operator= (const Component &component) noexcept |
| Component & | operator= (Component &&component) noexcept |
| State | GetState () const noexcept |
| void | SetState (State state) noexcept |
| U64 | GetGuid () const noexcept |
| bool | HasOwner () const noexcept |
| ProxyPtr< Node > | GetOwner () noexcept |
| ProxyPtr< const Node > | GetOwner () const noexcept |
Private Attributes | |
| ConstantBuffer< ModelBuffer > | m_buffer |
| AABB | m_aabb |
| BoundingSphere | m_sphere |
| SharedPtr< const Mesh > | m_mesh |
| std::size_t | m_start_index |
| std::size_t | m_nb_indices |
| TextureTransform2D | m_texture_transform |
| Material | m_material |
| bool | m_light_occlusion |
Additional Inherited Members | |
Protected Member Functions inherited from mage::Component | |
| Component () noexcept | |
| Component (const Component &component) noexcept | |
| Component (Component &&component) noexcept | |
A class of models.
|
explicit |
Constructs a model.
| [in,out] | device | A reference to the device. |
|
delete |
Constructs a model from the given model.
| [in] | model | A reference to the model to copy. |
|
defaultnoexcept |
Constructs a model by moving the given model.
| [in] | model | A reference to the model to move. |
|
virtualdefault |
Destructs this model.
|
noexcept |
Binds the buffer of this model to the given pipeline stage.
| PipelineStageT | The pipeline stage type. |
| [in,out] | device_context | A reference to the device context. |
| [in] | slot | The index into the device's zero-based array to set the constant buffer to (ranges from 0 to D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1). |
|
noexcept |
Binds the mesh of this model.
| [in,out] | device_context | A reference to the device context. |
|
noexcept |
Binds the mesh of this model with given primitive topology.
| [in,out] | device_context | A reference to the device context. |
| [in] | topology | The primitive topology. |
|
noexcept |
Dissables the occlusion of light by this model.
|
noexcept |
Draws this model.
| [in,out] | device_context | A reference to the device context. |
|
noexcept |
Enbales the occlusion of light by this model.
|
noexcept |
|
noexcept |
Returns the bounding sphere of this model.
|
noexcept |
Returns the material of this model.
|
noexcept |
Returns the material of this model.
|
noexcept |
Returns the number of indices of this model in the mesh of this model.
|
noexcept |
Returns the start index of this model in the mesh of this model.
|
noexcept |
Returns the texture transform of this model.
|
noexcept |
Returns the texture transform of this model.
|
noexcept |
Checks whether this model occludes light.
true if this model occludes light. false otherwise. Copies the given model to this model.
| [in] | model | A reference to the model to copy. |
Moves the given model to this model.
| [in] | model | A reference to the model to move. |
|
noexcept |
Sets the occlusion of light by this model to the given value.
| [in] | light_occlusion | true if this model needs to occlude light. false otherwise. |
| void mage::rendering::Model::SetMesh | ( | SharedPtr< const Mesh > | mesh, |
| std::size_t | start_index, | ||
| std::size_t | nb_indices, | ||
| AABB | aabb, | ||
| BoundingSphere | bs | ||
| ) |
Sets the mesh of this model to the given mesh.
| [in] | mesh | A pointer to the mesh. |
| [in] | start_index | The start index in the mesh. |
| [in] | nb_indices | The number of indices in the mesh. |
| [in] | aabb | The AABB. |
| [in] | bs | The bounding sphere. |
|
noexcept |
Toggles the occlusion of light by this model.
| void mage::rendering::Model::UpdateBuffer | ( | ID3D11DeviceContext & | device_context | ) | const |
Updates the buffer of this model.
| [in,out] | device_context | A reference to the device context. |
|
mutableprivate |
The buffer of this model.
|
private |
A flag indicating whether this model occludes light.
|
private |
The material of this model.
|
private |
The number of indices of this model in the mesh of this model.
|
private |
The bounding sphere of this model.
|
private |
The start index of this model in the mesh of this model.
|
private |
The texture transform of this model.