OpenSceneGraph  3.6.3
Public Types | Public Member Functions | Public Attributes | List of all members
osg::Vec2s Class Reference

Public Types

enum  { num_components = 2 }
 Number of vector components. More...
 
typedef short value_type
 Data type of vector components. More...
 

Public Member Functions

 Vec2s ()
 Constructor that sets all components of the vector to zero. More...
 
 Vec2s (value_type x, value_type y)
 
bool operator== (const Vec2s &v) const
 
bool operator != (const Vec2s &v) const
 
bool operator< (const Vec2s &v) const
 
value_typeptr ()
 
const value_typeptr () const
 
void set (value_type x, value_type y)
 
void set (const Vec2s &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
 
Vec2s operator * (value_type rhs) const
 
Vec2soperator *= (value_type rhs)
 
Vec2s operator/ (value_type rhs) const
 
Vec2soperator/= (value_type rhs)
 
Vec2s operator * (const Vec2s &rhs) const
 
Vec2s operator+ (const Vec2s &rhs) const
 
Vec2soperator+= (const Vec2s &rhs)
 
Vec2s operator - (const Vec2s &rhs) const
 
Vec2soperator -= (const Vec2s &rhs)
 
Vec2s operator - () const
 

Public Attributes

value_type _v [2]
 

Member Typedef Documentation

◆ value_type

typedef short osg::Vec2s::value_type

Data type of vector components.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Number of vector components.

Enumerator
num_components 

Constructor & Destructor Documentation

◆ Vec2s() [1/2]

osg::Vec2s::Vec2s ( )
inline

Constructor that sets all components of the vector to zero.

◆ Vec2s() [2/2]

osg::Vec2s::Vec2s ( value_type  x,
value_type  y 
)
inline

Member Function Documentation

◆ g() [1/2]

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

◆ g() [2/2]

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

◆ operator !=()

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

◆ operator *() [1/2]

Vec2s osg::Vec2s::operator * ( value_type  rhs) const
inline

◆ operator *() [2/2]

Vec2s osg::Vec2s::operator * ( const Vec2s rhs) const
inline

◆ operator *=()

Vec2s& osg::Vec2s::operator *= ( value_type  rhs)
inline

◆ operator -() [1/2]

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

◆ operator -() [2/2]

Vec2s osg::Vec2s::operator - ( ) const
inline

◆ operator -=()

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

◆ operator []() [1/2]

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

◆ operator []() [2/2]

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

◆ operator+()

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

◆ operator+=()

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

◆ operator/()

Vec2s osg::Vec2s::operator/ ( value_type  rhs) const
inline

◆ operator/=()

Vec2s& osg::Vec2s::operator/= ( value_type  rhs)
inline

◆ operator<()

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

◆ operator==()

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

◆ ptr() [1/2]

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

◆ ptr() [2/2]

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

◆ r() [1/2]

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

◆ r() [2/2]

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

◆ set() [1/2]

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

◆ set() [2/2]

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

◆ x() [1/2]

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

◆ x() [2/2]

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

◆ y() [1/2]

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

◆ y() [2/2]

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

Member Data Documentation

◆ _v

value_type osg::Vec2s::_v[2]

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

osg logo
Generated at Sun May 19 2019 08:54:20 for the OpenSceneGraph by doxygen 1.8.15.