12template <
typename T>
using StoreContainer = std::vector<T>;
14template <
typename T>
class AttributeHandle;
48 attr::AttributeType type,
49 bool intrinsic =
false,
62 Vector3 getVector3(Offset offset)
const;
63 Matrix4 getMatrix4(Offset offset)
const;
64 size_t getSize()
const;
94 void compact(
const std::vector<bool>& keep);
100 bool internal_ =
false;
101 bool intrinsic_ =
false;
104 unsigned int typeSize_ = 1;
108 using StoreVariant = std::variant<
109 std::shared_ptr<StoreContainer<intT>>,
110 std::shared_ptr<StoreContainer<floatT>>,
111 std::shared_ptr<StoreContainer<enzo::Vector3>>,
112 std::shared_ptr<StoreContainer<enzo::boolT>>,
113 std::shared_ptr<StoreContainer<enzo::Matrix4>>>;
117using attribVector = std::vector<std::shared_ptr<attr::Attribute>>;
Basic attribute, parameter, and node types for Enzo.
AttributeType
Data types available to store attribute values in.
Definition Types.h:37
Read only accessor for enzo::attr::Attribute.
Definition AttributeHandle.h:188
Read write accessor for enzo::attr::Attribute.
AttributeType getType() const
Returns the attribute type this attribute stores.
Definition Attribute.cpp:114
bool isIntrinsic() const
Returns whether the attribute is intrinsic.
Definition Attribute.cpp:77
std::string getName() const
Returns the name of this attribute.
Definition Attribute.cpp:116
Attribute(std::string name, attr::AttributeType type, bool intrinsic=false, bool isInternal=false)
Construct a new attribute and initialize its typed storage.
Definition Attribute.cpp:9
void resize(size_t size)
Changes the number of elements stored.
Definition Attribute.cpp:49
unsigned int getTypeSize() const
Returns the number of components in the type (eg. StringT is 1, vectorT is 3).
void compact(const std::vector< bool > &keep)
Removes entries marked as deleted, defragmenting the storage so offsets are contiguous again.
Definition Attribute.cpp:54
bool isInternal() const
Returns whether the engine maintains this attribute.
Definition Attribute.cpp:79