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::Vec2ub Class Reference

#include <Vec2ub.h>

Public Types

enum  { num_components = 2 }
 
typedef unsigned char value_type
 

Public Member Functions

 Vec2ub ()
 
 Vec2ub (value_type r, value_type g)
 
bool operator== (const Vec2ub &v) const
 
bool operator!= (const Vec2ub &v) const
 
bool operator< (const Vec2ub &v) const
 
value_typeptr ()
 
const value_typeptr () const
 
void set (value_type x, value_type y)
 
void set (const Vec2ub &rhs)
 
value_typeoperator[] (int i)
 
value_type operator[] (int i) const
 
value_typex ()
 
value_typey ()
 
value_type x () const
 
value_type y () const
 
value_typer ()
 
value_typeg ()
 
value_type r () const
 
value_type g () const
 
Vec2ub operator* (float rhs) const
 
Vec2uboperator*= (float rhs)
 
Vec2ub operator/ (float rhs) const
 
Vec2uboperator/= (float rhs)
 
Vec2ub operator+ (const Vec2ub &rhs) const
 
Vec2uboperator+= (const Vec2ub &rhs)
 
Vec2ub operator- (const Vec2ub &rhs) const
 
Vec2uboperator-= (const Vec2ub &rhs)
 

Public Attributes

value_type _v [2]
 

Detailed Description

General purpose unsigned byte pair.

Definition at line 21 of file Vec2ub.h.

Member Typedef Documentation

typedef unsigned char osg::Vec2ub::value_type

Data type of vector components.

Definition at line 26 of file Vec2ub.h.

Member Enumeration Documentation

anonymous enum

Number of vector components.

Enumerator
num_components 

Definition at line 29 of file Vec2ub.h.

Constructor & Destructor Documentation

osg::Vec2ub::Vec2ub ( )
inline

Constructor that sets all components of the vector to zero

Definition at line 35 of file Vec2ub.h.

Here is the caller graph for this function:

osg::Vec2ub::Vec2ub ( value_type  r,
value_type  g 
)
inline

Definition at line 37 of file Vec2ub.h.

Here is the call graph for this function:

Member Function Documentation

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

Definition at line 71 of file Vec2ub.h.

Here is the caller graph for this function:

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

Definition at line 74 of file Vec2ub.h.

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

Definition at line 40 of file Vec2ub.h.

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

Multiply by scalar.

Definition at line 77 of file Vec2ub.h.

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

Unary multiply by scalar.

Definition at line 85 of file Vec2ub.h.

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

Binary vector add.

Definition at line 109 of file Vec2ub.h.

Here is the call graph for this function:

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

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

Definition at line 117 of file Vec2ub.h.

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

Binary vector subtract.

Definition at line 125 of file Vec2ub.h.

Here is the call graph for this function:

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

Unary vector subtract.

Definition at line 131 of file Vec2ub.h.

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

Divide by scalar.

Definition at line 93 of file Vec2ub.h.

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

Unary divide by scalar.

Definition at line 101 of file Vec2ub.h.

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

Definition at line 41 of file Vec2ub.h.

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

Definition at line 39 of file Vec2ub.h.

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

Definition at line 61 of file Vec2ub.h.

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

Definition at line 62 of file Vec2ub.h.

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

Definition at line 48 of file Vec2ub.h.

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

Definition at line 49 of file Vec2ub.h.

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

Definition at line 70 of file Vec2ub.h.

Here is the caller graph for this function:

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

Definition at line 73 of file Vec2ub.h.

void osg::Vec2ub::set ( value_type  x,
value_type  y 
)
inline

Definition at line 51 of file Vec2ub.h.

Here is the call graph for this function:

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

Definition at line 56 of file Vec2ub.h.

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

Definition at line 64 of file Vec2ub.h.

Here is the caller graph for this function:

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

Definition at line 67 of file Vec2ub.h.

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

Definition at line 65 of file Vec2ub.h.

Here is the caller graph for this function:

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

Definition at line 68 of file Vec2ub.h.

Member Data Documentation

value_type osg::Vec2ub::_v[2]

Vec member variable.

Definition at line 32 of file Vec2ub.h.


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