OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
osg::Vec3b Class Reference

#include <Vec3b.h>

Public Types

enum  { num_components = 3 }
 
typedef signed char value_type
 

Public Member Functions

 Vec3b ()
 
 Vec3b (value_type r, value_type g, value_type b)
 
bool operator== (const Vec3b &v) const
 
bool operator!= (const Vec3b &v) const
 
bool operator< (const Vec3b &v) const
 
value_typeptr ()
 
const value_typeptr () const
 
void set (value_type r, value_type g, value_type b)
 
void set (const Vec3b &rhs)
 
value_typeoperator[] (unsigned int i)
 
value_type operator[] (unsigned int i) const
 
value_typex ()
 
value_typey ()
 
value_typez ()
 
value_type x () const
 
value_type y () const
 
value_type z () const
 
value_typer ()
 
value_typeg ()
 
value_typeb ()
 
value_type r () const
 
value_type g () const
 
value_type b () const
 
Vec3b operator* (float rhs) const
 
Vec3boperator*= (float rhs)
 
Vec3b operator/ (float rhs) const
 
Vec3boperator/= (float rhs)
 
Vec3b operator+ (const Vec3b &rhs) const
 
Vec3boperator+= (const Vec3b &rhs)
 
Vec3b operator- (const Vec3b &rhs) const
 
Vec3boperator-= (const Vec3b &rhs)
 

Public Attributes

value_type _v [3]
 

Detailed Description

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

Definition at line 25 of file Vec3b.h.

Member Typedef Documentation

typedef signed char osg::Vec3b::value_type

Data type of vector components.

Definition at line 30 of file Vec3b.h.

Member Enumeration Documentation

anonymous enum

Number of vector components.

Enumerator
num_components 

Definition at line 33 of file Vec3b.h.

Constructor & Destructor Documentation

osg::Vec3b::Vec3b ( )
inline

Constructor that sets all components of the vector to zero

Definition at line 38 of file Vec3b.h.

Here is the caller graph for this function:

osg::Vec3b::Vec3b ( value_type  r,
value_type  g,
value_type  b 
)
inline

Definition at line 40 of file Vec3b.h.

Here is the call graph for this function:

Member Function Documentation

value_type& osg::Vec3b::b ( )
inline

Definition at line 81 of file Vec3b.h.

Here is the caller graph for this function:

value_type osg::Vec3b::b ( ) const
inline

Definition at line 85 of file Vec3b.h.

value_type& osg::Vec3b::g ( )
inline

Definition at line 80 of file Vec3b.h.

Here is the caller graph for this function:

value_type osg::Vec3b::g ( ) const
inline

Definition at line 84 of file Vec3b.h.

bool osg::Vec3b::operator!= ( const Vec3b v) const
inline

Definition at line 44 of file Vec3b.h.

Vec3b osg::Vec3b::operator* ( float  rhs) const
inline

Multiply by scalar.

Definition at line 88 of file Vec3b.h.

Vec3b& osg::Vec3b::operator*= ( float  rhs)
inline

Unary multiply by scalar.

Definition at line 96 of file Vec3b.h.

Vec3b osg::Vec3b::operator+ ( const Vec3b rhs) const
inline

Binary vector add.

Definition at line 121 of file Vec3b.h.

Here is the call graph for this function:

Vec3b& osg::Vec3b::operator+= ( const Vec3b rhs)
inline

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

Definition at line 130 of file Vec3b.h.

Vec3b osg::Vec3b::operator- ( const Vec3b rhs) const
inline

Binary vector subtract.

Definition at line 139 of file Vec3b.h.

Here is the call graph for this function:

Vec3b& osg::Vec3b::operator-= ( const Vec3b rhs)
inline

Unary vector subtract.

Definition at line 146 of file Vec3b.h.

Vec3b osg::Vec3b::operator/ ( float  rhs) const
inline

Divide by scalar.

Definition at line 105 of file Vec3b.h.

Vec3b& osg::Vec3b::operator/= ( float  rhs)
inline

Unary divide by scalar.

Definition at line 113 of file Vec3b.h.

bool osg::Vec3b::operator< ( const Vec3b v) const
inline

Definition at line 46 of file Vec3b.h.

bool osg::Vec3b::operator== ( const Vec3b v) const
inline

Definition at line 42 of file Vec3b.h.

value_type& osg::Vec3b::operator[] ( unsigned int  i)
inline

Definition at line 68 of file Vec3b.h.

value_type osg::Vec3b::operator[] ( unsigned int  i) const
inline

Definition at line 69 of file Vec3b.h.

value_type* osg::Vec3b::ptr ( )
inline

Definition at line 55 of file Vec3b.h.

const value_type* osg::Vec3b::ptr ( ) const
inline

Definition at line 56 of file Vec3b.h.

value_type& osg::Vec3b::r ( )
inline

Definition at line 79 of file Vec3b.h.

Here is the caller graph for this function:

value_type osg::Vec3b::r ( ) const
inline

Definition at line 83 of file Vec3b.h.

void osg::Vec3b::set ( value_type  r,
value_type  g,
value_type  b 
)
inline

Definition at line 58 of file Vec3b.h.

Here is the call graph for this function:

void osg::Vec3b::set ( const Vec3b rhs)
inline

Definition at line 63 of file Vec3b.h.

value_type& osg::Vec3b::x ( )
inline

Definition at line 71 of file Vec3b.h.

value_type osg::Vec3b::x ( ) const
inline

Definition at line 75 of file Vec3b.h.

value_type& osg::Vec3b::y ( )
inline

Definition at line 72 of file Vec3b.h.

value_type osg::Vec3b::y ( ) const
inline

Definition at line 76 of file Vec3b.h.

value_type& osg::Vec3b::z ( )
inline

Definition at line 73 of file Vec3b.h.

value_type osg::Vec3b::z ( ) const
inline

Definition at line 77 of file Vec3b.h.

Member Data Documentation

value_type osg::Vec3b::_v[3]

Definition at line 35 of file Vec3b.h.


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