Point.h File Reference

#include <common/math/Vector.h>
#include <ostream>
#include <limits>
#include "common/math/Point.inl"

Go to the source code of this file.

Classes

class  Point< N, T >
 A Point is templated to store N elements of data of type T. If left off, T will default to a "real_t" data type. More...

Defines

#define POINT_NO_ELEMENTS   (N)
#define POINT_SIZE   (sizeof(T) * POINT_NO_ELEMENTS)

Typedefs

typedef Point< 4 > Point3
 Homogeneous point in 3-space (contains a 4th "w" coordinate).
typedef Point< 3 > Point2
 Homogeneous point in 2-space (contains a 3rd "w" coordinate).

Functions

Extra operators where Point is on right-hand side
template<unsigned N, typename T>
Point< N, T > operator* (const T &scale, const Point< N, T > &rhs)
template<unsigned N, typename T>
Point< N, T > operator- (const Point< N, T > &rhs)
template<unsigned N, typename T>
std::ostream & operator<< (std::ostream &os, const Point< N, T > &v)
 Prints a Point to an output stream.
Routines with point-specific functionality
void homogenize (Point3 &p)
 Homogenizes the point passed in such that the 4th value ("w") is one.


Define Documentation

#define POINT_NO_ELEMENTS   (N)

Definition at line 17 of file Point.h.

#define POINT_SIZE   (sizeof(T) * POINT_NO_ELEMENTS)

Definition at line 18 of file Point.h.


Typedef Documentation

typedef Point<3> Point2

Homogeneous point in 2-space (contains a 3rd "w" coordinate).

Note:
Point2 contains 3 real_ts

Definition at line 205 of file Point.h.

typedef Point<4> Point3

Homogeneous point in 3-space (contains a 4th "w" coordinate).

Note:
Point3 contains 4 real_ts

Definition at line 201 of file Point.h.


Function Documentation

void homogenize ( Point3 p  ) 

Homogenizes the point passed in such that the 4th value ("w") is one.

template<unsigned N, typename T>
Point<N, T> operator* ( const T &  scale,
const Point< N, T > &  rhs 
) [inline]

Returns:
the N-length vector resulting from multiplying a scalar by an N-length point

Definition at line 283 of file Point.inl.

template<unsigned N, typename T>
Point<N, T> operator- ( const Point< N, T > &  rhs  )  [inline]

Returns:
(-1) * rhs, which is a negated version of the original right hand side point

Definition at line 292 of file Point.inl.

template<unsigned N, typename T>
std::ostream& operator<< ( std::ostream &  os,
const Point< N, T > &  v 
) [inline]

Prints a Point to an output stream.

Definition at line 299 of file Point.inl.


Generated on 28 Feb 2009 for Milton by doxygen 1.5.6