|
Hermes
|
Geometric 2-dimensional vector (x, y) More...
#include <vector.h>
Inheritance diagram for hermes::Vector2< T >:Public Member Functions | |
| HERMES_DEVICE_CALLABLE | Vector2 () |
| Default constructor. | |
| HERMES_DEVICE_CALLABLE | Vector2 (T _x, T _y) |
| Constructs from component values. | |
| HERMES_DEVICE_CALLABLE | Vector2 (const Point2< T > &p) |
| Constructs from geometric point. | |
| HERMES_DEVICE_CALLABLE | Vector2 (T f) |
| Constructs from single component value. | |
| HERMES_DEVICE_CALLABLE | Vector2 (T *f) |
| Constructs from component array. | |
| HERMES_DEVICE_CALLABLE T | operator[] (size_t i) const |
| Get i-th component. | |
| HERMES_DEVICE_CALLABLE T & | operator[] (size_t i) |
| Get i-th component reference. | |
| HERMES_DEVICE_CALLABLE Vector2 | operator- () const |
| HERMES_DEVICE_CALLABLE bool | operator== (const Vector2< T > &b) const |
| HERMES_DEVICE_CALLABLE T | length2 () const |
| Computes squared magnitude. | |
| HERMES_DEVICE_CALLABLE T | length () const |
| Computes magnitude. | |
| HERMES_DEVICE_CALLABLE Vector2 | right () const |
| Gets orthogonal vector in right direction. | |
| HERMES_DEVICE_CALLABLE Vector2 | left () const |
| Gets orthogonal vector in left direction. | |
| Vector2 | xy () const |
| Gets swizzle form (x, y) | |
| Vector2 | yx () const |
| Gets swizzle form (y, x) | |
| Vector2 | xx () const |
| Gets swizzle form (x, x) | |
| Vector2 | yy () const |
| Gets swizzle form (y, y) | |
Public Attributes | |
| T | x = T(0.0) |
| 0-th component | |
| T | y = T(0.0) |
| 1-th component | |
Additional Inherited Members | |
Static Public Member Functions inherited from hermes::MathElement< T, 2u > | |
| static constexpr u64 | componentCount () |
| Gets the number of dimensional components. | |
| static constexpr u64 | numericTypeSizeInBytes () |
| Gets the size in bytes of underlying data type. | |
| static MemoryDumper::RegionLayout | memoryDumpLayout () |
| Gets memory layout. | |
Static Public Attributes inherited from hermes::MathElement< T, 2u > | |
| static T | numeric_data |
| Underlying data type. | |
Geometric 2-dimensional vector (x, y)
| T |
|
inline |
Constructs from component values.
| _x | |
| _y |
|
inlineexplicit |
Constructs from geometric point.
| p |
|
inlineexplicit |
Constructs from single component value.
| f |
|
inlineexplicit |
Constructs from component array.
| f |
|
inline |
Gets orthogonal vector in left direction.
|
inline |
Computes magnitude.
|
inline |
Computes squared magnitude.
|
inline |
Get i-th component reference.
i is not checked | i | component index in [0, 1] |
|
inline |
Get i-th component.
i is not checked | i | component index in [0, 1] |
|
inline |
Gets orthogonal vector in right direction.
|
inline |
Gets swizzle form (x, x)
|
inline |
Gets swizzle form (x, y)
|
inline |
Gets swizzle form (y, x)
|
inline |
Gets swizzle form (y, y)