LightsprintSDK 2021.08.08
rr::RRVec3 Struct Reference

#include <RRMath.h>

Inheritance diagram for rr::RRVec3:
rr::RRVec2 rr::RRVec3p rr::RRVec4

Public Member Functions

 RRVec3 ()
 
 RRVec3 (RRReal a)
 
 RRVec3 (RRReal ax, RRReal ay, RRReal az)
 
RRVec3 operator+ (const RRVec3 &a) const
 
RRVec3 operator- (const RRVec3 &a) const
 
RRVec3 operator- () const
 
RRVec3 operator* (RRReal f) const
 
RRVec3 operator* (const RRVec3 &a) const
 
RRVec3 operator/ (RRReal f) const
 
RRVec3 operator/ (const RRVec3 &a) const
 
RRVec3 operator/ (int f) const
 
RRVec3 operator/ (unsigned f) const
 
RRVec3 operator+= (const RRVec3 &a)
 
RRVec3 operator-= (const RRVec3 &a)
 
RRVec3 operator*= (RRReal f)
 
RRVec3 operator*= (const RRVec3 &a)
 
RRVec3 operator/= (RRReal f)
 
RRVec3 operator/= (const RRVec3 &a)
 
bool operator== (const RRVec3 &a) const
 
bool operator!= (const RRVec3 &a) const
 
unsigned components () const
 
RRReal sum () const
 
RRReal avg () const
 
RRVec3 abs () const
 
RRVec3 neg () const
 
RRReal mini () const
 
RRReal maxi () const
 
RRReal length () const
 
RRReal length2 () const
 
void normalize ()
 
void normalizeSafe ()
 
RRVec3 normalized () const
 
RRVec3 normalizedSafe () const
 
bool finite () const
 
RRReal dot (const RRVec3 &a) const
 
RRVec3 cross (const RRVec3 &a) const
 
RR_API RRVec3 getHsvFromRgb () const
 
RR_API RRVec3 getRgbFromHsv () const
 
- Public Member Functions inherited from rr::RRVec2
RRRealoperator[] (int i) const
 
 RRVec2 ()
 
 RRVec2 (RRReal a)
 
 RRVec2 (RRReal ax, RRReal ay)
 
RRVec2 operator+ (const RRVec2 &a) const
 
RRVec2 operator- (const RRVec2 &a) const
 
RRVec2 operator- () const
 
RRVec2 operator* (RRReal f) const
 
RRVec2 operator* (const RRVec2 &a) const
 
RRVec2 operator/ (RRReal f) const
 
RRVec2 operator/ (const RRVec2 &a) const
 
RRVec2 operator+= (const RRVec2 &a)
 
RRVec2 operator-= (const RRVec2 &a)
 
RRVec2 operator*= (RRReal f)
 
RRVec2 operator*= (const RRVec2 &a)
 
RRVec2 operator/= (RRReal f)
 
RRVec2 operator/= (const RRVec2 &a)
 
bool operator== (const RRVec2 &a) const
 
bool operator!= (const RRVec2 &a) const
 
unsigned components () const
 
RRReal sum () const
 
RRReal avg () const
 
RRVec2 abs () const
 
RRVec2 neg () const
 
RRReal mini () const
 
RRReal maxi () const
 
RRReal length () const
 
RRReal length2 () const
 
void normalize ()
 
void normalizeSafe ()
 
RRVec2 normalized () const
 
RRVec2 normalizedSafe () const
 
bool finite () const
 
RRReal dot (const RRVec2 &a) const
 

Public Attributes

RRReal z
 
- Public Attributes inherited from rr::RRVec2
RRReal x
 
RRReal y
 

Detailed Description

Vector of 3 real numbers plus basic support.

Constructor & Destructor Documentation

◆ RRVec3() [1/3]

rr::RRVec3::RRVec3 ( )
inline

◆ RRVec3() [2/3]

rr::RRVec3::RRVec3 ( RRReal  a)
inlineexplicit

◆ RRVec3() [3/3]

rr::RRVec3::RRVec3 ( RRReal  ax,
RRReal  ay,
RRReal  az 
)
inline

Member Function Documentation

◆ operator+()

RRVec3 rr::RRVec3::operator+ ( const RRVec3 a) const
inline

◆ operator-() [1/2]

RRVec3 rr::RRVec3::operator- ( const RRVec3 a) const
inline

◆ operator-() [2/2]

RRVec3 rr::RRVec3::operator- ( ) const
inline

◆ operator*() [1/2]

RRVec3 rr::RRVec3::operator* ( RRReal  f) const
inline

◆ operator*() [2/2]

RRVec3 rr::RRVec3::operator* ( const RRVec3 a) const
inline

◆ operator/() [1/4]

RRVec3 rr::RRVec3::operator/ ( RRReal  f) const
inline

◆ operator/() [2/4]

RRVec3 rr::RRVec3::operator/ ( const RRVec3 a) const
inline

◆ operator/() [3/4]

RRVec3 rr::RRVec3::operator/ ( int  f) const
inline

◆ operator/() [4/4]

RRVec3 rr::RRVec3::operator/ ( unsigned  f) const
inline

◆ operator+=()

RRVec3 rr::RRVec3::operator+= ( const RRVec3 a)
inline

◆ operator-=()

RRVec3 rr::RRVec3::operator-= ( const RRVec3 a)
inline

◆ operator*=() [1/2]

RRVec3 rr::RRVec3::operator*= ( RRReal  f)
inline

◆ operator*=() [2/2]

RRVec3 rr::RRVec3::operator*= ( const RRVec3 a)
inline

◆ operator/=() [1/2]

RRVec3 rr::RRVec3::operator/= ( RRReal  f)
inline

◆ operator/=() [2/2]

RRVec3 rr::RRVec3::operator/= ( const RRVec3 a)
inline

◆ operator==()

bool rr::RRVec3::operator== ( const RRVec3 a) const
inline

◆ operator!=()

bool rr::RRVec3::operator!= ( const RRVec3 a) const
inline

◆ components()

unsigned rr::RRVec3::components ( ) const
inline

◆ sum()

RRReal rr::RRVec3::sum ( ) const
inline

◆ avg()

RRReal rr::RRVec3::avg ( ) const
inline

◆ abs()

RRVec3 rr::RRVec3::abs ( ) const
inline

◆ neg()

RRVec3 rr::RRVec3::neg ( ) const
inline

◆ mini()

RRReal rr::RRVec3::mini ( ) const
inline

◆ maxi()

RRReal rr::RRVec3::maxi ( ) const
inline

◆ length()

RRReal rr::RRVec3::length ( ) const
inline

◆ length2()

RRReal rr::RRVec3::length2 ( ) const
inline

◆ normalize()

void rr::RRVec3::normalize ( )
inline

◆ normalizeSafe()

void rr::RRVec3::normalizeSafe ( )
inline

◆ normalized()

RRVec3 rr::RRVec3::normalized ( ) const
inline

◆ normalizedSafe()

RRVec3 rr::RRVec3::normalizedSafe ( ) const
inline

◆ finite()

bool rr::RRVec3::finite ( ) const
inline

◆ dot()

RRReal rr::RRVec3::dot ( const RRVec3 a) const
inline

◆ cross()

RRVec3 rr::RRVec3::cross ( const RRVec3 a) const
inline

◆ getHsvFromRgb()

RR_API RRVec3 rr::RRVec3::getHsvFromRgb ( ) const

◆ getRgbFromHsv()

RR_API RRVec3 rr::RRVec3::getRgbFromHsv ( ) const

Member Data Documentation

◆ z

RRReal rr::RRVec3::z