LightsprintSDK 2021.08.08
rr::RRVec4 Struct Reference

#include <RRMath.h>

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

Public Member Functions

 RRVec4 ()
 
 RRVec4 (RRReal a)
 
 RRVec4 (const RRVec3 &a, RRReal aw)
 
 RRVec4 (RRReal ax, RRReal ay, RRReal az, RRReal aw)
 
const RRVec3operator= (const RRVec3 &a)
 
RRVec4 operator+ (const RRVec4 &a) const
 
RRVec4 operator- (const RRVec4 &a) const
 
RRVec4 operator- () const
 
RRVec4 operator* (RRReal f) const
 
RRVec4 operator* (const RRVec4 &a) const
 
RRVec4 operator/ (RRReal f) const
 
RRVec4 operator/ (const RRVec4 &a) const
 
RRVec4 operator/ (int f) const
 
RRVec4 operator/ (unsigned f) const
 
RRVec4 operator+= (const RRVec4 &a)
 
RRVec4 operator-= (const RRVec4 &a)
 
RRVec4 operator*= (RRReal f)
 
RRVec4 operator*= (const RRVec4 &a)
 
RRVec4 operator/= (RRReal f)
 
RRVec4 operator/= (const RRVec4 &a)
 
bool operator== (const RRVec4 &a) const
 
bool operator!= (const RRVec4 &a) const
 
unsigned components () const
 
RRReal sum () const
 
RRReal avg () const
 
RRVec4 abs () const
 
RRVec4 neg () const
 
RRReal mini () const
 
RRReal maxi () const
 
RRReal length () const
 
RRReal length2 () const
 
void normalize ()
 
void normalizeSafe ()
 
RRVec4 normalized () const
 
RRVec4 normalizedSafe () const
 
bool finite () const
 
RRReal dot (const RRVec4 &a) const
 
RRReal planePointDistance (const RRVec3 &a) const
 
RRVec3 pointInPlane () const
 
- Public Member Functions inherited from rr::RRVec3p
 RRVec3p ()
 
 RRVec3p (RRReal a)
 
 RRVec3p (const RRVec3 &a, RRReal aw)
 
 RRVec3p (RRReal ax, RRReal ay, RRReal az, RRReal aw)
 
const RRVec3operator= (const RRVec3 a)
 
- Public Member Functions inherited from rr::RRVec3
 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
 

Static Public Member Functions

static RRVec4 plane (const RRVec3 &normal, const RRVec3 &point)
 

Additional Inherited Members

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

Detailed Description

Vector of 4 real numbers. Operators use all 4 components.

Constructor & Destructor Documentation

◆ RRVec4() [1/4]

rr::RRVec4::RRVec4 ( )
inline

◆ RRVec4() [2/4]

rr::RRVec4::RRVec4 ( RRReal  a)
inlineexplicit

◆ RRVec4() [3/4]

rr::RRVec4::RRVec4 ( const RRVec3 a,
RRReal  aw 
)
inline

◆ RRVec4() [4/4]

rr::RRVec4::RRVec4 ( RRReal  ax,
RRReal  ay,
RRReal  az,
RRReal  aw 
)
inline

Member Function Documentation

◆ operator=()

const RRVec3 & rr::RRVec4::operator= ( const RRVec3 a)
inline

◆ operator+()

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

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

◆ operator*() [1/2]

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

◆ operator*() [2/2]

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

◆ operator/() [1/4]

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

◆ operator/() [2/4]

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

◆ operator/() [3/4]

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

◆ operator/() [4/4]

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

◆ operator+=()

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

◆ operator-=()

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

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

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

◆ operator/=() [1/2]

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

◆ operator/=() [2/2]

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

◆ operator==()

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

◆ operator!=()

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

◆ components()

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

◆ sum()

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

◆ avg()

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

◆ abs()

RRVec4 rr::RRVec4::abs ( ) const
inline

◆ neg()

RRVec4 rr::RRVec4::neg ( ) const
inline

◆ mini()

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

◆ maxi()

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

◆ length()

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

◆ length2()

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

◆ normalize()

void rr::RRVec4::normalize ( )
inline

◆ normalizeSafe()

void rr::RRVec4::normalizeSafe ( )
inline

◆ normalized()

RRVec4 rr::RRVec4::normalized ( ) const
inline

◆ normalizedSafe()

RRVec4 rr::RRVec4::normalizedSafe ( ) const
inline

◆ finite()

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

◆ dot()

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

◆ plane()

static RRVec4 rr::RRVec4::plane ( const RRVec3 normal,
const RRVec3 point 
)
inlinestatic

◆ planePointDistance()

RRReal rr::RRVec4::planePointDistance ( const RRVec3 a) const
inline

◆ pointInPlane()

RRVec3 rr::RRVec4::pointInPlane ( ) const
inline