A class representing a point in 2D space, using a given data type. Only works with predefined types. See the vec2t Types module for more details.
More...
#include <OficinaTypes.hpp>
|
union { |
struct { |
T x |
| X coordinate of point. More...
|
|
T y |
| Y coordinate of point. More...
|
|
} | |
|
struct { |
T v [2] |
| Array of coordinates of the point. More...
|
|
} | |
|
}; | |
|
template<typename T>
class vec2t< T >
A class representing a point in 2D space, using a given data type. Only works with predefined types. See the vec2t Types module for more details.
- See also
- vec2t Types
◆ vec2t() [1/3]
Constructs class with null values.
◆ vec2t() [2/3]
Constructs class with two equal values.
- Parameters
-
n | Value to be given to coordinates. |
◆ vec2t() [3/3]
Constructs class with two values.
- Parameters
-
X | Value to be given to x coordinate. |
Y | Value to be given to y coordinate. |
◆ Down()
Returns a vec2t with coordinates indicating the Down direction.
- Returns
- A down-facing vec2t.
◆ Left()
Returns a vec2t with coordinates indicating the Left direction.
- Returns
- A left-facing vec2t.
◆ One()
Returns a vec2t with both coordinates having the value 1.
- Returns
- An unitary-value vec2t.
◆ operator!=() [1/2]
◆ operator!=() [2/2]
template<typename T>
bool vec2t< T >::operator!= |
( |
const T |
| ) |
|
◆ operator*() [1/2]
◆ operator*() [2/2]
◆ operator*=() [1/2]
◆ operator*=() [2/2]
◆ operator+() [1/2]
◆ operator+() [2/2]
◆ operator+=() [1/2]
◆ operator+=() [2/2]
◆ operator-() [1/2]
◆ operator-() [2/2]
◆ operator-=() [1/2]
◆ operator-=() [2/2]
◆ operator/() [1/2]
◆ operator/() [2/2]
◆ operator/=() [1/2]
◆ operator/=() [2/2]
◆ operator<() [1/2]
◆ operator<() [2/2]
template<typename T>
bool vec2t< T >::operator< |
( |
const T |
| ) |
|
◆ operator<=() [1/2]
◆ operator<=() [2/2]
template<typename T>
bool vec2t< T >::operator<= |
( |
const T |
| ) |
|
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==() [1/2]
◆ operator==() [2/2]
template<typename T>
bool vec2t< T >::operator== |
( |
const T |
| ) |
|
◆ operator>() [1/2]
◆ operator>() [2/2]
template<typename T>
bool vec2t< T >::operator> |
( |
const T |
| ) |
|
◆ operator>=() [1/2]
◆ operator>=() [2/2]
template<typename T>
bool vec2t< T >::operator>= |
( |
const T |
| ) |
|
◆ Right()
Returns a vec2t with coordinates indicating the Right direction.
- Returns
- A right-facing vec2t.
◆ toVec2()
Converts this class to a vec2.
- Returns
- A vec2 equivalent of this class.
◆ Up()
Returns a vec2t with coordinates indicating the Up direction.
- Returns
- An up-facing vec2t.
◆ Zero()
Returns a vec2t with both coordinates having the value 0.
- Returns
- A null-values vec2t.
◆ @7
Array of coordinates of the point.
The documentation for this class was generated from the following file: