General purpose double triple for use as vertices, vectors and normals.
Public Fields
-
value_type _v[3]
Public Methods
-
Vec3d()
-
inline Vec3d(const Vec3f& vec)
-
inline operator Vec3f() const
-
Vec3d(value_type x, value_type y, value_type z)
-
inline bool operator == (const Vec3d& v) const
-
inline bool operator != (const Vec3d& v) const
-
inline bool operator < (const Vec3d& v) const
-
inline value_type* ptr()
-
inline const value_type* ptr() const
-
inline void set( value_type x, value_type y, value_type z)
-
inline void set( const Vec3d& rhs)
-
inline value_type& operator [] (int i)
-
inline value_type operator [] (int i) const
-
inline value_type& x()
-
inline value_type& y()
-
inline value_type& z()
-
inline value_type x() const
-
inline value_type y() const
-
inline value_type z() const
-
inline bool valid() const
-
inline bool isNaN() const
-
inline value_type operator * (const Vec3d& rhs) const
- dot product
-
inline const Vec3d operator ^ (const Vec3d& rhs) const
- cross product
-
inline const Vec3d operator * (value_type rhs) const
- multiply by scalar
-
inline Vec3d& operator *= (value_type rhs)
- unary multiply by scalar
-
inline const Vec3d operator / (value_type rhs) const
- divide by scalar
-
inline Vec3d& operator /= (value_type rhs)
- unary divide by scalar
-
inline const Vec3d operator + (const Vec3d& rhs) const
- binary vector add
-
inline Vec3d& operator += (const Vec3d& rhs)
- unary vector add.
-
inline const Vec3d operator - (const Vec3d& rhs) const
- binary vector subtract
-
inline Vec3d& operator -= (const Vec3d& rhs)
- unary vector subtract
-
inline const Vec3d 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 double value_type
Documentation
General purpose double triple for use as vertices, vectors and normals.
Provides general maths operations from addition through to cross products.
No support yet added for double * Vec3d - is it necessary?
Need to define a non-member non-friend operator* etc.
Vec3d * double is okay
- typedef double value_type
- value_type _v[3]
- Vec3d()
- inline Vec3d(const Vec3f& vec)
- inline operator Vec3f() const
- Vec3d(value_type x, value_type y, value_type z)
- inline bool operator == (const Vec3d& v) const
- inline bool operator != (const Vec3d& v) const
- inline bool operator < (const Vec3d& v) const
- inline value_type* ptr()
- inline const value_type* ptr() const
- inline void set( value_type x, value_type y, value_type z)
- inline void set( const Vec3d& rhs)
- inline value_type& operator [] (int i)
- inline value_type operator [] (int i) const
- inline value_type& x()
- inline value_type& y()
- inline value_type& z()
- inline value_type x() const
- inline value_type y() const
- inline value_type z() const
- inline bool valid() const
- inline bool isNaN() const
- inline value_type operator * (const Vec3d& rhs) const
- dot product
- inline const Vec3d operator ^ (const Vec3d& rhs) const
- cross product
- inline const Vec3d operator * (value_type rhs) const
- multiply by scalar
- inline Vec3d& operator *= (value_type rhs)
- unary multiply by scalar
- inline const Vec3d operator / (value_type rhs) const
- divide by scalar
- inline Vec3d& operator /= (value_type rhs)
- unary divide by scalar
- inline const Vec3d operator + (const Vec3d& rhs) const
- binary vector add
- inline Vec3d& operator += (const Vec3d& rhs)
- unary vector add. Slightly more efficient because no temporary
intermediate object
- inline const Vec3d operator - (const Vec3d& rhs) const
- binary vector subtract
- inline Vec3d& operator -= (const Vec3d& rhs)
- unary vector subtract
- inline const Vec3d operator - () const
- negation operator. Returns the negative of the Vec3d
- 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 Vec3d& vec)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.