#include <mesh.h>
|
template<typename Ttopology > |
| mesh (const Ttopology &TopologyObject, shared< material > Material) |
|
template<typename Tvertex > |
| mesh (const std::vector< submesh_props< Tvertex > > &SubmeshesProperties) |
|
| ~mesh () |
|
Mesh class.
Definition at line 30 of file mesh.h.
◆ mesh() [1/2]
template<typename Ttopology >
scl::mesh::mesh |
( |
const Ttopology & |
TopologyObject, |
|
|
shared< material > |
Material |
|
) |
| |
|
inline |
Flag, showing wheather mesh is submiter to render, during shadow caster shadom map generation (render pass).
- Mesh constructor by topology object and material.
- Parameters
-
TopologyObject | - topology object to create vertex array from. |
Material | - mesh material. |
Definition at line 59 of file mesh.h.
60 {
61 submesh_data new_sub_mesh {};
64 (
u32)TopologyObject.GetVertices().size(),
67 (
u32)TopologyObject.GetIndices().size());
68 new_sub_mesh.VertexArray->SetIndexBuffer(new_sub_mesh.IndexBuffer);
69 new_sub_mesh.VertexArray->SetVertexBuffer(new_sub_mesh.VertexBuffer);
70
71 new_sub_mesh.Material = Material;
74
76 }
static shared< index_buffer > Create(u32 *Indices, u32 Count)
std::vector< submesh_data > SubMeshes
static shared< vertex_array > Create(mesh_type Mesh_type)
static shared< vertex_buffer > Create(u32 Count, const vertex_layout &VertexLayout)
#define SCL_CORE_INFO(...)
static vertex_layout GetVertexLayout()
◆ mesh() [2/2]
template<typename Tvertex >
scl::mesh::mesh |
( |
const std::vector< submesh_props< Tvertex > > & |
SubmeshesProperties | ) |
|
|
inline |
- Mesh constructor by submeshes properties array.
- Parameters
-
SubmeshesProperties | - array of sub meshes data (topology object + material). |
Definition at line 84 of file mesh.h.
85 {
86 for (const auto &submesh_prop : SubmeshesProperties)
87 {
88 submesh_data new_sub_mesh {};
91 (
u32)submesh_prop.Topology.GetVertices().size(),
94 (
u32)submesh_prop.Topology.GetIndices().size());
95 new_sub_mesh.VertexArray->SetIndexBuffer(new_sub_mesh.IndexBuffer);
96 new_sub_mesh.VertexArray->SetVertexBuffer(new_sub_mesh.VertexBuffer);
97
98 new_sub_mesh.Material = submesh_prop.Material;
100 }
101
102 SCL_CORE_INFO(
"Mesh with {} sub-mesh(es) created.", SubmeshesProperties.size());
103 }
◆ ~mesh()
Mesh default destructor.
Definition at line 106 of file mesh.h.
◆ Create() [1/2]
template<typename Tvertex >
- Mesh constructor by submeshes properties array.
- Parameters
-
SubmeshesProperties | - array of sub meshes data (topology object + material). |
Definition at line 129 of file mesh.h.
130 {
131 return CreateShared<mesh>(SubmeshesProperties);
132 }
◆ Create() [2/2]
template<typename Ttopology >
- Mesh constructor by topology object and material.
- Parameters
-
TopologyObject | - topology object to create vertex array from. |
- Returns
- created mesh pointer.
Definition at line 118 of file mesh.h.
119 {
120 return CreateShared<mesh>(TopologyObject, Material);
121 }
◆ renderer
◆ FileName
std::string scl::mesh::FileName {} |
Mesh data.
Definition at line 45 of file mesh.h.
◆ IsCastingShadow
bool scl::mesh::IsCastingShadow = true |
Flag, showing wheather mesh is submited to render, during main geometry render pass.
Definition at line 50 of file mesh.h.
◆ IsDrawing
bool scl::mesh::IsDrawing = true |
Mesh submesmeshes (primitives) list.
Mesh rendering flags.
Definition at line 49 of file mesh.h.
◆ SubMeshes
std::vector<submesh_data> scl::mesh::SubMeshes {} |
File name file, from which model was loaded.
Definition at line 46 of file mesh.h.
The documentation for this class was generated from the following file: