Kale
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Kale::Vector3< T > Class Template Reference

#include <Vector.hpp>

Public Member Functions

 Vector3 ()
 
 Vector3 (T x, T y, T z)
 
 Vector3 (T v[3])
 
 Vector3 (Vector2< T > v, T z)
 
 Vector3 (T x, Vector2< T > v)
 
void operator= (T n)
 
void operator= (T v[3])
 
void operator+= (Vector3< T > o)
 
void operator-= (Vector3< T > o)
 
void operator*= (Vector3< T > o)
 
void operator/= (Vector3< T > o)
 
void operator+= (T v)
 
void operator-= (T v)
 
void operator*= (T v)
 
void operator/= (T v)
 
Vector3< Toperator- () const
 
Vector3< Toperator+ (Vector3< T > o) const
 
Vector3< Toperator- (Vector3< T > o) const
 
Vector3< Toperator* (Vector3< T > o) const
 
Vector3< Toperator/ (Vector3< T > o) const
 
Vector3< Toperator+ (T v) const
 
Vector3< Toperator- (T v) const
 
Vector3< Toperator* (T v) const
 
Vector3< Toperator/ (T v) const
 
bool operator> (Vector3< T > o) const
 
bool operator< (Vector3< T > o) const
 
bool operator>= (Vector3< T > o) const
 
bool operator<= (Vector3< T > o) const
 
template<typename A = T>
std::enable_if< std::is_integral< A >::value, bool >::type operator== (Vector3< T > o) const
 
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, bool >::type operator== (Vector3< T > o) const
 
bool operator!= (Vector3< T > o) const
 
T dot (Vector3< T > o) const
 
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, T >::type magnitude () const
 
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, float >::type dist (Vector3< T > o) const
 
Vector3< Tclamp (T minX, T maxX, T minY, T maxY, T minZ, T maxZ) const
 
Vector3< Tclamp (Vector3< T > min, Vector3< T > max) const
 
void clampTo (T minX, T maxX, T minY, T maxY, T minZ, T maxZ)
 
void clampTo (Vector3< T > min, Vector3< T > max)
 
template<typename A >
Vector3< Acast () const
 
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, Vector3< T > >::type unit () const
 
Vector2< Txy () const
 
Vector2< Txz () const
 
Vector2< Tyx () const
 
Vector2< Tyz () const
 
Vector2< Tzx () const
 
Vector2< Tzy () const
 
Vector3< Txyz () const
 
Vector3< Txzy () const
 
Vector3< Tyxz () const
 
Vector3< Tyzx () const
 
Vector3< Tzxy () const
 
Vector3< Tzyx () const
 

Static Public Member Functions

static Vector3< Tzero ()
 
static Vector3< Tone ()
 
static Vector3< Tright ()
 
static Vector3< Tup ()
 
static Vector3< Tfront ()
 
static Vector3< Tmax ()
 
static Vector3< Tmin ()
 
static Vector3< Trandom (T min, T max)
 
static Vector3< Trandom (T minX, T maxX, T minY, T maxY, T minZ, T maxZ)
 

Public Attributes

T x
 
T y
 
T z
 

Friends

Vector3< Toperator+ (float n, Vector3< T > v)
 
Vector3< Toperator- (float n, Vector3< T > v)
 
Vector3< Toperator* (float n, Vector3< T > v)
 
Vector3< Toperator/ (float n, Vector3< T > v)
 

Detailed Description

template<typename T>
class Kale::Vector3< T >

Represents a vector in a 3 dimensional space

Definition at line 186 of file Vector.hpp.

Constructor & Destructor Documentation

◆ Vector3() [1/5]

template<typename T >
Kale::Vector3< T >::Vector3 ( )
inline

Definition at line 190 of file Vector.hpp.

◆ Vector3() [2/5]

template<typename T >
Kale::Vector3< T >::Vector3 ( T x,
T y,
T z )
inline

Definition at line 191 of file Vector.hpp.

◆ Vector3() [3/5]

template<typename T >
Kale::Vector3< T >::Vector3 ( T v[3])
inline

Definition at line 192 of file Vector.hpp.

◆ Vector3() [4/5]

template<typename T >
Kale::Vector3< T >::Vector3 ( Vector2< T > v,
T z )
inline

Definition at line 194 of file Vector.hpp.

◆ Vector3() [5/5]

template<typename T >
Kale::Vector3< T >::Vector3 ( T x,
Vector2< T > v )
inline

Definition at line 195 of file Vector.hpp.

Member Function Documentation

◆ cast()

template<typename T >
template<typename A >
Vector3< A > Kale::Vector3< T >::cast ( ) const
inline

Definition at line 305 of file Vector.hpp.

