|
| | Vector3 () |
| | Contructs a Vector3 object with 3 elements, all initialized to 0.
|
| |
| void | set (T x, T y, T z) |
| | Sets the values of the three elements of current Vector3 object.
|
| |
| S | operator^ (const S &other) const |
| | Calculates the cross product of this vector3 and another vector3, returning a new Vector3.
|
| |
| | 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::Vector3< T, S >
The class Vector3 is a templated class inheriting from the Vector class. A vector3 object holds 3 elements.