General purpose float triple for use as vertices, vectors and normals.
General purpose float triple for use as vertices, vectors and normals. Provides general maths operations from addition through to cross products. No support yet added for float * Vec3 - is it necessary? Need to define a non-member non-friend operator* etc. Vec3 * float is okay
Vec3(float x, float y, float z)
float _v[3]
bool operator == (const Vec3& v) const
inline float* ptr()
inline const float* ptr() const
inline void set( float x, float y, float z)
inline float& operator [] (int i)
inline float operator [] (int i) const
inline float& x()
inline float& y()
inline float& z()
inline float x() const
inline float y() const
inline float z() const
inline float operator * (const Vec3& rhs) const
inline Vec3 operator ^ (const Vec3& rhs) const
inline Vec3 operator * (const float& rhs) const
inline Vec3& operator *= (const float& rhs)
inline Vec3 operator / (const float& rhs) const
inline Vec3& operator /= (const float& rhs)
inline Vec3 operator + (const Vec3& rhs) const
inline Vec3& operator += (const Vec3& rhs)
inline Vec3 operator - (const Vec3& rhs) const
inline Vec3& operator -= (const Vec3& rhs)
inline Vec3 operator - () const
inline float length( void ) const
inline float length2( void ) const
inline float normalize()
inline friend ostream& operator << (ostream& output, const Vec3& vec)
Alphabetic index HTML hierarchy of classes or Java