![]() |
Maria GDK 5.0.0.908
Documentation of native code in develop branch
|
#include <StkVector3.h>
Public Types | |
| using | value_type = Type |
Public Member Functions | |
| constexpr | Vector3 (const Type x, const Type y, const Type z=0) |
| constexpr | Vector3 (const Vector2< Type > &v, Type z=0) |
| template<typename U , STK::enable_if_safe_cast_t< U, Type > = true> | |
| constexpr | Vector3 (const Vector3< U > &v) |
| template<typename U > | |
| constexpr | operator Vector3< U > () const |
| constexpr const Type & | x () const |
| constexpr const Type & | y () const |
| constexpr const Type & | z () const |
| constexpr ranges::span< const Type, 3 > | data () const |
| constexpr Type & | x () |
| constexpr Type & | y () |
| constexpr Type & | z () |
| constexpr ranges::span< Type, 3 > | data () |
| constexpr void | setX (Type x) |
| constexpr void | setY (Type y) |
| constexpr void | setZ (Type z) |
| constexpr bool | fuzzyCompare (const Vector3 &v, Type eps) const |
| constexpr void | setValues (const Type &x, const Type &y, const Type &z) |
| constexpr void | setValues (ranges::span< const Type, 3 > v) |
| constexpr void | getValues (const ranges::span< Type, 3 > v) const |
| constexpr void | scale (const Type s) |
| constexpr void | add (const Vector3 &t) |
| constexpr Type | lengthSquared () const |
| Length squared. | |
| constexpr Type | length () const |
| constexpr Vector3 & | normalize () |
| Normalization. | |
| constexpr Vector3 & | operator+= (const Vector3 &v) |
| Addition. | |
| constexpr Vector3 & | operator-= (const Vector3 &v) |
| Subtraction. | |
| constexpr Vector3 | operator- () const |
| Unary negation. | |
| constexpr Vector3 & | operator*= (Type v) |
| Scalar multiplication. | |
| constexpr Vector3 & | operator/= (Type v) |
| Scalar division. | |
Static Public Member Functions | |
| static constexpr Type | angle (const Vector3 &v1, const Vector3 &v2) |
| Computing angle between two vectors. | |
| static constexpr Type | dot (const Vector3 &v1, const Vector3 &v2) |
| Computing dot product. | |
| static constexpr Vector3 | cross (const Vector3 &v1, const Vector3 &v2) |
| Creating a vector from cross product. | |
| static constexpr int | orientation (const Vector3 &p1, const Vector3 &p2, const Vector3 &p3, double eps=1e-6) |
Static Public Attributes | |
| static constexpr std::size_t | vector_size = 3 |
Protected Attributes | |
| std::array< Type, 3 > | data_ { 0, 0, 0 } |
Friends | |
| constexpr friend bool | operator== (const Vector3 &t1, const Vector3 &t2) |
| constexpr friend bool | operator!= (const Vector3 &t1, const Vector3 &t2) |
| std::ostream & | operator<< (std::ostream &os, const Vector3 &t) |
| constexpr Vector3 | operator+ (const Vector3 &v1, const Vector3 &v2) |
| Addition. | |
| constexpr Vector3 | operator- (const Vector3 &v1, const Vector3 &v2) |
| Subtraction. | |
| constexpr Vector3 | operator* (const Vector3 &v, Type s) |
| Scalar multiplication. | |
| constexpr Vector3 | operator* (Type s, const Vector3 &v) |
| constexpr Vector3 | operator/ (const Vector3 &v, Type s) |
| Scalar division. | |
Vector3 - Generic 3D Vector.
|
inlinestaticconstexpr |
Get orientation (clockwise or counterclockwise) of three points in the XY-plane. Returns the orientation (clockwise or counterclockwise) of the given three points.
counterclockwise = 1, colinear = 0, clockwise = -1