◆ clamp() [1/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::clamp ( T minX,
T maxX,
T minY,
T maxY,
T minZ,
T maxZ ) const
inline

Definition at line 287 of file Vector.hpp.

◆ clamp() [2/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::clamp ( Vector3< T > min,
Vector3< T > max ) const
inline

Definition at line 290 of file Vector.hpp.

◆ clampTo() [1/2]

template<typename T >
void Kale::Vector3< T >::clampTo ( T minX,
T maxX,
T minY,
T maxY,
T minZ,
T maxZ )
inline

Definition at line 294 of file Vector.hpp.

◆ clampTo() [2/2]

template<typename T >
void Kale::Vector3< T >::clampTo ( Vector3< T > min,
Vector3< T > max )
inline

Definition at line 299 of file Vector.hpp.

◆ dist()

template<typename T >
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, float >::type Kale::Vector3< T >::dist ( Vector3< T > o) const
inline

Definition at line 283 of file Vector.hpp.

◆ dot()

template<typename T >
T Kale::Vector3< T >::dot ( Vector3< T > o) const
inline

Definition at line 279 of file Vector.hpp.

◆ front()

template<typename T >
static Vector3< T > Kale::Vector3< T >::front ( )
inlinestatic

Definition at line 331 of file Vector.hpp.

◆ magnitude()

template<typename T >
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, T >::type Kale::Vector3< T >::magnitude ( ) const
inline

Definition at line 280 of file Vector.hpp.

◆ max()

template<typename T >
static Vector3< T > Kale::Vector3< T >::max ( )
inlinestatic

Definition at line 332 of file Vector.hpp.

◆ min()

template<typename T >
static Vector3< T > Kale::Vector3< T >::min ( )
inlinestatic

Definition at line 333 of file Vector.hpp.

◆ one()

template<typename T >
static Vector3< T > Kale::Vector3< T >::one ( )
inlinestatic

Definition at line 328 of file Vector.hpp.

◆ operator!=()

template<typename T >
bool Kale::Vector3< T >::operator!= ( Vector3< T > o) const
inline

Definition at line 277 of file Vector.hpp.

◆ operator*() [1/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator* ( T v) const
inline

Definition at line 259 of file Vector.hpp.

◆ operator*() [2/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator* ( Vector3< T > o) const
inline

Definition at line 254 of file Vector.hpp.

◆ operator*=() [1/2]

template<typename T >
void Kale::Vector3< T >::operator*= ( T v)
inline

Definition at line 239 of file Vector.hpp.

◆ operator*=() [2/2]

template<typename T >
void Kale::Vector3< T >::operator*= ( Vector3< T > o)
inline

Definition at line 218 of file Vector.hpp.

◆ operator+() [1/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator+ ( T v) const
inline

Definition at line 257 of file Vector.hpp.

◆ operator+() [2/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator+ ( Vector3< T > o) const
inline

Definition at line 252 of file Vector.hpp.

◆ operator+=() [1/2]

template<typename T >
void Kale::Vector3< T >::operator+= ( T v)
inline

Definition at line 229 of file Vector.hpp.

◆ operator+=() [2/2]

template<typename T >
void Kale::Vector3< T >::operator+= ( Vector3< T > o)
inline

Definition at line 208 of file Vector.hpp.

◆ operator-() [1/3]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator- ( ) const
inline

Definition at line 250 of file Vector.hpp.

◆ operator-() [2/3]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator- ( T v) const
inline

Definition at line 258 of file Vector.hpp.

◆ operator-() [3/3]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator- ( Vector3< T > o) const
inline

Definition at line 253 of file Vector.hpp.

◆ operator-=() [1/2]

template<typename T >
void Kale::Vector3< T >::operator-= ( T v)
inline

Definition at line 234 of file Vector.hpp.

◆ operator-=() [2/2]

template<typename T >
void Kale::Vector3< T >::operator-= ( Vector3< T > o)
inline

Definition at line 213 of file Vector.hpp.

◆ operator/() [1/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator/ ( T v) const
inline

Definition at line 260 of file Vector.hpp.

◆ operator/() [2/2]

template<typename T >
Vector3< T > Kale::Vector3< T >::operator/ ( Vector3< T > o) const
inline

Definition at line 255 of file Vector.hpp.

◆ operator/=() [1/2]

template<typename T >
void Kale::Vector3< T >::operator/= ( T v)
inline

Definition at line 244 of file Vector.hpp.

◆ operator/=() [2/2]

template<typename T >
void Kale::Vector3< T >::operator/= ( Vector3< T > o)
inline

Definition at line 223 of file Vector.hpp.

◆ operator<()

template<typename T >
bool Kale::Vector3< T >::operator< ( Vector3< T > o) const
inline

Definition at line 268 of file Vector.hpp.

◆ operator<=()

template<typename T >
bool Kale::Vector3< T >::operator<= ( Vector3< T > o) const
inline

Definition at line 270 of file Vector.hpp.

◆ operator=() [1/2]

template<typename T >
void Kale::Vector3< T >::operator= ( T n)
inline

Definition at line 197 of file Vector.hpp.

◆ operator=() [2/2]

template<typename T >
void Kale::Vector3< T >::operator= ( T v[3])
inline

Definition at line 202 of file Vector.hpp.

◆ operator==() [1/2]

template<typename T >
template<typename A = T>
std::enable_if< std::is_integral< A >::value, bool >::type Kale::Vector3< T >::operator== ( Vector3< T > o) const
inline

Definition at line 271 of file Vector.hpp.

◆ operator==() [2/2]

template<typename T >
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, bool >::type Kale::Vector3< T >::operator== ( Vector3< T > o) const
inline

Definition at line 274 of file Vector.hpp.

◆ operator>()

template<typename T >
bool Kale::Vector3< T >::operator> ( Vector3< T > o) const
inline

Definition at line 267 of file Vector.hpp.

◆ operator>=()

template<typename T >
bool Kale::Vector3< T >::operator>= ( Vector3< T > o) const
inline

Definition at line 269 of file Vector.hpp.

◆ random() [1/2]

template<typename T >
static Vector3< T > Kale::Vector3< T >::random ( T min,
T max )
inlinestatic

Definition at line 335 of file Vector.hpp.

◆ random() [2/2]

template<typename T >
static Vector3< T > Kale::Vector3< T >::random ( T minX,
T maxX,
T minY,
T maxY,
T minZ,
T maxZ )
inlinestatic

Definition at line 336 of file Vector.hpp.

◆ right()

template<typename T >
static Vector3< T > Kale::Vector3< T >::right ( )
inlinestatic

Definition at line 329 of file Vector.hpp.

◆ unit()

template<typename T >
template<typename A = T>
std::enable_if< std::is_floating_point< A >::value, Vector3< T > >::type Kale::Vector3< T >::unit ( ) const
inline

Definition at line 309 of file Vector.hpp.

◆ up()

template<typename T >
static Vector3< T > Kale::Vector3< T >::up ( )
inlinestatic

Definition at line 330 of file Vector.hpp.

◆ xy()

template<typename T >
Vector2< T > Kale::Vector3< T >::xy ( ) const
inline

Definition at line 313 of file Vector.hpp.

◆ xyz()

template<typename T >
Vector3< T > Kale::Vector3< T >::xyz ( ) const
inline

Definition at line 320 of file Vector.hpp.

◆ xz()

template<typename T >
Vector2< T > Kale::Vector3< T >::xz ( ) const
inline

Definition at line 314 of file Vector.hpp.

◆ xzy()

template<typename T >
Vector3< T > Kale::Vector3< T >::xzy ( ) const
inline

Definition at line 321 of file Vector.hpp.

◆ yx()

template<typename T >
Vector2< T > Kale::Vector3< T >::yx ( ) const
inline

Definition at line 315 of file Vector.hpp.

◆ yxz()

template<typename T >
Vector3< T > Kale::Vector3< T >::yxz ( ) const
inline

Definition at line 322 of file Vector.hpp.

◆ yz()

template<typename T >
Vector2< T > Kale::Vector3< T >::yz ( ) const
inline

Definition at line 316 of file Vector.hpp.

◆ yzx()

template<typename T >
Vector3< T > Kale::Vector3< T >::yzx ( ) const
inline

Definition at line 323 of file Vector.hpp.

◆ zero()

template<typename T >
static Vector3< T > Kale::Vector3< T >::zero ( )
inlinestatic

Definition at line 327 of file Vector.hpp.

◆ zx()

template<typename T >
Vector2< T > Kale::Vector3< T >::zx ( ) const
inline

Definition at line 317 of file Vector.hpp.

◆ zxy()

template<typename T >
Vector3< T > Kale::Vector3< T >::zxy ( ) const
inline

Definition at line 324 of file Vector.hpp.

◆ zy()

template<typename T >
Vector2< T > Kale::Vector3< T >::zy ( ) const
inline

Definition at line 318 of file Vector.hpp.

◆ zyx()

template<typename T >
Vector3< T > Kale::Vector3< T >::zyx ( ) const
inline

Definition at line 325 of file Vector.hpp.

Friends And Related Symbol Documentation

◆ operator*

template<typename T >
Vector3< T > operator* ( float n,
Vector3< T > v )
friend

Definition at line 264 of file Vector.hpp.

◆ operator+

template<typename T >
Vector3< T > operator+ ( float n,
Vector3< T > v )
friend

Definition at line 262 of file Vector.hpp.

◆ operator-

template<typename T >
Vector3< T > operator- ( float n,
Vector3< T > v )
friend

Definition at line 263 of file Vector.hpp.

◆ operator/

template<typename T >
Vector3< T > operator/ ( float n,
Vector3< T > v )
friend

Definition at line 265 of file Vector.hpp.

Member Data Documentation

◆ x

template<typename T >
T Kale::Vector3< T >::x

Definition at line 188 of file Vector.hpp.

◆ y

template<typename T >
T Kale::Vector3< T >::y

Definition at line 188 of file Vector.hpp.

◆ z

template<typename T >
T Kale::Vector3< T >::z

Definition at line 188 of file Vector.hpp.


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