Cogs.Core
|
Adds range information to an object. More...
#include <Attributes.h>
Public Member Functions | |
RangeAttribute (T min, T max) | |
Constructs a range attribute with the given bounds. | |
T | getMin () const |
Get the minimum value of the range. | |
T | getMax () const |
Get the maximum value of the range. | |
![]() | |
GenericAttribute (bool runtime=true) | |
Construct a generic attribute. True if runtime attribute. | |
![]() | |
TypeId | getType () const |
Get the type of the derived attribute class. | |
TypeId | getGenericType () const |
bool | isRuntime () const |
Gets value of the runtime attribute flag. | |
Additional Inherited Members | |
![]() | |
Attribute (TypeId type) | |
Constructs an attribute instance with the given type. | |
Attribute (TypeId type, TypeId genericType, bool runtime=true) | |
Constructs a generic attribute instance with the given type and generic type parameter. | |
template<typename T > | |
T & | get (size_t index=0) |
Get the stored value of the given type, with an optional index. | |
template<typename T > | |
const T & | get (size_t index=0) const |
See non-const get() implementation. | |
Adds range information to an object.
T | Type of the range values (e.g int, float, vec3 etc.). |
Definition at line 37 of file Attributes.h.
|
inline |
Constructs a range attribute with the given bounds.
min | Minimum value. |
max | Maximum value. |
Definition at line 45 of file Attributes.h.
|
inline |
Get the maximum value of the range.
Definition at line 55 of file Attributes.h.
|
inline |
Get the minimum value of the range.
Definition at line 52 of file Attributes.h.