|
| | Vector2 () |
| | Contructs a Vector2 object with 2 elements, all initialized to 0.
|
| |
| void | set (T x, T y) |
| | Sets the values of the two elements of current Vector2 object.
|
| |
| | Vector (int size) |
| | Constructs a Vector object with a specified number of elements.
|
| |
| const T & | operator[] (int index) const |
| | Provides read-only access to the element at a specific index(position) within the Vector object.
|
| |
| T & | operator[] (int index) |
| | Provides read-write access to the element at a specific index(position) within the Vector object.
|
| |
| const T & | operator[] (char key) const |
| | Provides read-only access to a element within the Vector object using a character key.
|
| |
| T & | operator[] (char key) |
| | Provides read-write access to a element within the Vector object using a character key.
|
| |
| Vector & | operator+= (const Vector &other) |
| | Performs element-wise addition between the current Vector and another vector.
|
| |
| Vector< T, S > & | operator-= (const Vector &other) |
| | Performs element-wise subtraction between the current Vector and another vector.
|
| |
| Vector< T, S > & | operator*= (float factor) |
| | Performs scalar multiplication between the current Vector and a floating-point factor.
|
| |
| Vector< T, S > & | operator/= (float factor) |
| | Performs scalar division between the current Vector and a floating-point factor.
|
| |
| S | operator+ (const S &other) const |
| | Returns a Vector object that is formed by element-wise addition between the current Vector and another vector.
|
| |
| S | operator- (const S &other) const |
| | Returns a Vector object that is formed by element-wise subtraction between the current Vector and another vector.
|
| |
| S | operator- () const |
| | Returns a Vector object that is formed by changing the sign of each element of the current vector.
|
| |
| T | operator* (const S &other) const |
| | Returns a Vector object that is formed by element-wise multiplication between the current Vector and another vector.
|
| |
| S | operator* (float factor) const |
| | Returns a Vector object that is formed by multiplying each element of the current vector by the factor.
|
| |
| S | operator/ (float factor) const |
| | Returns a Vector object that is formed by dividing each element of the current vector by the factor.
|
| |
| T | squaredLength () const |
| | Returns the squared length of the current Vector.
|
| |
| float | length () const |
| | Returns the length of the current Vector.
|
| |
| bool | setLength (float len) |
| | Changes the length of the current Vector and returns a boolean value indicating success.
|
| |
| bool | normalize () |
| | Normalize the current Vector and returns a boolean value indicating success.
|
| |
| | Tuple (int size) |
| | Constructs a Tuple object with a specified number of elements, and initialize all elements to 0.
|
| |
| virtual | ~Tuple () |
| |
| int | size () const |
| | Gets the number of elements of the Tuple.
|
| |
| T * | data () |
| | Gets the data array of the Tuple.
|
| |
| const T * | data () const |
| | Gets the data array of the Tuple, and the data could not be modified upon which this function is called.
|
| |
| void | setData (const T *data) |
| | Sets the data array of the Variant.
|
| |
| Tuple< T > & | operator= (const Tuple &other) |
| | Copys the data of another Tuple to the one on which the operator is invoked.
|
| |
| bool | operator== (const Tuple &other) const |
| | Compares the Tuple with another one, and returns true if they are equal, otherwise returns false.
|
| |
| bool | operator!= (const Tuple &other) const |
| | Compares the Tuple with another one, and returns false if they are equal, otherwise returns true.
|
| |
| | Variant () |
| |
| virtual | ~Variant () |
| |
| const std::string & | type () const |
| |
template<typename T, typename S>
class cil::Vector2< T, S >
The class Vector2 is a templated class inheriting from the Vector class. A vector2 object holds 2 elements.