Geogram Version 1.9.7
A programming library of geometric algorithms
|
An attribute class that can access a vector attribute as a scalar attribute with vec2,vec3 or vec4 element types. More...
#include <geogram/basic/vector_attribute.h>
Public Types | |
typedef vecng< DIM, double > | vec_type |
Public Member Functions | |
Attribute (AttributesManager &manager, const std::string &name) | |
void | bind (AttributesManager &manager, const std::string &name) |
void | unbind () |
bool | bind_if_is_defined (AttributesManager &manager, const std::string &name) |
bool | is_bound () const |
index_t | size () const |
index_t | dimension () const |
index_t | nb_elements () const |
AttributesManager * | manager () |
void | destroy () |
Destroys this attribute in the AttributesManager. | |
bool | bind_if_is_compatible (AttributesManager &manager, const std::string &name) |
Binds this Attribute to an AttributesManager if it already exists in the AttributesManager and types are compatible. | |
void | copy (const Attribute< vec_type > &rhs) |
Copies all the values from another attribute. | |
void | fill (const vec_type &val) |
Sets all the elements in this attribute to a specified value. | |
vec_type & | operator[] (index_t i) |
const vec_type & | operator[] (index_t i) const |
Static Public Member Functions | |
static bool | is_defined (AttributesManager &manager, const std::string &name) |
Static Public Attributes | |
static constexpr index_t | vec_dim = DIM |
An attribute class that can access a vector attribute as a scalar attribute with vec2,vec3 or vec4 element types.
Definition at line 54 of file vector_attribute.h.
typedef vecng<DIM,double> GEO::Attribute< vecng< DIM, double > >::vec_type |
Definition at line 56 of file vector_attribute.h.
|
inline |
Definition at line 59 of file vector_attribute.h.
|
inline |
Definition at line 64 of file vector_attribute.h.
|
inline |
Definition at line 70 of file vector_attribute.h.
|
inline |
Definition at line 92 of file vector_attribute.h.
|
inline |
Binds this Attribute to an AttributesManager if it already exists in the AttributesManager and types are compatible.
[in] | manager | a reference to the AttributesManager |
[in] | name | name of the attribute |
true
if this Attribute was successfully bound Definition at line 169 of file vector_attribute.h.
|
inline |
Definition at line 116 of file vector_attribute.h.
|
inline |
Copies all the values from another attribute.
[in] | rhs | the attribute to be copied. |
rhs needs to have the same size and dimension as this Attribute.
Definition at line 194 of file vector_attribute.h.
|
inline |
Destroys this attribute in the AttributesManager.
On exit, the attribute is no-longer accessible in the AttributesManager, its name is available again, and this attribute is in the unbound state.
Definition at line 153 of file vector_attribute.h.
|
inline |
Definition at line 135 of file vector_attribute.h.
|
inline |
Sets all the elements in this attribute to a specified value.
[in] | val | the value |
Definition at line 208 of file vector_attribute.h.
|
inline |
Definition at line 127 of file vector_attribute.h.
|
inlinestatic |
Definition at line 76 of file vector_attribute.h.
|
inline |
Definition at line 143 of file vector_attribute.h.
|
inline |
Definition at line 139 of file vector_attribute.h.
|
inline |
Definition at line 219 of file vector_attribute.h.
|
inline |
Definition at line 224 of file vector_attribute.h.
|
inline |
Definition at line 131 of file vector_attribute.h.
|
inline |
Definition at line 104 of file vector_attribute.h.
|
staticconstexpr |
Definition at line 57 of file vector_attribute.h.