#include <vector3d.h>
Public Member Functions | |
Vector3D (double x, double y, double z) | |
double | getX () |
double | getY () |
double | getZ () |
void | setX (double x) |
void | setY (double y) |
void | setZ (double z) |
Vector3D | operator+ (Vector3D rhsVector) |
Vector3D | operator- (Vector3D rhsVector) |
double | dot (Vector3D rhsVector) |
Vector3D | cross (Vector3D rhsVector) |
Vector3D | operator* (double scalar) |
double | distance (Vector3D &v2) |
Vector3D | midpoint (Vector3D &v2) |
Protected Attributes | |
double | x |
double | y |
double | z |
Friends | |
class | Matrix3x3 |
bool | operator== (const Vector3D &lhsVector, const Vector3D &rhsVector) |
Vector3D | operator* (double scalar, Vector3D v) |
std::ostream & | operator<< (std::ostream &os, Vector3D &v) |
3D vector representation of a vertex.
double Vector3D::distance | ( | Vector3D & | v2 | ) |
Return distance between two vertices
double Vector3D::dot | ( | Vector3D | rhsVector | ) |
Dot product (returns a single value)
Dot product
double Vector3D::getX | ( | ) |
Return X coordinate
double Vector3D::getY | ( | ) |
Return Y coordinate
double Vector3D::getZ | ( | ) |
Return Z coordinate
Vector3D Vector3D::operator* | ( | double | scalar | ) |
Scalar multiplication (Vector3D on left hand side)
Scalar multiplication - vector on lhs
void Vector3D::setX | ( | double | x | ) |
Set X coordinate
void Vector3D::setY | ( | double | y | ) |
Set Y coordinate
void Vector3D::setZ | ( | double | z | ) |
Set Z coordinate
Scalar multiplication (Vector3D on right hand side)
Scalar multiplication - vector on rhs
Equality operation
|
protected |
X coordinate
|
protected |
Y coordinate
|
protected |
Z coordinate