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

#include <Vec2b.h>

Public Types

enum  { num_components = 2 }
 
typedef signed char value_type
 

Public Member Functions

 Vec2b ()
 
 Vec2b (value_type r, value_type g)
 
bool operator== (const Vec2b &v) const
 
bool operator!= (const Vec2b &v) const
 
bool operator< (const Vec2b &v) const
 
value_typeptr ()
 
const value_typeptr () const
 
void set (value_type x, value_type y)
 
void set (const Vec2b &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
 
Vec2b operator* (float rhs) const
 
Vec2boperator*= (float rhs)
 
Vec2b operator/ (float rhs) const
 
Vec2boperator/= (float rhs)
 
Vec2b operator+ (const Vec2b &rhs) const
 
Vec2boperator+= (const Vec2b &rhs)
 
Vec2b operator- (const Vec2b &rhs) const
 
Vec2boperator-= (const Vec2b &rhs)
 

Public Attributes

value_type _v [2]
 

Detailed Description

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

Definition at line 25 of file Vec2b.h.

Member Typedef Documentation

typedef signed char osg::Vec2b::value_type

Data type of vector components.

Definition at line 32 of file Vec2b.h.

Member Enumeration Documentation

anonymous enum

Number of vector components.

Enumerator
num_components 

Definition at line 35 of file Vec2b.h.

Constructor & Destructor Documentation

osg::Vec2b::Vec2b ( )
inline

Constructor that sets all components of the vector to zero

Definition at line 41 of file Vec2b.h.

Here is the caller graph for this function:

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

Definition at line 43 of file Vec2b.h.

Here is the call graph for this function:

Member Function Documentation

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

Definition at line 82 of file Vec2b.h.

Here is the caller graph for this function:

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

Definition at line 85 of file Vec2b.h.

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

Definition at line 50 of file Vec2b.h.

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

Multiply by scalar.

Definition at line 88 of file Vec2b.h.

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

Unary multiply by scalar.

Definition at line 96 of file Vec2b.h.

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

Binary vector add.

Definition at line 120 of file Vec2b.h.

Here is the call graph for this function:

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

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

Definition at line 128 of file Vec2b.h.

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

Binary vector subtract.

Definition at line 136 of file Vec2b.h.

Here is the call graph for this function:

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

Unary vector subtract.

Definition at line 142 of file Vec2b.h.

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

Divide by scalar.

Definition at line 104 of file Vec2b.h.

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

Unary divide by scalar.

Definition at line 112 of file Vec2b.h.

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

Definition at line 52 of file Vec2b.h.

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

Definition at line 48 of file Vec2b.h.

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

Definition at line 72 of file Vec2b.h.

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

Definition at line 73 of file Vec2b.h.

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

Definition at line 59 of file Vec2b.h.

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

Definition at line 60 of file Vec2b.h.

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

Definition at line 81 of file Vec2b.h.

Here is the caller graph for this function:

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

Definition at line 84 of file Vec2b.h.

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

Definition at line 62 of file Vec2b.h.

Here is the call graph for this function:

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

Definition at line 67 of file Vec2b.h.

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

Definition at line 75 of file Vec2b.h.

Here is the caller graph for this function:

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

Definition at line 78 of file Vec2b.h.

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

Definition at line 76 of file Vec2b.h.

Here is the caller graph for this function:

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

Definition at line 79 of file Vec2b.h.

Member Data Documentation

value_type osg::Vec2b::_v[2]

Vec member variable.

Definition at line 38 of file Vec2b.h.


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