General purpose float quad, uses include representation of colour coordinates.
Public Fields
-
value_type _v[4]
Public Methods
-
Vec4f()
-
Vec4f(value_type x, value_type y, value_type z, value_type w)
-
Vec4f(const Vec3f& v3, value_type w)
-
inline bool operator == (const Vec4f& v) const
-
inline bool operator != (const Vec4f& v) const
-
inline bool operator < (const Vec4f& v) const
-
inline value_type* ptr()
-
inline const value_type* ptr() const
-
inline void set( value_type x, value_type y, value_type z, value_type w)
-
inline value_type& operator [] (unsigned int i)
-
inline value_type operator [] (unsigned int i) const
-
inline value_type& x()
-
inline value_type& y()
-
inline value_type& z()
-
inline value_type& w()
-
inline value_type x() const
-
inline value_type y() const
-
inline value_type z() const
-
inline value_type w() const
-
inline unsigned long asABGR() const
-
inline unsigned long asRGBA() const
-
inline bool valid() const
-
inline bool isNaN() const
-
inline value_type operator * (const Vec4f& rhs) const
- dot product
-
inline Vec4f operator * (value_type rhs) const
- multiply by scalar
-
inline Vec4f& operator *= (value_type rhs)
- unary multiply by scalar
-
inline Vec4f operator / (value_type rhs) const
- divide by scalar
-
inline Vec4f& operator /= (value_type rhs)
- unary divide by scalar
-
inline Vec4f operator + (const Vec4f& rhs) const
- binary vector add
-
inline Vec4f& operator += (const Vec4f& rhs)
- unary vector add.
-
inline Vec4f operator - (const Vec4f& rhs) const
- binary vector subtract
-
inline Vec4f& operator -= (const Vec4f& rhs)
- unary vector subtract
-
inline const Vec4f operator - () const
- negation operator.
-
inline value_type length() const
- Length of the vector = sqrt( vec .
-
inline value_type length2() const
- Length squared of the vector = vec .
-
inline value_type normalize()
- normalize the vector so that it has length unity returns the previous length of the vector
Public
-
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
- typedef float value_type
- value_type _v[4]
- Vec4f()
- Vec4f(value_type x, value_type y, value_type z, value_type w)
- Vec4f(const Vec3f& v3, value_type w)
- inline bool operator == (const Vec4f& v) const
- inline bool operator != (const Vec4f& v) const
- inline bool operator < (const Vec4f& v) const
- inline value_type* ptr()
- inline const value_type* ptr() const
- inline void set( value_type x, value_type y, value_type z, value_type w)
- inline value_type& operator [] (unsigned int i)
- inline value_type operator [] (unsigned int i) const
- inline value_type& x()
- inline value_type& y()
- inline value_type& z()
- inline value_type& w()
- inline value_type x() const
- inline value_type y() const
- inline value_type z() const
- inline value_type w() const
- inline unsigned long asABGR() const
- inline unsigned long asRGBA() const
- inline bool valid() const
- inline bool isNaN() const
- inline value_type operator * (const Vec4f& rhs) const
- dot product
- inline Vec4f operator * (value_type rhs) const
- multiply by scalar
- inline Vec4f& operator *= (value_type rhs)
- unary multiply by scalar
- inline Vec4f operator / (value_type rhs) const
- divide by scalar
- inline Vec4f& operator /= (value_type rhs)
- unary divide by scalar
- inline Vec4f operator + (const Vec4f& rhs) const
- binary vector add
- inline Vec4f& operator += (const Vec4f& rhs)
- unary vector add. Slightly more efficient because no temporary
intermediate object
- inline Vec4f operator - (const Vec4f& rhs) const
- binary vector subtract
- inline Vec4f& operator -= (const Vec4f& rhs)
- unary vector subtract
- inline const Vec4f operator - () const
- negation operator. Returns the negative of the Vec4f
- inline value_type length() const
- Length of the vector = sqrt( vec . vec )
- inline value_type length2() const
- Length squared of the vector = vec . vec
- inline 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++.