11template <
typename T>
using StoreContainer = std::vector<T>;
13template <
typename T>
class AttributeHandle;
44 Attribute(std::string name, ga::AttributeType type,
bool intrinsic =
false);
55 bt::Vector3 getVector3(Offset offset)
const;
56 bt::Matrix4 getMatrix4(Offset offset)
const;
57 size_t getSize()
const;
88 bool intrinsic_ =
false;
91 unsigned int typeSize_ = 1;
98 std::shared_ptr<StoreContainer<bt::intT>> intStore_;
99 std::shared_ptr<StoreContainer<bt::floatT>> floatStore_;
100 std::shared_ptr<StoreContainer<enzo::bt::Vector3>> vector3Store_;
101 std::shared_ptr<StoreContainer<enzo::bt::boolT>> boolStore_;
102 std::shared_ptr<StoreContainer<enzo::bt::Matrix4>> matrix4Store_;
105using attribVector = std::vector<std::shared_ptr<ga::Attribute>>;
Basic attribute, parameter, and node types for Enzo.
AttributeType
Data types available to store attribute values in.
Definition Types.h:25
Read only accessor for enzo::ga::Attribute.
Definition AttributeHandle.h:226
Read write accessor for enzo::ga::Attribute.
bool isIntrinsic() const
Returns whether the attribute is intrinsic.
Definition Attribute.cpp:76
Attribute(std::string name, ga::AttributeType type, bool intrinsic=false)
Construct a new attribute and initialize its typed storage.
Definition Attribute.cpp:10
std::string getName() const
Returns the name of this attribute.
Definition Attribute.cpp:145
AttributeType getType() const
Returns the attribute type this attribute stores.
Definition Attribute.cpp:140
unsigned int getTypeSize() const
Returns the number of components in the type (eg. StringT is 1, vectorT is 3).
void resize(size_t size)
Changes the number of elements stored.
Definition Attribute.cpp:49