mt
 All Classes Files Functions Enumerations Groups Pages
Classes | Functions
vector3.h File Reference
#include <iostream>
#include <stdexcept>
#include <mt/util/assert/assert_template.h>
#include <mt/scalar.h>

Go to the source code of this file.

Classes

class  mt::Vector3
 Three-dimensional vector class. More...

Functions

Vector3 mt::operator+ (const Vector3 &v)
Vector3 mt::operator- (const Vector3 &v)
Vector3 mt::operator+ (const Vector3 &v1, const Vector3 &v2)
Vector3 mt::operator- (const Vector3 &v1, const Vector3 &v2)
Vector3 mt::operator* (const Vector3 &v1, const Vector3 &v2)
Vector3 mt::operator/ (const Vector3 &v1, const Vector3 &v2)
Vector3 mt::operator* (const Scalar &s, const Vector3 &v)
Vector3 mt::operator* (const Vector3 &v, const Scalar &s)
Vector3 mt::operator/ (const Vector3 &v, const Scalar &s)
std::ostream & mt::operator<< (std::ostream &os, const Vector3 &v)
Scalar mt::length2 (const Vector3 &v)
 Squared vector length.
Scalar mt::length (const Vector3 &v)
 Vector length.
Vector3 mt::normalize (const Vector3 &v)
 Normalized vector.
Scalar mt::distance2 (const Vector3 &v1, const Vector3 &v2)
 Suqared distance between two vectors.
Scalar mt::distance (const Vector3 &v1, const Vector3 &v2)
 Distance between two vectors.
Scalar mt::angleCos (const Vector3 &v1, const Vector3 &v2)
 Cosine of the angle between vectors.
Scalar mt::angleSin (const Vector3 &v1, const Vector3 &v2)
 Sine of the angle between vectors.
Scalar mt::angle (const Vector3 &v1, const Vector3 &v2)
 Angle between vectors in the range [0, pi] expressed in radians.
Vector3 mt::abs (const Vector3 &v)
 Memberwise absolute value.
Scalar mt::dot (const Vector3 &v1, const Vector3 &v2)
 Dot product.
Vector3 mt::cross (const Vector3 &v1, const Vector3 &v2)
 Cross product.
Scalar mt::triple (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
 Triple product between vectors: dot(v1, cross(v2, v3)).
Vector3 mt::lerp (const Vector3 &v1, const Vector3 &v2, const Scalar &s)
 Linear inerpolation/extrapolation between input vectors.

Detailed Description