osg::Vec4b Class Reference

`#include <Vec4b>`

## Public Types

enum | { num_components = 4 }
typedef signed char | value_type

## Public Member Functions

| Vec4b ()
| Vec4b (value_type x, value_type y, value_type z, value_type w)
bool | operator== (const Vec4b &v) const
bool | operator!= (const Vec4b &v) const
bool | operator< (const Vec4b &v) const
value_type * | ptr ()
const value_type * | ptr () const
void | set (value_type x, value_type y, value_type z, value_type w)
value_type & | operator[] (unsigned int i)
value_type | operator[] (unsigned int i) const
value_type & | x ()
value_type & | y ()
value_type & | z ()
value_type & | w ()
value_type | x () const
value_type | y () const
value_type | z () const
value_type | w () const
value_type & | r ()
value_type & | g ()
value_type & | b ()
value_type & | a ()
value_type | r () const
value_type | g () const
value_type | b () const
value_type | a () const
Vec4b | operator* (float rhs) const
Vec4b & | operator*= (float rhs)
Vec4b | operator/ (float rhs) const
Vec4b & | operator/= (float rhs)
Vec4b | operator+ (const Vec4b &rhs) const
Vec4b & | operator+= (const Vec4b &rhs)
Vec4b | operator- (const Vec4b &rhs) const
Vec4b & | operator-= (const Vec4b &rhs)

## Public Attributes

value_type | _v [4]

## Detailed Description

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

## Member Typedef Documentation

## value_type

typedef signed char osg::Vec4b::value_type

Data type of vector components.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Number of vector components.

Enumerator
num_components |

## Constructor & Destructor Documentation

## Vec4b() [1/2]

osg::Vec4b::Vec4b | ( |  | ) |

inline

Constructor that sets all components of the vector to zero

References _v.

Referenced by operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), and operator==().

## Vec4b() [2/2]

osg::Vec4b::Vec4b | ( | value_type | x,
|  | value_type | y,
|  | value_type | z,
|  | value_type | w )

inline

References _v, w(), x(), y(), and z().

## Member Function Documentation

## a() [1/2]

value_type & osg::Vec4b::a | ( |  | ) |

inline

References _v.

## a() [2/2]

value_type osg::Vec4b::a | ( |  | ) | const

inline

References _v.

## b() [1/2]

value_type & osg::Vec4b::b | ( |  | ) |

inline

References _v.

## b() [2/2]

value_type osg::Vec4b::b | ( |  | ) | const

inline

References _v.

## g() [1/2]

value_type & osg::Vec4b::g | ( |  | ) |

inline

References _v.

## g() [2/2]

value_type osg::Vec4b::g | ( |  | ) | const

inline

References _v.

## operator!=()

bool osg::Vec4b::operator!= | ( | const Vec4b & | v | ) | const

inline

References _v, and Vec4b().

## operator*()

Vec4b osg::Vec4b::operator* | ( | float | rhs | ) | const

inline

Multiply by scalar.

References Vec4b().

## operator*=()

Vec4b & osg::Vec4b::operator*= | ( | float | rhs | ) |

inline

Unary multiply by scalar.

References _v, and Vec4b().

## operator+()

Vec4b osg::Vec4b::operator+ | ( | const Vec4b & | rhs | ) | const

inline

Binary vector add.

References _v, and Vec4b().

## operator+=()

Vec4b & osg::Vec4b::operator+= | ( | const Vec4b & | rhs | ) |

inline

Unary vector add. Slightly more efficient because no temporary intermediate object.

References _v, and Vec4b().

## operator-()

Vec4b osg::Vec4b::operator- | ( | const Vec4b & | rhs | ) | const

inline

Binary vector subtract.

References _v, and Vec4b().

## operator-=()

Vec4b & osg::Vec4b::operator-= | ( | const Vec4b & | rhs | ) |

inline

Unary vector subtract.

References _v, and Vec4b().

## operator/()

Vec4b osg::Vec4b::operator/ | ( | float | rhs | ) | const

inline

Divide by scalar.

References Vec4b().

## operator/=()

Vec4b & osg::Vec4b::operator/= | ( | float | rhs | ) |

inline

Unary divide by scalar.

References Vec4b().

## operator<()

bool osg::Vec4b::operator< | ( | const Vec4b & | v | ) | const

inline

References _v, and Vec4b().

## operator==()

bool osg::Vec4b::operator== | ( | const Vec4b & | v | ) | const

inline

References _v, and Vec4b().

## operator[]() [1/2]

value_type & osg::Vec4b::operator[] | ( | unsigned int | i | ) |

inline

References _v.

## operator[]() [2/2]

value_type osg::Vec4b::operator[] | ( | unsigned int | i | ) | const

inline

References _v.

## ptr() [1/2]

value_type * osg::Vec4b::ptr | ( |  | ) |

inline

References _v.

## ptr() [2/2]

const value_type * osg::Vec4b::ptr | ( |  | ) | const

inline

References _v.

## r() [1/2]

value_type & osg::Vec4b::r | ( |  | ) |

inline

References _v.

## r() [2/2]

value_type osg::Vec4b::r | ( |  | ) | const

inline

References _v.

## set()

void osg::Vec4b::set | ( | value_type | x,
|  | value_type | y,
|  | value_type | z,
|  | value_type | w )

inline

References _v, w(), x(), y(), and z().

## w() [1/2]

value_type & osg::Vec4b::w | ( |  | ) |

inline

References _v.

Referenced by set(), and Vec4b().

## w() [2/2]

value_type osg::Vec4b::w | ( |  | ) | const

inline

References _v.

## x() [1/2]

value_type & osg::Vec4b::x | ( |  | ) |

inline

References _v.

Referenced by set(), and Vec4b().

## x() [2/2]

value_type osg::Vec4b::x | ( |  | ) | const

inline

References _v.

## y() [1/2]

value_type & osg::Vec4b::y | ( |  | ) |

inline

References _v.

Referenced by set(), and Vec4b().

## y() [2/2]

value_type osg::Vec4b::y | ( |  | ) | const

inline

References _v.

## z() [1/2]

value_type & osg::Vec4b::z | ( |  | ) |

inline

References _v.

Referenced by set(), and Vec4b().

## z() [2/2]

value_type osg::Vec4b::z | ( |  | ) | const

inline

References _v.

## Member Data Documentation

## _v

value_type osg::Vec4b::_v[4]

Referenced by a(), a(), b(), b(), g(), g(), operator!=(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<(), osg::operator<<(), operator==(), osg::operator>>(), operator[](), operator[](), ptr(), ptr(), r(), r(), set(), Vec4b(), Vec4b(), w(), w(), x(), x(), y(), y(), z(), and z().

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

- Vec4b