Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::Vector4< Type > Class Template Reference

#include <StkVector4.h>

Inheritance diagram for STK::Vector4< Type >:
STK::Quaternion< float > STK::Quaternion< Type >

Public Member Functions

constexpr Vector4 (const Type x, const Type y, const Type z, const Type w)
 
constexpr Vector4 (const Vector3< Type > &v, Type w)
 
template<typename U , STK::enable_if_safe_cast_t< U, Type > = true>
constexpr Vector4 (const Vector4< U > &v)
 
template<typename U >
constexpr operator Vector4< U > () const
 
constexpr const Type & x () const
 
constexpr const Type & y () const
 
constexpr const Type & z () const
 
constexpr const Type & w () const
 
constexpr ranges::span< const Type, 4 > data () const
 
constexpr Type & x ()
 
constexpr Type & y ()
 
constexpr Type & z ()
 
constexpr Type & w ()
 
constexpr ranges::span< Type, 4 > data ()
 
constexpr void setX (Type x)
 
constexpr void setY (Type y)
 
constexpr void setZ (Type z)
 
constexpr void setW (Type w)
 
constexpr bool fuzzyCompare (const Vector4 &v2, Type eps) const
 
constexpr void setValues (const Type &x, const Type &y, const Type &z, const Type &w)
 
constexpr void setValues (ranges::span< const Type, 4 > v)
 
constexpr void getValues (ranges::span< Type, 4 > v) const
 
constexpr void scale (const Type &s)
 
constexpr void add (const Vector4 &t)
 
constexpr Type lengthSquared () const
 Length squared.
 
constexpr Type length () const
 
constexpr Vector4normalize ()
 Normalization.
 
constexpr Vector4operator+= (const Vector4 &v)
 Addition.
 
constexpr Vector4operator-= (const Vector4 &v)
 Subtraction.
 
constexpr Vector4 operator- () const
 Unary negation.
 
constexpr Vector4 operator/ (Type v) const
 Scalar division.
 
constexpr Vector4operator*= (Type v)
 Scalar multiplication.
 
constexpr Vector4operator/= (Type v)
 Scalar division.
 

Static Public Member Functions

static constexpr Type dot (const Vector4 &v1, const Vector4 &v2)
 Computing dot product.
 

Static Public Attributes

static constexpr std::size_t vector_size = 4
 

Protected Attributes

std::array< Type, 4 > data_ { 0, 0, 0, 0 }
 

Friends

constexpr bool operator== (const Vector4 &t1, const Vector4 &t2)
 
constexpr bool operator!= (const Vector4 &t1, const Vector4 &t2)
 
constexpr std::ostream & operator<< (std::ostream &os, const Vector4 &t)
 
constexpr Vector4 operator+ (const Vector4 &v1, const Vector4 &v2)
 Addition.
 
constexpr friend Vector4 operator- (const Vector4 &v1, const Vector4 &v2)
 Subtraction.
 
constexpr Vector4 operator* (const Vector4 &v, Type s)
 Scalar multiplication.
 
constexpr Vector4 operator* (Type s, const Vector4 &v)
 

Detailed Description

template<class Type>
class STK::Vector4< Type >

Vector4 - Generic 4D Vector.


The documentation for this class was generated from the following file: