class osg::Vec4f

General purpose float quad, uses include representation of colour coordinates.

Public Fields

[more]value_type _v[4]

Public Methods

[more] Vec4f()
[more] Vec4f(value_type x, value_type y, value_type z, value_type w)
[more] Vec4f(const Vec3f& v3, value_type w)
[more]inline bool operator == (const Vec4f& v) const
[more]inline bool operator != (const Vec4f& v) const
[more]inline bool operator < (const Vec4f& v) const
[more]inline value_type* ptr()
[more]inline const value_type* ptr() const
[more]inline void set( value_type x, value_type y, value_type z, value_type w)
[more]inline value_type& operator [] (unsigned int i)
[more]inline value_type operator [] (unsigned int i) const
[more]inline value_type& x()
[more]inline value_type& y()
[more]inline value_type& z()
[more]inline value_type& w()
[more]inline value_type x() const
[more]inline value_type y() const
[more]inline value_type z() const
[more]inline value_type w() const
[more]inline unsigned long asABGR() const
[more]inline unsigned long asRGBA() const
[more]inline bool valid() const
[more]inline bool isNaN() const
[more]inline value_type operator * (const Vec4f& rhs) const
dot product
[more]inline Vec4f operator * (value_type rhs) const
multiply by scalar
[more]inline Vec4f& operator *= (value_type rhs)
unary multiply by scalar
[more]inline Vec4f operator / (value_type rhs) const
divide by scalar
[more]inline Vec4f& operator /= (value_type rhs)
unary divide by scalar
[more]inline Vec4f operator + (const Vec4f& rhs) const
binary vector add
[more]inline Vec4f& operator += (const Vec4f& rhs)
unary vector add.
[more]inline Vec4f operator - (const Vec4f& rhs) const
binary vector subtract
[more]inline Vec4f& operator -= (const Vec4f& rhs)
unary vector subtract
[more]inline const Vec4f operator - () const
negation operator.
[more]inline value_type length() const
Length of the vector = sqrt( vec .
[more]inline value_type length2() const
Length squared of the vector = vec .
[more]inline value_type normalize()
normalize the vector so that it has length unity returns the previous length of the vector

Public

[more]typedef float value_type


Documentation

General purpose float quad, uses include representation of colour coordinates. No support yet added for float * Vec4f - is it necessary? Need to define a non-member non-friend operator* etc. Vec4f * float is okay
otypedef float value_type

ovalue_type _v[4]

o Vec4f()

o Vec4f(value_type x, value_type y, value_type z, value_type w)

o Vec4f(const Vec3f& v3, value_type w)

oinline bool operator == (const Vec4f& v) const

oinline bool operator != (const Vec4f& v) const

oinline bool operator < (const Vec4f& v) const

oinline value_type* ptr()

oinline const value_type* ptr() const

oinline void set( value_type x, value_type y, value_type z, value_type w)

oinline value_type& operator [] (unsigned int i)

oinline value_type operator [] (unsigned int i) const

oinline value_type& x()

oinline value_type& y()

oinline value_type& z()

oinline value_type& w()

oinline value_type x() const

oinline value_type y() const

oinline value_type z() const

oinline value_type w() const

oinline unsigned long asABGR() const

oinline unsigned long asRGBA() const

oinline bool valid() const

oinline bool isNaN() const

oinline value_type operator * (const Vec4f& rhs) const
dot product

oinline Vec4f operator * (value_type rhs) const
multiply by scalar

oinline Vec4f& operator *= (value_type rhs)
unary multiply by scalar

oinline Vec4f operator / (value_type rhs) const
divide by scalar

oinline Vec4f& operator /= (value_type rhs)
unary divide by scalar

oinline Vec4f operator + (const Vec4f& rhs) const
binary vector add

oinline Vec4f& operator += (const Vec4f& rhs)
unary vector add. Slightly more efficient because no temporary intermediate object

oinline Vec4f operator - (const Vec4f& rhs) const
binary vector subtract

oinline Vec4f& operator -= (const Vec4f& rhs)
unary vector subtract

oinline const Vec4f operator - () const
negation operator. Returns the negative of the Vec4f

oinline value_type length() const
Length of the vector = sqrt( vec . vec )

oinline value_type length2() const
Length squared of the vector = vec . vec

oinline value_type normalize()
normalize the vector so that it has length unity returns the previous length of the vector


This class has no child classes.
Friends:
inline std::ostream& operator << (std::ostream& output, const Vec4f& vec)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.