Monado OpenXR Runtime
Public Member Functions | Static Public Member Functions | Data Fields
Vector3 Class Reference

#include <north_star/distortion/utility_northstar.h>

Public Member Functions

 Vector3 (const Vector3 &in)
 
 Vector3 ()
 
 Vector3 (float _x, float _y, float _z)
 
 Vector3 (float _x, float _y)
 
constexpr Vector3operator= (const Vector3 &lhr)
 
Vector3 operator- (Vector3 &rhs)
 
Vector3 operator- ()
 
Vector3 operator+ (const Vector3 &rhs)
 
Vector3operator+= (const Vector3 &v)
 
Vector3 operator/ (const float &d)
 
Vector3 operator* (const float &d)
 
Vector3 Inverse ()
 
float Dot (Vector3 rhs)
 
float sqrMagnitude ()
 
float Magnitude ()
 
void Normalize ()
 
Vector3 Normalized ()
 
void rotate (Vector3 axis, float radians)
 
Vector3 Cross (const Vector3 in)
 

Static Public Member Functions

static Vector3 Up ()
 
static Vector3 Down ()
 
static Vector3 Left ()
 
static Vector3 Right ()
 
static Vector3 Forward ()
 
static Vector3 Backward ()
 
static float Dot (Vector3 lhs, Vector3 rhs)
 
static float Angle (Vector3 v0, Vector3 v1)
 
static Vector3 Zero ()
 
static Vector3 One ()
 
static Vector3 Reflect (Vector3 inDirection, Vector3 inNormal)
 

Data Fields

float x
 
float y
 
float z
 

Constructor & Destructor Documentation

◆ Vector3() [1/4]

Vector3::Vector3 ( const Vector3 in)
inline

References x, y, and z.

◆ Vector3() [2/4]

Vector3::Vector3 ( )
inline

◆ Vector3() [3/4]

Vector3::Vector3 ( float  _x,
float  _y,
float  _z 
)
inline

◆ Vector3() [4/4]

Vector3::Vector3 ( float  _x,
float  _y 
)
inline

Member Function Documentation

◆ Angle()

static float Vector3::Angle ( Vector3  v0,
Vector3  v1 
)
inlinestatic

References Dot(), and Normalized().

Referenced by Quaternion::FromToRotation().

◆ Backward()

static Vector3 Vector3::Backward ( )
inlinestatic

◆ Cross()

Vector3 Vector3::Cross ( const Vector3  in)
inline

◆ Dot() [1/2]

static float Vector3::Dot ( Vector3  lhs,
Vector3  rhs 
)
inlinestatic

◆ Dot() [2/2]

float Vector3::Dot ( Vector3  rhs)
inline

References x, y, and z.

◆ Down()

static Vector3 Vector3::Down ( )
inlinestatic

◆ Forward()

static Vector3 Vector3::Forward ( )
inlinestatic

◆ Inverse()

Vector3 Vector3::Inverse ( )
inline

References x, y, and z.

◆ Left()

static Vector3 Vector3::Left ( )
inlinestatic

◆ Magnitude()

float Vector3::Magnitude ( )
inline

◆ Normalize()

void Vector3::Normalize ( )
inline

References kEpsilon.

Referenced by Ray::Ray().

◆ Normalized()

Vector3 Vector3::Normalized ( )
inline

◆ One()

static Vector3 Vector3::One ( )
inlinestatic

References x, y, and z.

◆ operator*()

Vector3 Vector3::operator* ( const float &  d)
inline

References x, y, and z.

◆ operator+()

Vector3 Vector3::operator+ ( const Vector3 rhs)
inline

References x, y, and z.

◆ operator+=()

Vector3& Vector3::operator+= ( const Vector3 v)
inline

References x, y, and z.

◆ operator-() [1/2]

Vector3 Vector3::operator- ( Vector3 rhs)
inline

References x, y, and z.

◆ operator-() [2/2]

Vector3 Vector3::operator- ( )
inline

◆ operator/()

Vector3 Vector3::operator/ ( const float &  d)
inline

References x, y, and z.

◆ operator=()

constexpr Vector3& Vector3::operator= ( const Vector3 lhr)
inline

References x, y, and z.

◆ Reflect()

static Vector3 Vector3::Reflect ( Vector3  inDirection,
Vector3  inNormal 
)
inlinestatic

◆ Right()

static Vector3 Vector3::Right ( )
inlinestatic

Referenced by Quaternion::Right().

◆ rotate()

void Vector3::rotate ( Vector3  axis,
float  radians 
)
inline

References Cross(), Dot(), x, y, and z.

◆ sqrMagnitude()

float Vector3::sqrMagnitude ( )
inline

Referenced by intersectLineSphere().

◆ Up()

static Vector3 Vector3::Up ( )
inlinestatic

◆ Zero()

static Vector3 Vector3::Zero ( )
inlinestatic

Field Documentation

◆ x

float Vector3::x

◆ y

float Vector3::y

◆ z

float Vector3::z

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