osg::UByte4 Class Reference

General purpose float quad. More...

List of all members.

Public Member Functions

 UByte4 ()
 UByte4 (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
bool operator== (const UByte4 &v) const
bool operator!= (const UByte4 &v) const
bool operator< (const UByte4 &v) const
unsigned char * ptr ()
const unsigned char * ptr () const
void set (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
unsigned char & operator[] (unsigned int i)
unsigned char operator[] (unsigned int i) const
unsigned char & r ()
unsigned char & g ()
unsigned char & b ()
unsigned char & a ()
unsigned char r () const
unsigned char g () const
unsigned char b () const
unsigned char a () const
UByte4 operator * (float rhs) const
 Multiply by scalar.
UByte4operator *= (float rhs)
 Unary multiply by scalar.
UByte4 operator/ (float rhs) const
 Divide by scalar.
UByte4operator/= (float rhs)
 Unary divide by scalar.
UByte4 operator+ (const UByte4 &rhs) const
 Binary vector add.
UByte4operator+= (const UByte4 &rhs)
 Unary vector add.
UByte4 operator- (const UByte4 &rhs) const
 Binary vector subtract.
UByte4operator-= (const UByte4 &rhs)
 Unary vector subtract.

Public Attributes

unsigned char _v [4]

Friends

std::ostream & operator<< (std::ostream &output, const UByte4 &vec)


Detailed Description

General purpose float quad.

Uses include representation of color coordinates. No support yet added for float * UByte4 - is it necessary? Need to define a non-member non-friend operator* etc. UByte4 * float is okay


Constructor & Destructor Documentation

osg::UByte4::UByte4  )  [inline]
 

osg::UByte4::UByte4 unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a
[inline]
 


Member Function Documentation

unsigned char osg::UByte4::a  )  const [inline]
 

unsigned char& osg::UByte4::a  )  [inline]
 

unsigned char osg::UByte4::b  )  const [inline]
 

unsigned char& osg::UByte4::b  )  [inline]
 

unsigned char osg::UByte4::g  )  const [inline]
 

unsigned char& osg::UByte4::g  )  [inline]
 

UByte4 osg::UByte4::operator * float  rhs  )  const [inline]
 

Multiply by scalar.

UByte4& osg::UByte4::operator *= float  rhs  )  [inline]
 

Unary multiply by scalar.

bool osg::UByte4::operator!= const UByte4 v  )  const [inline]
 

UByte4 osg::UByte4::operator+ const UByte4 rhs  )  const [inline]
 

Binary vector add.

UByte4& osg::UByte4::operator+= const UByte4 rhs  )  [inline]
 

Unary vector add.

Slightly more efficient because no temporary intermediate object.

UByte4 osg::UByte4::operator- const UByte4 rhs  )  const [inline]
 

Binary vector subtract.

UByte4& osg::UByte4::operator-= const UByte4 rhs  )  [inline]
 

Unary vector subtract.

UByte4 osg::UByte4::operator/ float  rhs  )  const [inline]
 

Divide by scalar.

UByte4& osg::UByte4::operator/= float  rhs  )  [inline]
 

Unary divide by scalar.

bool osg::UByte4::operator< const UByte4 v  )  const [inline]
 

bool osg::UByte4::operator== const UByte4 v  )  const [inline]
 

unsigned char osg::UByte4::operator[] unsigned int  i  )  const [inline]
 

unsigned char& osg::UByte4::operator[] unsigned int  i  )  [inline]
 

const unsigned char* osg::UByte4::ptr  )  const [inline]
 

unsigned char* osg::UByte4::ptr  )  [inline]
 

unsigned char osg::UByte4::r  )  const [inline]
 

unsigned char& osg::UByte4::r  )  [inline]
 

void osg::UByte4::set unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a
[inline]
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  output,
const UByte4 vec
[friend]
 


Member Data Documentation

unsigned char osg::UByte4::_v[4]
 


The documentation for this class was generated from the following file:
Generated at Sat Mar 18 08:55:49 2006 for the OpenSceneGraph by doxygen 1.4.6.