LightsprintSDK 2021.08.08
rr::RRVec2 Struct Reference

#include <RRMath.h>

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

Public Member Functions

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 x
 
RRReal y
 

Detailed Description

Vector of 2 real numbers plus basic support.

Constructor & Destructor Documentation

◆ RRVec2() [1/3]

rr::RRVec2::RRVec2 ( )
inline

◆ RRVec2() [2/3]

rr::RRVec2::RRVec2 ( RRReal  a)
inlineexplicit

◆ RRVec2() [3/3]

rr::RRVec2::RRVec2 ( RRReal  ax,
RRReal  ay 
)
inline

Member Function Documentation

◆ operator[]()

RRReal & rr::RRVec2::operator[] ( int  i) const
inline

◆ operator+()

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

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

◆ operator*() [1/2]

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

◆ operator*() [2/2]

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

◆ operator+=()

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

◆ operator-=()

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

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

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

◆ operator/=() [1/2]

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

◆ operator/=() [2/2]

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

◆ operator==()

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

◆ operator!=()

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

◆ components()

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

◆ sum()

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

◆ avg()

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

◆ abs()

RRVec2 rr::RRVec2::abs ( ) const
inline

◆ neg()

RRVec2 rr::RRVec2::neg ( ) const
inline

◆ mini()

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

◆ maxi()

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

◆ length()

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

◆ length2()

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

◆ normalize()

void rr::RRVec2::normalize ( )
inline

◆ normalizeSafe()

void rr::RRVec2::normalizeSafe ( )
inline

◆ normalized()

RRVec2 rr::RRVec2::normalized ( ) const
inline

◆ normalizedSafe()

RRVec2 rr::RRVec2::normalizedSafe ( ) const
inline

◆ finite()

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

◆ dot()

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

Member Data Documentation

◆ x

RRReal rr::RRVec2::x

◆ y

RRReal rr::RRVec2::y