The class Vector3i inherits from the templated class of Vector3, and the template parameters are specified. Each element in the Vector3i object will be an integer. More...
#include <vector.h>
Public Member Functions | |
| Vector3i () | |
| Contructs a Vector3i object, all elements initialized to 0. | |
| Vector3i (int x, int y, int z) | |
| Contructs a Vector3i object and sets the integers x, y and z to the elements. | |
| Vector3i (const Vector2i &other, int z=0) | |
| Contructs a Vector3i object by copying the elements of another existing vector2i object, appending a zero as the third element. | |
| Vector3i (const Vector3i &other) | |
| Contructs a Vector3i object by copying the elements of another existing vector3i object. | |
| Vector3i (const Vector4i &other) | |
| Contructs a Vector3i object by copying the firt three elements of another existing vector4i object. | |
Public Member Functions inherited from cil::Vector3< int, Vector3i > | |
| Vector3 () | |
| Contructs a Vector3 object with 3 elements, all initialized to 0. | |
| void | set (int x, int y, int z) |
| Sets the values of the three elements of current Vector3 object. | |
| Vector3i | operator^ (const Vector3i &other) const |
| Calculates the cross product of this vector3 and another vector3, returning a new Vector3. | |
Public Member Functions inherited from cil::Vector< int, Vector3i > | |
| Vector (int size) | |
| Constructs a Vector object with a specified number of elements. | |
| const int & | operator[] (int index) const |
| Provides read-only access to the element at a specific index(position) within the Vector object. | |
| int & | operator[] (int index) |
| Provides read-write access to the element at a specific index(position) within the Vector object. | |
| const int & | operator[] (char key) const |
| Provides read-only access to a element within the Vector object using a character key. | |
| int & | 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< int, Vector3i > & | operator-= (const Vector &other) |
| Performs element-wise subtraction between the current Vector and another vector. | |
| Vector< int, Vector3i > & | operator*= (float factor) |
| Performs scalar multiplication between the current Vector and a floating-point factor. | |
| Vector< int, Vector3i > & | operator/= (float factor) |
| Performs scalar division between the current Vector and a floating-point factor. | |
| Vector3i | operator+ (const Vector3i &other) const |
| Returns a Vector object that is formed by element-wise addition between the current Vector and another vector. | |
| Vector3i | operator- (const Vector3i &other) const |
| Returns a Vector object that is formed by element-wise subtraction between the current Vector and another vector. | |
| Vector3i | operator- () const |
| Returns a Vector object that is formed by changing the sign of each element of the current vector. | |
| int | operator* (const Vector3i &other) const |
| Returns a Vector object that is formed by element-wise multiplication between the current Vector and another vector. | |
| Vector3i | operator* (float factor) const |
| Returns a Vector object that is formed by multiplying each element of the current vector by the factor. | |
| Vector3i | operator/ (float factor) const |
| Returns a Vector object that is formed by dividing each element of the current vector by the factor. | |
| int | 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. | |
Public Member Functions inherited from cil::Tuple< int > | |
| 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. | |
| int * | data () |
| Gets the data array of the Tuple. | |
| const int * | 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 int *data) |
| Sets the data array of the Variant. | |
| Tuple< int > & | 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. | |
Public Member Functions inherited from cil::Variant | |
| Variant () | |
| virtual | ~Variant () |
| const std::string & | type () const |
Additional Inherited Members | |
Protected Attributes inherited from cil::Tuple< int > | |
| int * | m_data |
| The data array of the Tuple. | |
| int | m_size |
| The number of elements that the data array of the Tuple holds. | |
Protected Attributes inherited from cil::Variant | |
| std::string | m_type |
The class Vector3i inherits from the templated class of Vector3, and the template parameters are specified. Each element in the Vector3i object will be an integer.
| cil::Vector3i::Vector3i | ( | ) |
Contructs a Vector3i object, all elements initialized to 0.
| cil::Vector3i::Vector3i | ( | int | x, |
| int | y, | ||
| int | z ) |
Contructs a Vector3i object and sets the integers x, y and z to the elements.
| cil::Vector3i::Vector3i | ( | const Vector2i & | other, |
| int | z = 0 ) |
Contructs a Vector3i object by copying the elements of another existing vector2i object, appending a zero as the third element.
| cil::Vector3i::Vector3i | ( | const Vector3i & | other | ) |
Contructs a Vector3i object by copying the elements of another existing vector3i object.