#include <vector3.h>
Inheritance diagram for Vector:

Public Methods | |
| Vector () | |
| Default constructor. | |
| Vector (const Vector &v) | |
| Copy constructor. | |
| Vector (const real x, const real y, const real z) | |
| Constructor. | |
| Vector (const float *v) | |
| Constructor. | |
| Vector (const double *v) | |
| Constructor. | |
| Vector (const std::string &str) | |
| Construct from string. | |
| real & | x () |
| x co-ordinate | |
| const real & | x () const |
| x co-ordinate | |
| real & | y () |
| y co-ordinate | |
| const real & | y () const |
| y co-ordinate | |
| real & | z () |
| z co-ordinate | |
| const real & | z () const |
| z co-ordinate | |
| real & | operator[] (const int i) |
| i'th co-ordinate | |
| const real & | operator[] (const int i) const |
| i'th co-ordinate | |
| operator real * () | |
| Access as array. | |
| bool | operator== (const Vector &v) const |
| Equality operator. | |
| bool | operator!= (const Vector &v) const |
| Inequality operator. | |
| bool | operator== (const real &a) const |
| Equality operator: x==a && y==a && z==a. | |
| bool | operator< (const Vector &c) const |
| less-than comparison | |
| bool | operator> (const Vector &c) const |
| greater-than comparison | |
| Vector & | operator= (const Vector &v) |
| Assignment operator. | |
| Vector & | operator= (const float *) |
| Assignment operator. | |
| Vector & | operator= (const double *) |
| Assignment operator. | |
| Vector & | operator+= (const Vector &v) |
| Addition. | |
| Vector & | operator-= (const Vector &v) |
| Subtraction. | |
| real | operator * (const Vector &v) const |
| Vector dot product (aka scalar product). | |
| Vector & | operator *= (const real &x) |
| Multiply. | |
| Vector & | operator *= (const Matrix &m) |
| Matrix Transformation. | |
| Vector | operator- () const |
| Negative. | |
| void | scale (const real &x) |
| Scale. | |
| void | scale (const Vector &x) |
| Scale. | |
| void | normalize () |
| Normalise the vector: |x| = 1.0. | |
| void | abs () |
| Make x, y and z positive. | |
| int | dominant () const |
| Find the dominant component: x, y or z. | |
| real | norm () const |
| Squared length of vector. | |
| real | dist (const Vector &x) const |
| Squared distance between vectors. | |
| real | length () const |
| Length of vector. | |
| bool | project (const Matrix &model, const Matrix &proj, const GltViewport &view) |
| Map object co-ordinates to window co-ordinates. | |
| Vector & | vmin (const Vector &v) |
| Replace with minimum x, y and z. | |
| Vector & | vmax (const Vector &v) |
| Replace with maximum x, y and z. | |
| void | glVertex () const |
| Draw OpenGL vertex. | |
| void | glNormal () const |
| Draw OpenGL normal. | |
| void | glColor () const |
| Draw OpenGL color. | |
| void | glTexCoord () const |
| Draw OpenGL texture co-ordinate. | |
| std::ostream & | writePov (std::ostream &os) const |
| Write vector in Povray format. | |
Protected Attributes | |
| real | _vector [3] |
| Storage for x, y and z components. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Vector &x) |
| Output vector to stream. | |
| std::istream & | operator>> (std::istream &is, Vector &x) |
| Input vector from stream. | |
| Vector | operator * (const Vector &v, const real x) |
| Vector scale. | |
| Vector | operator/ (const Vector &v, const real x) |
| Vector inverse scale. | |
| Vector | operator * (const real x, const Vector &v) |
| Vector scale. | |
| Vector | operator+ (const Vector &v1, const Vector &v2) |
| Vector addition. | |
| Vector | operator- (const Vector &v1, const Vector &v2) |
| Vector difference. | |
| Vector | xProduct (const Vector &v1, const Vector &v2) |
| Vector cross product. | |
| Vector | planeNormal (const Vector &v1, const Vector &v2, const Vector &v3) |
| Calculate normal from three points in plane. | |
| Vector | polar (const real lat, const real longitude) |
| Location on unit sphere. | |
| void | orthogonalSystem (Vector &a, Vector &b, Vector &c) |
| Create orthogonal co-ordinate system, based on a. | |
Definition at line 50 of file vector3.h.
1.2.18