proj home

Files   Classes   Functions   Hierarchy  

point.h File Reference

#include <cassert>
#include <vector>
#include <iostream>
#include <string>
#include <cmath>
#include <sstream>
#include <typedefs.h>

Include dependency graph for point.h:

Go to the source code of this file.

Classes

class  point2< T >
 2D point. More...
class  point3< T >
 3D point. More...
class  point4< T >
 4D point. More...

Functions

template<typename T >
ostreamoperator<< (ostream &os, point2< T > const &p)
 Write the point out to the output stream.
template<typename T >
istream & operator>> (istream &istr, point2< T > &p)
 Read in the point from the input stream.
template<typename T >
bool const operator> (point2< T > const &a, point2< T > const &p)
 Interpret p as a half space.
template<typename T >
ostreamoperator<< (ostream &os, point3< T > const &p)
template<typename T >
istream & operator>> (istream &istr, point3< T > &p)
template<typename T >
ostreamoperator<< (ostream &os, point4< T > const &p)
template<typename T >
istream & operator>> (istream &istr, point4< T > &p)


Function Documentation

template<typename T >
ostream& operator<< ( ostream os,
point4< T > const &  p 
) [inline]

Definition at line 541 of file point.h.

00542   { return p.print(os); }

template<typename T >
ostream& operator<< ( ostream os,
point3< T > const &  p 
) [inline]

Definition at line 420 of file point.h.

00421   { return p.print(os); }

template<typename T >
ostream& operator<< ( ostream os,
point2< T > const &  p 
) [inline]

Write the point out to the output stream.

Definition at line 201 of file point.h.

00202   { return p.print(os); }

template<typename T >
bool const operator> ( point2< T > const &  a,
point2< T > const &  p 
) [inline]

Interpret p as a half space.

If a is below the line return true else return false. Interpret p as a half space. If a is above the line return true else return false.

Definition at line 219 of file point.h.

References point2< T >::x, and point2< T >::y.

00220   { if (p.x==0) return false; return a.y > p.y/p.x*a.x; }

template<typename T >
istream& operator>> ( istream &  istr,
point4< T > &  p 
) [inline]

Definition at line 545 of file point.h.

References point4< T >::serializeInverse().

00546   { return p.serializeInverse(istr); }

template<typename T >
istream& operator>> ( istream &  istr,
point3< T > &  p 
) [inline]

Definition at line 424 of file point.h.

References point3< T >::serializeInverse().

00425   { return p.serializeInverse(istr); }

template<typename T >
istream& operator>> ( istream &  istr,
point2< T > &  p 
) [inline]

Read in the point from the input stream.

Definition at line 206 of file point.h.

References point2< T >::serializeInverse().

00207   { return p.serializeInverse(istr); }


Generated on Fri Mar 4 00:49:41 2011 for Chelton Evans Source by  doxygen 1.5.8