osg::Vec4ub Class Reference

General purpose float quad. More...

List of all members.

Public Types

enum  { num_components = 4 }
 Number of vector components. More...
typedef unsigned char value_type
 Type of Vec class.

Public Member Functions

 Vec4ub ()
 Vec4ub (value_type x, value_type y, value_type z, value_type w)
bool operator== (const Vec4ub &v) const
bool operator!= (const Vec4ub &v) const
bool operator< (const Vec4ub &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
Vec4ub operator * (float rhs) const
 Multiply by scalar.
Vec4uboperator *= (float rhs)
 Unary multiply by scalar.
Vec4ub operator/ (float rhs) const
 Divide by scalar.
Vec4uboperator/= (float rhs)
 Unary divide by scalar.
Vec4ub operator+ (const Vec4ub &rhs) const
 Binary vector add.
Vec4uboperator+= (const Vec4ub &rhs)
 Unary vector add.
Vec4ub operator- (const Vec4ub &rhs) const
 Binary vector subtract.
Vec4uboperator-= (const Vec4ub &rhs)
 Unary vector subtract.

Public Attributes

value_type _v [4]
 Vec member varaible.


Detailed Description

General purpose float quad.

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


Member Typedef Documentation

typedef unsigned char osg::Vec4ub::value_type

Type of Vec class.


Member Enumeration Documentation

anonymous enum

Number of vector components.

Enumerator:
num_components 


Constructor & Destructor Documentation

osg::Vec4ub::Vec4ub (  )  [inline]

osg::Vec4ub::Vec4ub ( value_type  x,
value_type  y,
value_type  z,
value_type  w 
) [inline]


Member Function Documentation

bool osg::Vec4ub::operator== ( const Vec4ub v  )  const [inline]

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

bool osg::Vec4ub::operator< ( const Vec4ub v  )  const [inline]

unsigned char* osg::Vec4ub::ptr (  )  [inline]

const unsigned char* osg::Vec4ub::ptr (  )  const [inline]

void osg::Vec4ub::set ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
) [inline]

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

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

unsigned char& osg::Vec4ub::r (  )  [inline]

unsigned char& osg::Vec4ub::g (  )  [inline]

unsigned char& osg::Vec4ub::b (  )  [inline]

unsigned char& osg::Vec4ub::a (  )  [inline]

unsigned char osg::Vec4ub::r (  )  const [inline]

unsigned char osg::Vec4ub::g (  )  const [inline]

unsigned char osg::Vec4ub::b (  )  const [inline]

unsigned char osg::Vec4ub::a (  )  const [inline]

Vec4ub osg::Vec4ub::operator * ( float  rhs  )  const [inline]

Multiply by scalar.

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

Unary multiply by scalar.

Vec4ub osg::Vec4ub::operator/ ( float  rhs  )  const [inline]

Divide by scalar.

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

Unary divide by scalar.

Vec4ub osg::Vec4ub::operator+ ( const Vec4ub rhs  )  const [inline]

Binary vector add.

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

Unary vector add.

Slightly more efficient because no temporary intermediate object.

Vec4ub osg::Vec4ub::operator- ( const Vec4ub rhs  )  const [inline]

Binary vector subtract.

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

Unary vector subtract.


Member Data Documentation

value_type osg::Vec4ub::_v[4]

Vec member varaible.


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:19 2007 for the OpenSceneGraph by doxygen 1.5.3.