#include <point3d.h>
Public Member Functions | |
double | distance_to (const Point3D &other) |
void | normalize () |
Calculate the normalized vector from the origin to the destination. | |
Point3D (const Point3D &other) | |
Copy constructor. | |
Point3D (std::string str) | |
template<class _T> | |
Point3D (_T _x, _T _y, _T _z) | |
Creates a point in three dimenisional space. | |
template<class _T> | |
Point3D (_T _x, _T _y) | |
Creates a point on the XY plane. | |
Point3D () | |
Default constructor. Places point on the origin. | |
template<class _T> | |
void | set (_T x, _T y, _T z) |
Sets the coordinates of the point. | |
std::string | to_string () |
Public Attributes | |
double | x |
Distance from origin on the x axis. | |
double | y |
Distance from origin on the y axis. | |
double | z |
Distance from origin on the z axis. |
Definition at line 20 of file point3d.h.
Point3D::Point3D | ( | ) | [inline] |
Point3D::Point3D | ( | _T | _x, | |
_T | _y | |||
) | [inline] |
Point3D::Point3D | ( | _T | _x, | |
_T | _y, | |||
_T | _z | |||
) | [inline] |
Point3D::Point3D | ( | std::string | str | ) | [inline] |
Point3D::Point3D | ( | const Point3D & | other | ) | [inline] |
double Point3D::distance_to | ( | const Point3D & | other | ) | [inline] |
Returns the distance between this point and the other point. This is defined by the following function, copied from http://en.wikipedia.org/wiki/Distance#Geometry.
other | The other point to which we are determining the distance. |
Definition at line 102 of file point3d.h.
Referenced by ConcentricBumpMap::perturb_normal().
Here is the caller graph for this function:
void Point3D::normalize | ( | ) | [inline] |
void Point3D::set | ( | _T | x, | |
_T | y, | |||
_T | z | |||
) | [inline] |
std::string Point3D::to_string | ( | ) | [inline] |
double Point3D::x |
Distance from origin on the x axis.
Definition at line 24 of file point3d.h.
Referenced by CheckeredMaterial::choose_material(), cross_product(), distance_to(), dot_product(), Noise::get_noise(), Ray::normalize(), normalize(), operator *(), operator+(), operator-(), operator==(), RippleBumpMap::perturb_normal(), Point3D(), set(), Sphere::Sphere(), to_string(), and trace_rays().
double Point3D::y |
Distance from origin on the y axis.
Definition at line 26 of file point3d.h.
Referenced by CheckeredMaterial::choose_material(), cross_product(), distance_to(), dot_product(), Noise::get_noise(), Ray::normalize(), normalize(), operator *(), operator+(), operator-(), operator==(), RippleBumpMap::perturb_normal(), Point3D(), set(), Sphere::Sphere(), to_string(), and trace_rays().
double Point3D::z |
Distance from origin on the z axis.
Definition at line 28 of file point3d.h.
Referenced by CheckeredMaterial::choose_material(), cross_product(), distance_to(), dot_product(), Noise::get_noise(), Ray::normalize(), normalize(), operator *(), operator+(), operator-(), operator==(), RippleBumpMap::perturb_normal(), Point3D(), set(), Sphere::Sphere(), to_string(), and trace_rays().