point3d.h File Reference

#include <cmath>
#include <sstream>
#include <algorithm>
#include "raytrace_defs.h"

Include dependency graph for point3d.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Point3D
 A three-dimensional point in space. More...

Typedefs

typedef Point3D Vector

Functions

Vector cross_product (const Vector &one, const Vector &two)
double dot_product (const Vector &A, const Vector &B)
 The dot product of two unit vectors provides the cosine of the angle between the two vectors.
bool iswhitespace (char c)
template<class _T>
Vector operator * (Vector &v, const _T n)
Vector operator * (const Vector &A, double factor)
bool operator!= (const Vector &A, const Vector &B)
Vector operator+ (const Vector &A, const Vector &B)
 Add the two vectors and return the new Vector.
Vector operator- (const Vector &A)
 Unary negation.
Vector operator- (const Vector &A, const Vector &B)
bool operator== (const Vector &A, const Vector &B)


Typedef Documentation

typedef Point3D Vector

Definition at line 9 of file point3d.h.


Function Documentation

Vector cross_product ( const Vector one,
const Vector two 
) [inline]

The cross product of two vectors is the normal vector to a plane defined by the two vectors

Definition at line 160 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

Referenced by Polygon::add_vertex(), Polygon::collides_with(), ImageMap::get_color(), and Plane::Plane().

Here is the caller graph for this function:

double dot_product ( const Vector A,
const Vector B 
) [inline]

The dot product of two unit vectors provides the cosine of the angle between the two vectors.

Definition at line 151 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

Referenced by Polygon::add_vertex(), Sphere::collides_with(), Polygon::collides_with(), Plane::collides_with(), ImageMap::get_color(), Renderable::get_color_contribution(), and Plane::Plane().

Here is the caller graph for this function:

bool iswhitespace ( char  c  )  [inline]

Definition at line 12 of file point3d.h.

Referenced by Point3D::Point3D().

Here is the caller graph for this function:

template<class _T>
Vector operator * ( Vector v,
const _T  n 
) [inline]

Definition at line 170 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

Vector operator * ( const Vector A,
double  factor 
) [inline]

Definition at line 133 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

bool operator!= ( const Vector A,
const Vector B 
) [inline]

Definition at line 144 of file point3d.h.

Vector operator+ ( const Vector A,
const Vector B 
) [inline]

Add the two vectors and return the new Vector.

Definition at line 128 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

Vector operator- ( const Vector A  )  [inline]

Unary negation.

Definition at line 121 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

Vector operator- ( const Vector A,
const Vector B 
) [inline]

Subtract the two vectors and return the new Vector.

Parameters:
A First vector
B Second vector
Returns:
result of operation

Definition at line 115 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.

bool operator== ( const Vector A,
const Vector B 
) [inline]

Definition at line 139 of file point3d.h.

References Point3D::x, Point3D::y, and Point3D::z.


Generated on Tue Oct 30 22:12:16 2007 for mbrt by  doxygen 1.5.2