Public Methods |
| | CL_Vector (float x=0.0, float y=0.0, float z=0.0, float w=1.0) |
| | CL_Vector (const CL_Vector &other) |
| float | norm () const |
| | param: other - vector to copy.
|
| void | normalize () |
| | retval: the euclid norm of the vector (in R^3).
|
| float | dot (const CL_Vector &v) const |
| float | angle (const CL_Vector &v) const |
| | param: v - other vector retval: the dot product of the two vectors.
|
| CL_Vector | cross (const CL_Vector &v) const |
| | param: v - other vector retval: the angle between the two vectors.
|
| CL_Vector | rotate (float angle, const CL_Vector &a) const |
| | param: v - other vector retval: the cross product of the two vectors.
|
| void | round () |
| | param: angle - angle to rotateparam: a - rotation axisretval: the rotated vector.
|
| CL_Vector | operator * (float s) |
| void | operator+= (const CL_Vector &v) |
| | retval: the scalar product.
|
| void | operator-= (const CL_Vector &v) |
| void | operator *= (float s) |
| CL_Vector | operator+ (const CL_Vector &v) |
| CL_Vector | operator- (const CL_Vector &v) |
| CL_Vector | operator- () |
| CL_Vector& | operator= (const CL_Vector &v) |
| int | operator== (const CL_Vector &v) const |
| int | operator!= (const CL_Vector &v) const |
| | param: v - other vectorretval: true if v equals the current vector, false otherwise.
|
| float& | operator[] (int n) |
| | param: v - other vectorretval: false if v equals the current vector, true otherwise.
|
Public Attributes |
| float | x |
| float | y |
| float | z |
| float | w |
Friends |
| CL_Vector | operator * (float s, const CL_Vector &v) |
| | retval: the scalar product.
|
| std::ostream& | operator<< (std::ostream &, CL_Vector &v) |
| | param: n - number of ordinate (starting with 0)retval: reference to the n-th ordinate.
|