gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
attribute_data.h
1// © Joseph Cameron - All Rights Reserved
2
3#ifndef GDK_GFX_ATTRIBUTE_DATA_H
4#define GDK_GFX_ATTRIBUTE_DATA_H
5
6#include <gdk/graphics_types.h>
7
8#include <vector>
9
10namespace gdk {
12 using component_type = graphics_floating_point_type;
13
15 class attribute_data final {
16 public:
20
21 size_t number_of_attributes_in_component_data() const;
22
24 const std::vector<component_type> &components() const;
25
27 std::vector<component_type> &components();
28
29 void push_back(const attribute_data &rhs);
30
31 attribute_data &operator+=(const attribute_data &rhs);
32
33 void overwrite(size_t vertexOffset, const attribute_data &other);
34
39
43 attribute_data(const attribute_data &) = default;
44
45 attribute_data(const std::vector<component_type> &aComponents, const size_t aComponentCount);
46 attribute_data() = default;
47 ~attribute_data() = default;
48
49 private:
50 size_t m_NumberOfComponentsPerAttribute{};
51 std::vector<component_type> m_Components{};
52 };
53}
54
55#endif
56
attribute_data(const attribute_data &)=default
support copy semantics
attribute_data & operator=(const attribute_data &a)=default
support copy semantics
std::vector< component_type > & components()
nonconst access to the list of components in this attribute
attribute_data(attribute_data &&)=default
support move semantics
size_t number_of_components_per_attribute() const
const std::vector< component_type > & components() const
const access to the list of components in this attribute
attribute_data & operator=(attribute_data &&a)=default
support move semantics