Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::vec3 Struct Reference

#include <Ultralight/Geometry.h>

Details

3D Vector Helper

Public Member Functions

 vec3 ()
 
 vec3 (float x, float y, float z)
 
 vec3 (float x)
 
vec3operator+= (const vec3 &rhs)
 
vec3operator-= (const vec3 &rhs)
 
vec3operator*= (const vec3 &rhs)
 
vec3operator/= (const vec3 &rhs)
 
vec3operator+= (float rhs)
 
vec3operator-= (float rhs)
 
vec3operator*= (float rhs)
 
vec3operator/= (float rhs)
 

Public Attributes

float x
 
float y
 
float z
 

Friends

vec3 operator+ (vec3 lhs, const vec3 &rhs)
 
vec3 operator- (vec3 lhs, const vec3 &rhs)
 
vec3 operator* (vec3 lhs, const vec3 &rhs)
 
vec3 operator/ (vec3 lhs, const vec3 &rhs)
 
vec3 operator+ (vec3 lhs, float rhs)
 
vec3 operator- (vec3 lhs, float rhs)
 
vec3 operator* (vec3 lhs, float rhs)
 
vec3 operator/ (vec3 lhs, float rhs)
 
bool operator== (const vec3 &a, const vec3 &b)
 
bool operator!= (const vec3 &a, const vec3 &b)
 
vec3 min_ (const vec3 &a, const vec3 &b)
 
vec3 max_ (const vec3 &a, const vec3 &b)
 
vec3 clamp (const vec3 &x, const vec3 &minVal, const vec3 &maxVal)
 
vec3 mix (const vec3 &a, const vec3 &b, float t)
 
float length (const vec3 &a)
 
float distance (const vec3 &a, const vec3 &b)
 
vec3 normalize (const vec3 &a)
 
float dot (const vec3 &a, const vec3 &b)
 

Constructor & Destructor Documentation

◆ vec3() [1/3]

ultralight::vec3::vec3 ( )
inline

◆ vec3() [2/3]

ultralight::vec3::vec3 ( float  x,
float  y,
float  z 
)
inline

◆ vec3() [3/3]

ultralight::vec3::vec3 ( float  x)
inline

Member Function Documentation

◆ operator*=() [1/2]

vec3 & ultralight::vec3::operator*= ( const vec3 rhs)
inline

◆ operator*=() [2/2]

vec3 & ultralight::vec3::operator*= ( float  rhs)
inline

◆ operator+=() [1/2]

vec3 & ultralight::vec3::operator+= ( const vec3 rhs)
inline

◆ operator+=() [2/2]

vec3 & ultralight::vec3::operator+= ( float  rhs)
inline

◆ operator-=() [1/2]

vec3 & ultralight::vec3::operator-= ( const vec3 rhs)
inline

◆ operator-=() [2/2]

vec3 & ultralight::vec3::operator-= ( float  rhs)
inline

◆ operator/=() [1/2]

vec3 & ultralight::vec3::operator/= ( const vec3 rhs)
inline

◆ operator/=() [2/2]

vec3 & ultralight::vec3::operator/= ( float  rhs)
inline

Friends And Related Symbol Documentation

◆ clamp

vec3 clamp ( const vec3 x,
const vec3 minVal,
const vec3 maxVal 
)
friend

◆ distance

float distance ( const vec3 a,
const vec3 b 
)
friend

◆ dot

float dot ( const vec3 a,
const vec3 b 
)
friend

◆ length

float length ( const vec3 a)
friend

◆ max_

vec3 max_ ( const vec3 a,
const vec3 b 
)
friend

◆ min_

vec3 min_ ( const vec3 a,
const vec3 b 
)
friend

◆ mix

vec3 mix ( const vec3 a,
const vec3 b,
float  t 
)
friend

◆ normalize

vec3 normalize ( const vec3 a)
friend

◆ operator!=

bool operator!= ( const vec3 a,
const vec3 b 
)
friend

◆ operator* [1/2]

vec3 operator* ( vec3  lhs,
const vec3 rhs 
)
friend

◆ operator* [2/2]

vec3 operator* ( vec3  lhs,
float  rhs 
)
friend

◆ operator+ [1/2]

vec3 operator+ ( vec3  lhs,
const vec3 rhs 
)
friend

◆ operator+ [2/2]

vec3 operator+ ( vec3  lhs,
float  rhs 
)
friend

◆ operator- [1/2]

vec3 operator- ( vec3  lhs,
const vec3 rhs 
)
friend

◆ operator- [2/2]

vec3 operator- ( vec3  lhs,
float  rhs 
)
friend

◆ operator/ [1/2]

vec3 operator/ ( vec3  lhs,
const vec3 rhs 
)
friend

◆ operator/ [2/2]

vec3 operator/ ( vec3  lhs,
float  rhs 
)
friend

◆ operator==

bool operator== ( const vec3 a,
const vec3 b 
)
friend

Member Data Documentation

◆ x

float ultralight::vec3::x

◆ y

float ultralight::vec3::y

◆ z

float ultralight::vec3::z

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