openscenegraph
|
General purpose float pair. Uses include representation of texture coordinates. No support yet added for float * Vec2f - is it necessary? Need to define a non-member non-friend operator* etc. BTW: Vec2f * float is okay
typedef float osg::Vec2f::value_type |
Data type of vector components.
osg::Vec2f::Vec2f | ( | ) | [inline] |
Constructor that sets all components of the vector to zero
References _v.
Referenced by operator*(), operator+(), operator-(), and operator/().
osg::Vec2f::Vec2f | ( | value_type | x, |
value_type | y | ||
) | [inline] |
bool osg::Vec2f::isNaN | ( | ) | const [inline] |
value_type osg::Vec2f::length | ( | ) | const [inline] |
value_type osg::Vec2f::length2 | ( | void | ) | const [inline] |
Length squared of the vector = vec . vec
References _v.
value_type osg::Vec2f::normalize | ( | ) | [inline] |
value_type osg::Vec2f::operator* | ( | const Vec2f & | rhs | ) | const [inline] |
Dot product.
References _v.
const Vec2f osg::Vec2f::operator* | ( | value_type | rhs | ) | const [inline] |
Vec2f& osg::Vec2f::operator*= | ( | value_type | rhs | ) | [inline] |
Unary multiply by scalar.
References _v.
Unary vector add. Slightly more efficient because no temporary intermediate object.
References _v.
const Vec2f osg::Vec2f::operator- | ( | ) | const [inline] |
const Vec2f osg::Vec2f::operator/ | ( | value_type | rhs | ) | const [inline] |
Vec2f& osg::Vec2f::operator/= | ( | value_type | rhs | ) | [inline] |
Unary divide by scalar.
References _v.
value_type& osg::Vec2f::operator[] | ( | int | i | ) | [inline] |
References _v.
value_type osg::Vec2f::operator[] | ( | int | i | ) | const [inline] |
References _v.
value_type* osg::Vec2f::ptr | ( | ) | [inline] |
References _v.
const value_type* osg::Vec2f::ptr | ( | ) | const [inline] |
References _v.
void osg::Vec2f::set | ( | value_type | x, |
value_type | y | ||
) | [inline] |
bool osg::Vec2f::valid | ( | ) | const [inline] |
Returns true if all components have values that are not NaN.
References isNaN().
value_type& osg::Vec2f::x | ( | ) | [inline] |
References _v.
Referenced by osgWidget::Widget::addOrigin(), osgWidget::Widget::addSize(), osg::Image::getColor(), osgWidget::Widget::getImageColorAtXY(), osgParticle::Interpolator::interpolate(), osgWidget::Window::isPointerXYWithinVisible(), osgTerrain::ValidDataOperator::operator()(), set(), osgWidget::Widget::setMinimumSize(), osgWidget::Widget::setOrigin(), osgWidget::Window::setOrigin(), osgWidget::Widget::setSize(), osgWidget::Widget::setTexCoord(), osgWidget::Widget::setTexCoordRegion(), and Vec2f().
value_type osg::Vec2f::x | ( | ) | const [inline] |
References _v.
value_type& osg::Vec2f::y | ( | ) | [inline] |
References _v.
Referenced by osgWidget::Widget::addOrigin(), osgWidget::Widget::addSize(), osg::Image::getColor(), osgWidget::Widget::getImageColorAtXY(), osgParticle::Interpolator::interpolate(), osgWidget::Window::isPointerXYWithinVisible(), osgTerrain::ValidDataOperator::operator()(), set(), osgWidget::Widget::setMinimumSize(), osgWidget::Widget::setOrigin(), osgWidget::Window::setOrigin(), osgWidget::Widget::setSize(), osgWidget::Widget::setTexCoord(), osgWidget::Widget::setTexCoordRegion(), and Vec2f().
value_type osg::Vec2f::y | ( | ) | const [inline] |
References _v.
Vec member variable.
Referenced by isNaN(), length(), length2(), normalize(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), osg::operator<<(), operator==(), osg::operator>>(), operator[](), ptr(), set(), osg::Vec2d::Vec2d(), Vec2f(), x(), and y().