RenderManAPI  24.0
RtFloat2 Class Reference

#include <RiTypesHelper.h>

Public Member Functions

 RtFloat2 ()=default
 
 RtFloat2 (float xx, float yy)
 
 RtFloat2 (float v)
 
 RtFloat2 (const float *d)
 
float & operator[] (int i)
 
const float & operator[] (int i) const
 
int operator== (const RtFloat2 &rhs) const
 
int operator!= (const RtFloat2 &rhs) const
 
bool operator< (const RtFloat2 &rhs) const
 
RtFloat2 operator+ (const RtFloat2 &rhs) const
 
RtFloat2operator+= (const RtFloat2 &rhs)
 
RtFloat2 operator- (const RtFloat2 &rhs) const
 
RtFloat2operator-= (const RtFloat2 &rhs)
 
RtFloat2 operator* (const RtFloat2 &rhs) const
 
RtFloat2operator*= (const RtFloat2 &rhs)
 
RtFloat2 operator/ (const RtFloat2 &rhs) const
 
RtFloat2operator/= (const RtFloat2 &rhs)
 
RtFloat2 operator- () const
 
RtFloat2 operator* (float rhs) const
 
RtFloat2operator*= (float rhs)
 
RtFloat2 operator/ (float rhs) const
 
RtFloat2operator/= (float rhs)
 
float LengthSq () const
 
float Length () const
 
bool IsUnitLength (float eps=0.005f) const
 
float Normalize (float eps=FLT_MIN)
 
RtFloat2 NormalizeCopy (const RtFloat2 &v) const
 
void Negate ()
 
float Dot (const RtFloat2 &v2) const
 
float AbsDot (const RtFloat2 &v2) const
 
float Cross (const RtFloat2 &v2) const
 
float ChannelAvg () const
 
float ChannelMin () const
 
float ChannelMax () const
 

Public Attributes

float x
 
float y
 

Friends

std::ostream & operator<< (std::ostream &o, const RtFloat2 &v)
 
RtFloat2 operator* (float lhs, const RtFloat2 &rhs)
 
float Normalize (RtFloat2 &v)
 
RtFloat2 NormalizeCopy (const RtFloat2 &v)
 
float Dot (const RtFloat2 &v1, const RtFloat2 &v2)
 
float AbsDot (const RtFloat2 &v1, const RtFloat2 &v2)
 
float Cross (const RtFloat2 &v1, const RtFloat2 &v2)
 

Constructor & Destructor Documentation

◆ RtFloat2() [1/4]

RtFloat2::RtFloat2 ( )
inlinedefault

◆ RtFloat2() [2/4]

RtFloat2::RtFloat2 ( float  xx,
float  yy 
)
inline

◆ RtFloat2() [3/4]

RtFloat2::RtFloat2 ( float  v)
inlineexplicit

◆ RtFloat2() [4/4]

RtFloat2::RtFloat2 ( const float *  d)
inlineexplicit

Member Function Documentation

◆ AbsDot()

float RtFloat2::AbsDot ( const RtFloat2 v2) const
inline

References Dot().

◆ ChannelAvg()

float RtFloat2::ChannelAvg ( ) const
inline

References x, and y.

◆ ChannelMax()

float RtFloat2::ChannelMax ( ) const
inline

References x, and y.

◆ ChannelMin()

float RtFloat2::ChannelMin ( ) const
inline

References x, and y.

◆ Cross()

float RtFloat2::Cross ( const RtFloat2 v2) const
inline

References x, and y.

◆ Dot()

float RtFloat2::Dot ( const RtFloat2 v2) const
inline

References x, and y.

Referenced by AbsDot().

◆ IsUnitLength()

bool RtFloat2::IsUnitLength ( float  eps = 0.005f) const
inline

References Length().

◆ Length()

float RtFloat2::Length ( ) const
inline

References LengthSq().

Referenced by IsUnitLength().

◆ LengthSq()

float RtFloat2::LengthSq ( ) const
inline

References x, and y.

Referenced by Length(), and Normalize().

◆ Negate()

void RtFloat2::Negate ( )
inline

References x, and y.

◆ Normalize()

float RtFloat2::Normalize ( float  eps = FLT_MIN)
inline

References LengthSq(), x, and y.

Referenced by NormalizeCopy().

◆ NormalizeCopy()

RtFloat2 RtFloat2::NormalizeCopy ( const RtFloat2 v) const
inline

References Normalize().

◆ operator!=()

int RtFloat2::operator!= ( const RtFloat2 rhs) const
inline

References x, and y.

◆ operator*() [1/2]

RtFloat2 RtFloat2::operator* ( const RtFloat2 rhs) const
inline

References RtFloat2(), x, and y.

Referenced by operator/().

◆ operator*() [2/2]

RtFloat2 RtFloat2::operator* ( float  rhs) const
inline

References RtFloat2(), x, and y.

◆ operator*=() [1/2]

RtFloat2& RtFloat2::operator*= ( const RtFloat2 rhs)
inline

References x, and y.

Referenced by operator/=().

◆ operator*=() [2/2]

RtFloat2& RtFloat2::operator*= ( float  rhs)
inline

References x, and y.

◆ operator+()

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

References RtFloat2(), x, and y.

◆ operator+=()

RtFloat2& RtFloat2::operator+= ( const RtFloat2 rhs)
inline

References x, and y.

◆ operator-() [1/2]

RtFloat2 RtFloat2::operator- ( const RtFloat2 rhs) const
inline

References RtFloat2(), x, and y.

◆ operator-() [2/2]

RtFloat2 RtFloat2::operator- ( ) const
inline

References RtFloat2(), x, and y.

◆ operator-=()

RtFloat2& RtFloat2::operator-= ( const RtFloat2 rhs)
inline

References x, and y.

◆ operator/() [1/2]

RtFloat2 RtFloat2::operator/ ( const RtFloat2 rhs) const
inline

References RtFloat2(), x, and y.

◆ operator/() [2/2]

RtFloat2 RtFloat2::operator/ ( float  rhs) const
inline

References operator*().

◆ operator/=() [1/2]

RtFloat2& RtFloat2::operator/= ( const RtFloat2 rhs)
inline

References x, and y.

◆ operator/=() [2/2]

RtFloat2& RtFloat2::operator/= ( float  rhs)
inline

References operator*=().

◆ operator<()

bool RtFloat2::operator< ( const RtFloat2 rhs) const
inline

References x, and y.

◆ operator==()

int RtFloat2::operator== ( const RtFloat2 rhs) const
inline

References x, and y.

◆ operator[]() [1/2]

float& RtFloat2::operator[] ( int  i)
inline

References x.

◆ operator[]() [2/2]

const float& RtFloat2::operator[] ( int  i) const
inline

References x.

Friends And Related Function Documentation

◆ AbsDot

float AbsDot ( const RtFloat2 v1,
const RtFloat2 v2 
)
friend

◆ Cross

float Cross ( const RtFloat2 v1,
const RtFloat2 v2 
)
friend

◆ Dot

float Dot ( const RtFloat2 v1,
const RtFloat2 v2 
)
friend

◆ Normalize

float Normalize ( RtFloat2 v)
friend

◆ NormalizeCopy

RtFloat2 NormalizeCopy ( const RtFloat2 v)
friend

◆ operator*

RtFloat2 operator* ( float  lhs,
const RtFloat2 rhs 
)
friend

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const RtFloat2 v 
)
friend

Member Data Documentation

◆ x

◆ y


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