![]()  | 
  
    MAGE
    v0.171.0
    
   Matthias Advanced Game Engine 
   | 
 
#include <model_descriptor.hpp>
  
 Public Member Functions | |
| template<typename VertexT , typename IndexT > | |
| ModelDescriptor (ID3D11Device &device, ResourceManager &resource_manager, std::wstring fname, const MeshDescriptor< VertexT, IndexT > &desc=MeshDescriptor< VertexT, IndexT >(), bool export_as_MDL=false) | |
| ModelDescriptor (const ModelDescriptor &desc)=delete | |
| ModelDescriptor (ModelDescriptor &&desc) noexcept | |
| virtual | ~ModelDescriptor () | 
| ModelDescriptor & | operator= (const ModelDescriptor &desc)=delete | 
| ModelDescriptor & | operator= (ModelDescriptor &&desc) noexcept | 
| SharedPtr< const Mesh > | GetMesh () const noexcept | 
| const Material * | GetMaterial (std::string_view name) const noexcept | 
| template<typename ActionT > | |
| void | ForEachMaterial (ActionT &&action) const | 
| const ModelPart * | GetModelPart (std::string_view name) const noexcept | 
| template<typename ActionT > | |
| void | ForEachModelPart (ActionT &&action) const | 
  Public Member Functions inherited from mage::Resource< ModelDescriptor > | |
| Resource (std::wstring guid) noexcept | |
| Resource (const Resource &resource)=delete | |
| Resource (Resource &&resource) noexcept | |
| virtual | ~Resource () | 
| Resource & | operator= (const Resource &resource)=delete | 
| Resource & | operator= (Resource &&resource) noexcept | 
| const std::wstring_view | GetGuid () const noexcept | 
| bool | IsFileResource () const | 
| const std::filesystem::path | GetPath () const | 
Private Attributes | |
| SharedPtr< const Mesh > | m_mesh | 
| std::vector< Material > | m_materials | 
| AlignedVector< ModelPart > | m_model_parts | 
A class of model descriptors describing a complete model.
      
  | 
  explicit | 
Constructs a model descriptor.
| VertexT | The vertex type. | 
| IndexT | The index type. | 
| [in,out] | device | A reference to the device. | 
| [in,out] | resource_manager | A reference to the resource manager. | 
| [in] | fname | The filename (the globally unique identifier). | 
| [in] | desc | A reference to the mesh descriptor. | 
| [in] | export_as_MDL | true if the model descriptor needs to be exported as MDL file. false otherwise.  | 
| Exception | Failed to initialize the model descriptor. | 
      
  | 
  delete | 
Constructs a model descriptor from the given model descriptor.
| [in] | desc | A reference to the model descriptor to copy. | 
      
  | 
  defaultnoexcept | 
Constructs a model descriptor by moving the given model descriptor.
| [in] | desc | A reference to the model descriptor to move. | 
      
  | 
  virtualdefault | 
Destructs a model descriptor.
| void mage::rendering::ModelDescriptor::ForEachMaterial | ( | ActionT && | action | ) | const | 
Traverses all materials of this model descriptor.
| ActionT | An action to perform on all materials of this model descriptor. The action must accept const Material& values.  | 
| void mage::rendering::ModelDescriptor::ForEachModelPart | ( | ActionT && | action | ) | const | 
Traverses all model parts of this model descriptor.
| ActionT | An action to perform on all model parts of this model descriptor. The action must accept const ModelPart& values.  | 
      
  | 
  noexcept | 
Returns the material corresponding to the given name.
| [in] | name | The name of the material. | 
nullptr if this model descriptor contains no material matching the given name name. Returns the mesh of this model descriptor.
      
  | 
  noexcept | 
Returns the model part corresponding to the given name.
| [in] | name | The name of the model part. | 
nullptr if this model descriptor contains no model part matching the given name name. 
      
  | 
  delete | 
Copies the given model descriptor to this model descriptor.
| [in] | desc | A reference to the model descriptor to copy. | 
      
  | 
  defaultnoexcept | 
Moves the given model descriptor to this model descriptor.
| [in] | desc | A reference to the model descriptor to move. | 
      
  | 
  private | 
A vector containing all the materials of the model of this model descriptor.
A pointer to the mesh of the model of this model descriptor.
      
  | 
  private | 
A vector containing all the model parts of the model of this model descriptor.