34 #ifndef ZENI_VECTOR3F_H
35 #define ZENI_VECTOR3F_H
46 ZENI_DLL
extern const float pi;
50 ZENI_DLL
extern const float sqrt_two;
60 inline explicit Vector3f(
const bool °enerate_ =
false);
61 inline Vector3f(
const float &i_,
const float &j_,
const float &k_,
const bool °enerate_ =
false);
62 inline Vector3f(
const Vector3f &rhs,
const bool °enerate_ =
false);
63 inline Vector3f(
const Point3f &rhs);
64 inline explicit Vector3f(
const Vector2f &rhs);
67 inline Vector3f
operator+(
const Vector3f &rhs)
const;
68 inline Vector3f operator-(
const Vector3f &rhs)
const;
69 inline Vector3f & operator+=(
const Vector3f &rhs);
70 inline Vector3f & operator-=(
const Vector3f &rhs);
73 inline float operator*(
const Vector3f &rhs)
const;
74 inline Vector3f operator%(
const Vector3f &rhs)
const;
75 inline Vector3f & operator%=(
const Vector3f &rhs);
78 inline Vector3f
operator*(
const float &rhs)
const;
79 inline Vector3f
operator/(
const float &rhs)
const;
80 inline Vector3f & operator*=(
const float &rhs);
81 inline Vector3f & operator/=(
const float &rhs);
82 inline Vector3f operator-()
const;
85 Vector3f & normalize();
87 inline float magnitude2()
const;
88 inline float magnitude()
const;
91 inline Vector3f get_i()
const;
92 inline Vector3f get_j()
const;
93 inline Vector3f get_k()
const;
94 inline Vector3f get_ij()
const;
95 inline Vector3f get_ik()
const;
96 inline Vector3f get_jk()
const;
97 inline Vector3f multiply_by(
const Vector3f &rhs)
const;
98 inline Vector3f divide_by(
const Vector3f &rhs)
const;
99 inline float angle_between(
const Vector3f &rhs)
const;
102 inline const float & operator[](
const int &
index)
const;
103 inline float & operator[](
const int &index);
108 void set_spherical(
const float &theta,
const float &phi,
const float &magnitude = 1);
GLint GLenum GLboolean normalized
const float sqrt_three
sqrt(3.0f)
TiXmlString operator+(const TiXmlString &a, const TiXmlString &b)
Quaternion operator/(const float &lhs, const Quaternion &rhs)
std::istream & unserialize(std::istream &is, Color &value)
std::ostream & serialize(std::ostream &os, const Color &value)
A 3D Point represented with floats.
const Vector3f vector_k(0, 0, 1)
k == Vector3f(0, 0, 1)
const float sqrt_two
sqrt(2.0f)
A Featureful 3-Space Vector Class.
const float pi
pi == 3.1415926...
Quaternion operator*(const float &lhs, const Quaternion &rhs)
const float pi_over_two
pi/23
EGLSurface EGLint void ** value
const Vector3f vector_i(1, 0, 0)
i == Vector3f(1, 0, 0)
const float three_pi_over_two
3*pi/2
const Vector3f vector_j(0, 1, 0)
j == Vector3f(0, 1, 0)
const float over_three
1/3