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. | |
| UByte4 & | operator *= (float rhs) |
| Unary multiply by scalar. | |
| UByte4 | operator/ (float rhs) const |
| Divide by scalar. | |
| UByte4 & | operator/= (float rhs) |
| Unary divide by scalar. | |
| UByte4 | operator+ (const UByte4 &rhs) const |
| Binary vector add. | |
| UByte4 & | operator+= (const UByte4 &rhs) |
| Unary vector add. | |
| UByte4 | operator- (const UByte4 &rhs) const |
| Binary vector subtract. | |
| UByte4 & | operator-= (const UByte4 &rhs) |
| Unary vector subtract. | |
Public Attributes | |
| unsigned char | _v [4] |
Friends | |
| std::ostream & | operator<< (std::ostream &output, const UByte4 &vec) |
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
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Multiply by scalar.
|
|
|
Unary multiply by scalar.
|
|
|
|
|
|
Binary vector add.
|
|
|
Unary vector add. Slightly more efficient because no temporary intermediate object. |
|
|
Binary vector subtract.
|
|
|
Unary vector subtract.
|
|
|
Divide by scalar.
|
|
|
Unary divide by scalar.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|