|
Rumba C++ SDK
|
An array of values. More...
#include <Array.h>
Classes | |
| class | Iterator |
Public Member Functions | |
| Array () | |
| Construct an empty Array. More... | |
| Array (const Value &v) | |
| Cast a Value object in Array. More... | |
| size_t | size () const |
| Returns the array size. More... | |
| void | resize (size_t size) |
| resize the array. More... | |
| void | reserve (size_t size) |
| Reserve some space in the array. More... | |
| const Value | read (size_t i) const |
| Returns the i-th value. More... | |
| void | write (size_t i, const Value &v) |
| Write the i-th array element. More... | |
| const Value | operator[] (size_t i) const |
| Returns the i-th array element. More... | |
| bool | as_bool (size_t i) const |
| Returns a value as a bool. More... | |
| int | as_int (size_t i) const |
| Returns the i-th value as an integer. More... | |
| float | as_float (size_t i) const |
| Returns the i-th value as a float. More... | |
| double | as_double (size_t i) const |
| Returns the i-th value as a float. More... | |
| const std::string & | as_string (size_t i) const |
| Returns the i-th value as a string. More... | |
| const Imath::V2d & | as_V2d (size_t i) const |
| Returns the i-th value as a V2d. More... | |
| const Imath::V3d & | as_V3d (size_t i) const |
| Returns the i-th value as a V3d. More... | |
| const Imath::V4d & | as_V4d (size_t i) const |
| Returns the i-th value as a V4d. More... | |
| const Imath::M44d & | as_M44d (size_t i) const |
| Returns the i-th value as a M44d. More... | |
| const Imath::Box3f & | as_Box3f (size_t i) const |
| Returns the i-th value as a Box3f. More... | |
| const Imath::Quatd & | as_Quatd (size_t i) const |
| Returns the i-th value as a Quatd. More... | |
| const Imath::Color4f & | as_Color4f (size_t i) const |
| Returns the i-th value as a Color4f. More... | |
| void | push_back (const Value &value) |
| Insert a value at the end of the array. More... | |
| Array & | operator<< (const Value &value) |
| Insert a value at the end of the array. More... | |
| Array & | operator<< (float value) |
| Array & | operator<< (int value) |
| Iterator | begin () const |
| Iterator | end () const |
Public Member Functions inherited from maquina::Value | |
| Value () | |
| Value | duplicate () const |
| Duplicate the value. More... | |
| bool | as_bool () const |
| Returns the value as a bool. More... | |
| int | as_int () const |
| Returns the value as an integer. More... | |
| float | as_float () const |
| Returns the value as a float. More... | |
| double | as_double () const |
| Returns the value as a double. More... | |
| const std::string & | as_string () const |
| Returns the value as a string. More... | |
| std::wstring | as_wstring () const |
| Returns the value as a wstring. More... | |
| Imath::V2f | as_V2f () const |
| Returns the value as a V2f. More... | |
| Imath::V3f | as_V3f () const |
| Returns the value as a V3f. More... | |
| Imath::V4f | as_V4f () const |
| Returns the value as a V4f. More... | |
| const Imath::V2d & | as_V2d () const |
| Returns the value as a V2d. More... | |
| const Imath::V3d & | as_V3d () const |
| Returns the value as a V3d. More... | |
| const Imath::V4d & | as_V4d () const |
| Returns the value as a V4d. More... | |
| const Imath::V2i & | as_V2i () const |
| Returns the value as a V2i. More... | |
| const Imath::V3i & | as_V3i () const |
| Returns the value as a V3i. More... | |
| const Imath::V4i & | as_V4i () const |
| Returns the value as a V4i. More... | |
| Imath::M44f | as_M44f () const |
| Returns the value as a M44f. More... | |
| const Imath::M44d & | as_M44d () const |
| Returns the value as a M44d. More... | |
| const Imath::Box3f & | as_Box3f () const |
| Returns the value as a Box3f. More... | |
| const Imath::Color4f & | as_Color4f () const |
| Returns the value as a Color4f. More... | |
| Imath::Quatf | as_Quatf () const |
| Returns the value as a Quatf. More... | |
| const Imath::Quatd & | as_Quatd () const |
| Returns the value as a Quatd. More... | |
| std::shared_ptr< const UserData > | as_user_data () const |
| Returns the value as a user data. More... | |
| StringView | type_name () const |
| Return the type name of the Value. More... | |
| bool | has_node_delegate () const |
| Check if this value can produces a NodeDelegate. More... | |
| std::shared_ptr< NodeDelegate > | node_delegate (const std::shared_ptr< NodeDelegate > &parent, const StringView &name) const |
| bool | operator== (const Value &o) const |
| Compare the two values. More... | |
| bool | operator!= (const Value &o) const |
| bool | is_instance (const char *value_type_name) const |
| Check if this type derives from another value type. More... | |
| bool | is_interpolable () const |
| Checks if the value is interpolable. More... | |
| Value | lerp (const Value &other, double weight) const |
| Performs linear interpolation between this value and another value. More... | |
| Value (bool) | |
| Create a boolean value. More... | |
| Value (int) | |
| Create an integer value. More... | |
| Value (float) | |
| Create a float value. More... | |
| Value (double) | |
| Create a double value. More... | |
| Value (const char *string) | |
| Create a string value. More... | |
| Value (const wchar_t *string) | |
| Create a string value. More... | |
| Value (const std::string &string) | |
| Create a string value. More... | |
| Value (const std::wstring &string) | |
| Create a wide string value. More... | |
| Value (const Imath::V2f &) | |
| Create a Imath::V2f value. More... | |
| Value (const Imath::V3f &) | |
| Create a Imath::V3f value. More... | |
| Value (const Imath::V4f &) | |
| Create a Imath::V4f value. More... | |
| Value (const Imath::V2d &) | |
| Create a Imath::V2d value. More... | |
| Value (const Imath::V3d &) | |
| Create a Imath::V3d value. More... | |
| Value (const Imath::V4d &) | |
| Create a Imath::V4d value. More... | |
| Value (const Imath::V2i &) | |
| Create a Imath::V2i value. More... | |
| Value (const Imath::V3i &) | |
| Create a Imath::V3i value. More... | |
| Value (const Imath::V4i &) | |
| Create a Imath::V4i value. More... | |
| Value (const Imath::Color4f &) | |
| Create a Imath::Color4f value. More... | |
| Value (const Imath::M44f &) | |
| Create a Imath::M44f value. More... | |
| Value (const Imath::M44d &) | |
| Create a Imath::M44d value. More... | |
| Value (const Imath::Box3f &) | |
| Create a Imath::Box3f value. More... | |
| Value (const Imath::Quatf &) | |
| Create a Imath::Quatf value. More... | |
| Value (const Imath::Quatd &) | |
| Create a Imath::Quatd value. More... | |
| Value (const std::shared_ptr< const UserData > &user_data) | |
| Create a user data value. More... | |
Static Public Attributes | |
| static const Array | default_value |
| The default value. More... | |
Static Public Attributes inherited from maquina::Value | |
| static const Value | default_value |
| The default value. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from maquina::Value | |
| static bool | validate_type_name (const char *type_name) |
| Return true if the name is a valid type name. More... | |
| static Value | get_default_value (const char *type_name) |
| Return a default value for a given type. More... | |
An array of values.
The values in the array can have any type.
| maquina::Array::Array | ( | ) |
Construct an empty Array.
| maquina::Array::Array | ( | const Value & | v | ) |
| bool maquina::Array::as_bool | ( | size_t | i | ) | const |
Returns a value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
| [in] | i | the index of the value to query |
| const Imath::Box3f& maquina::Array::as_Box3f | ( | size_t | i | ) | const |
Returns the i-th value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
| [in] | i | the index of the value to query |
| const Imath::Color4f& maquina::Array::as_Color4f | ( | size_t | i | ) | const |
Returns the i-th value as a Color4f.
You must be sure this value is a Color4f or you will have {0,0,0,0}.
| [in] | i | the index of the value to query |
| double maquina::Array::as_double | ( | size_t | i | ) | const |
Returns the i-th value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
| [in] | i | the index of the value to query |
| float maquina::Array::as_float | ( | size_t | i | ) | const |
Returns the i-th value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
| [in] | i | the index of the value to query |
| int maquina::Array::as_int | ( | size_t | i | ) | const |
Returns the i-th value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
| [in] | i | the index of the value to query |
| const Imath::M44d& maquina::Array::as_M44d | ( | size_t | i | ) | const |
Returns the i-th value as a M44d.
You must be sure this value is a M44d or you will have an identity matrix.
| [in] | i | the index of the value to query |
| const Imath::Quatd& maquina::Array::as_Quatd | ( | size_t | i | ) | const |
Returns the i-th value as a Quatd.
You must be sure this value is a Quatd or you will have an identity quaternion.
| [in] | i | the index of the value to query |
| const std::string& maquina::Array::as_string | ( | size_t | i | ) | const |
Returns the i-th value as a string.
You must be sure this value is a string or you will have an empty string.
| [in] | i | the index of the value to query |
| const Imath::V2d& maquina::Array::as_V2d | ( | size_t | i | ) | const |
Returns the i-th value as a V2d.
You must be sure this value is a V2d or you will have {0,0}.
| [in] | i | the index of the value to query |
| const Imath::V3d& maquina::Array::as_V3d | ( | size_t | i | ) | const |
Returns the i-th value as a V3d.
You must be sure this value is a V3d or you will have {0,0,0}.
| [in] | i | the index of the value to query |
| const Imath::V4d& maquina::Array::as_V4d | ( | size_t | i | ) | const |
Returns the i-th value as a V4d.
You must be sure this value is a V4d or you will have {0,0,0,0}.
| [in] | i | the index of the value to query |
| Iterator maquina::Array::begin | ( | ) | const |
| Iterator maquina::Array::end | ( | ) | const |
Insert a value at the end of the array.
The array size is increased by one.
| Array& maquina::Array::operator<< | ( | float | value | ) |
| Array& maquina::Array::operator<< | ( | int | value | ) |
| const Value maquina::Array::operator[] | ( | size_t | i | ) | const |
Returns the i-th array element.
Expect an access violation error if i is out of bounds.
| void maquina::Array::push_back | ( | const Value & | value | ) |
Insert a value at the end of the array.
The array size is increased by one.
| const Value maquina::Array::read | ( | size_t | i | ) | const |
Returns the i-th value.
Expect an access violation error if i is out of bounds.
| void maquina::Array::reserve | ( | size_t | size | ) |
Reserve some space in the array.
| void maquina::Array::resize | ( | size_t | size | ) |
resize the array.
| size_t maquina::Array::size | ( | ) | const |
Returns the array size.
| void maquina::Array::write | ( | size_t | i, |
| const Value & | v | ||
| ) |
Write the i-th array element.
Expect an access violation error if i is out of bounds.
|
static |
The default value.