#include <vector.hh>
Inheritance diagram for anoid::simple::Vector:


Public Methods | |
| Vector (double getx=0, double gety=0, double getz=0) | |
| Vector (std::string &s) | |
| Vector (char *s) | |
| double | getNorm () const |
| void | setNorm (double newnorm) |
| void | scale (const Vector &v) |
| Vector | operator= (const Vector &a) |
Private Methods | |
| void | init (const char *s) |
Friends | |
| Vector | operator+ (const Vector &a, const Vector &b) |
| Vector | operator+= (Vector &a, const Vector &b) |
| Vector | operator- (const Vector &a, const Vector &b) |
| Vector | operator * (const double c, const Vector &a) |
| Vector | operator * (const Vector &a, const double c) |
| Vector | operator * (const double *d, const Vector &a) |
| Vector | operator * (const Vector &a, const double *d) |
| double | operator * (const Vector &a, const Vector &b) |
| Vector | operator% (const Vector &a, const Vector &b) |
| std::ostream & | operator<< (std::ostream &s, const Vector &a) |
Definition at line 15 of file vector.hh.
|
||||||||||||||||
|
Constructor Creates a 3 dimentional vector
Definition at line 19 of file vector.cc. Referenced by Vertex::Vertex(). |
|
|
Definition at line 22 of file vector.cc. References init(). |
|
|
Definition at line 26 of file vector.cc. References init(). |
|
|
getNorm gives the norm of the vector
Definition at line 30 of file vector.cc. Referenced by setNorm(). |
|
|
Definition at line 12 of file vector.cc. References anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z. Referenced by Vector(). |
|
|
operator= copy one vector to another
Definition at line 58 of file vector.cc. References anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z. |
|
|
scale scale this vector by the x, y, and z values obtained from v
Definition at line 41 of file vector.cc. References anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z. |
|
|
setNorm creates a vector with the same direction as the vector but with norm newnorm
Definition at line 34 of file vector.cc. References getNorm(), anoid::simple::Point::x, anoid::simple::Point::y, and anoid::simple::Point::z. |
|
||||||||||||
|
operator * calculates the dot-product between two vectors
|
|
||||||||||||
|
Multiply vector with a matrix from the right. The matrix is assumed to be a 4x4 matrix as a double[16] in column-major order (like for OpenGL). Only the upper left 3x3 part of the matrix is used.
|
|
||||||||||||
|
Multiply vector with a matrix from the left. The matrix is assumed to be a 4x4 matrix as a double[16] in column-major order (like for OpenGL). Only the upper left 3x3 part of the matrix is used.
|
|
||||||||||||
|
operator * calculates the vector where all coordinates have been multiplied by c from right
|
|
||||||||||||
|
operator * calculates the vector where all coordinates have been multiplied by c from left
|
|
||||||||||||
|
operator% calculates the cross product of two vectors
|
|
||||||||||||
|
operator+ adds two vectors
|
|
||||||||||||
|
operator+= adds two vectors, save value in first
|
|
||||||||||||
|
operator- substract two vectors
|
|
||||||||||||
|
operator<< prints the vector
|