## class osg::UByte4

> General purpose float quad, uses include representation of colour coordinates.

### Public Fields

unsigned char _v[4]

### Public Methods

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

## Documentation

> General purpose float quad, uses include representation of colour 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

`UByte4()`

`UByte4(unsigned char r, unsigned char g, unsigned char b, unsigned char a)`

`unsigned char _v[4]`

`inline bool operator == (const UByte4& v) const`

`inline bool operator != (const UByte4& v) const`

`inline bool operator < (const UByte4& v) const`

`inline unsigned char* ptr()`

`inline const unsigned char* ptr() const`

`inline void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)`

`inline unsigned char& operator [] (unsigned int i)`

`inline unsigned char operator [] (unsigned int i) const`

`inline unsigned char& r()`

`inline unsigned char& g()`

`inline unsigned char& b()`

`inline unsigned char& a()`

`inline unsigned char r() const`

`inline unsigned char g() const`

`inline unsigned char b() const`

`inline unsigned char a() const`

`inline UByte4 operator * (float rhs) const`
  multiply by scalar

`inline UByte4& operator *= (float rhs)`
  unary multiply by scalar

`inline UByte4 operator / (float rhs) const`
  divide by scalar

`inline UByte4& operator /= (float rhs)`
  unary divide by scalar

`inline UByte4 operator + (const UByte4& rhs) const`
  binary vector add

`inline UByte4& operator += (const UByte4& rhs)`
  unary vector add. Slightly more efficient because no temporary intermediate object

`inline UByte4 operator - (const UByte4& rhs) const`
  binary vector subtract

`inline UByte4& operator -= (const UByte4& rhs)`
  unary vector subtract

This class has no child classes.

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

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.