General purpose double pair, uses include representation of texture coordinates.
Public Fields
-
value_type _v[2]
Public Methods
-
Vec2d()
-
Vec2d(value_type x, value_type y)
-
inline Vec2d(const Vec2f& vec)
-
inline operator Vec2f() const
-
inline bool operator == (const Vec2d& v) const
-
inline bool operator != (const Vec2d& v) const
-
inline bool operator < (const Vec2d& v) const
-
inline value_type* ptr()
-
inline const value_type* ptr() const
-
inline void set( value_type x, value_type y )
-
inline value_type& operator [] (int i)
-
inline value_type operator [] (int i) const
-
inline value_type& x()
-
inline value_type& y()
-
inline value_type x() const
-
inline value_type y() const
-
inline bool valid() const
-
inline bool isNaN() const
-
inline value_type operator * (const Vec2d& rhs) const
- dot product
-
inline const Vec2d operator * (value_type rhs) const
- multiply by scalar
-
inline Vec2d& operator *= (value_type rhs)
- unary multiply by scalar
-
inline const Vec2d operator / (value_type rhs) const
- divide by scalar
-
inline Vec2d& operator /= (value_type rhs)
- unary divide by scalar
-
inline const Vec2d operator + (const Vec2d& rhs) const
- binary vector add
-
inline Vec2d& operator += (const Vec2d& rhs)
- unary vector add.
-
inline const Vec2d operator - (const Vec2d& rhs) const
- binary vector subtract
-
inline Vec2d& operator -= (const Vec2d& rhs)
- unary vector subtract
-
inline const Vec2d operator - () const
- negation operator.
-
inline value_type length() const
- Length of the vector = sqrt( vec .
-
inline value_type length2( void ) 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 double value_type
Documentation
General purpose double pair, uses include representation of
texture coordinates.
No support yet added for double * Vec2d - is it necessary?
Need to define a non-member non-friend operator* etc.
BTW: Vec2d * double is okay
- typedef double value_type
- value_type _v[2]
- Vec2d()
- Vec2d(value_type x, value_type y)
- inline Vec2d(const Vec2f& vec)
- inline operator Vec2f() const
- inline bool operator == (const Vec2d& v) const
- inline bool operator != (const Vec2d& v) const
- inline bool operator < (const Vec2d& v) const
- inline value_type* ptr()
- inline const value_type* ptr() const
- inline void set( value_type x, value_type y )
- inline value_type& operator [] (int i)
- inline value_type operator [] (int i) const
- inline value_type& x()
- inline value_type& y()
- inline value_type x() const
- inline value_type y() const
- inline bool valid() const
- inline bool isNaN() const
- inline value_type operator * (const Vec2d& rhs) const
- dot product
- inline const Vec2d operator * (value_type rhs) const
- multiply by scalar
- inline Vec2d& operator *= (value_type rhs)
- unary multiply by scalar
- inline const Vec2d operator / (value_type rhs) const
- divide by scalar
- inline Vec2d& operator /= (value_type rhs)
- unary divide by scalar
- inline const Vec2d operator + (const Vec2d& rhs) const
- binary vector add
- inline Vec2d& operator += (const Vec2d& rhs)
- unary vector add. Slightly more efficient because no temporary
intermediate object.
- inline const Vec2d operator - (const Vec2d& rhs) const
- binary vector subtract
- inline Vec2d& operator -= (const Vec2d& rhs)
- unary vector subtract
- inline const Vec2d operator - () const
- negation operator. Returns the negative of the Vec2d
- inline value_type length() const
- Length of the vector = sqrt( vec . vec )
- inline value_type length2( void ) 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 Vec2d& vec)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.