sculpto
basis.h
Go to the documentation of this file.
1/*!****************************************************************//*!*
2 * \file base.h
3 * \brief Topology object basis class for mesh creating implementation module.
4 *
5 * \author Sabitov Kirill
6 * \date 29 June 2022
7 *********************************************************************/
8
9#pragma once
10
11#include "base.h"
13
15{
17 template <typename Tvertex>
18 class basis
19 {
20 public:
22 std::vector<Tvertex> Vertices {};
23 std::vector<u32> Indices {};
24 vec3 Min {}, Max {};
26 public:
28 const mesh_type GetType() const { return MeshType; }
30 const std::vector<Tvertex> GetVertices() const { return Vertices; }
32 const std::vector<u32> GetIndices() const { return Indices; }
34 const vec3 &GetBoundMin() const { return Min; }
36 const vec3 &GetBoundMax() const { return Max; }
37
38 std::vector<Tvertex>::const_iterator cbegin() const { return Vertices.begin(); }
39 std::vector<Tvertex>::const_iterator cend() const { return Vertices.end(); }
40
41 public:
42 /*!*
43 * Topology object basis default constructor.
44 *
45 * \param MeshType- object mesh type.
46 */
48
49 /*!*
50 * Topology object basis default constructor.
51 *
52 * \param MeshType- object mesh type.
53 * \param Vertices - verticeies array.
54 * \param Indices - vertices indices.
55 */
56 basis(mesh_type MeshType, const std::vector<Tvertex> &Vertices, const std::vector<u32> &Indices) :
58
59 /*!*
60 * Topology object basis constructor.
61 *
62 * \param MeshType- object mesh type.
63 * \param Vertices - verticeies array rvalue ref.
64 * \param Indices - vertices indices rvalue ref.
65 */
66 basis(mesh_type MeshType, std::vector<Tvertex> &&Vertices, std::vector<u32> &&Indices) :
67 Vertices(std::move(Vertices)), Indices(std::move(Indices)) {}
68
70 virtual ~basis() = default;
71 };
72}
Topology object basis class for mesh creating implementation module.
std::vector< Tvertex >::const_iterator cbegin() const
Definition: basis.h:38
basis(mesh_type MeshType, const std::vector< Tvertex > &Vertices, const std::vector< u32 > &Indices)
Definition: basis.h:56
std::vector< Tvertex > Vertices
Definition: basis.h:22
std::vector< Tvertex >::const_iterator cend() const
Definition: basis.h:39
const std::vector< u32 > GetIndices() const
Definition: basis.h:32
mesh_type MeshType
Definition: basis.h:21
basis(mesh_type MeshType, std::vector< Tvertex > &&Vertices, std::vector< u32 > &&Indices)
Definition: basis.h:66
const vec3 & GetBoundMax() const
Definition: basis.h:36
std::vector< u32 > Indices
Definition: basis.h:23
virtual ~basis()=default
const mesh_type GetType() const
Definition: basis.h:28
const std::vector< Tvertex > GetVertices() const
Definition: basis.h:30
basis(mesh_type MeshType)
Definition: basis.h:47
const vec3 & GetBoundMin() const
Definition: basis.h:34
mesh_type
Definition: vertex_array.h:18
Vertex array interfaces implementation module.