Go to Overview over all GrAL packages.
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Geometry/coords.h File Reference

#include <iostream.h>
#include "Geometry/point-traits.h"
#include "Geometry/coords_2_special.h"
#include "Geometry/coords_3_special.h"
#include "Geometry/algebraic-primitives.h"

Include dependency graph for coords.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Compounds

class  coordN
struct  point_traits_for_coordN
struct  point_traits_for_coordN_2
struct  point_traits< coordN< N > >
struct  point_traits< coordN< 2 > >

Typedefs

typedef double coord_N_component
 A general class template for small geometric points. The only template parameter is currently the dimension N. This class could as well be parameterized over the type of the components, now fixed to double. Default template parameters offer a clean way to add this generality later without having to change code elsewhere. More...


Functions

template<unsigned N> bool operator== (const coordN< N > &lhs, const coordN< N > rhs)
template<unsigned N> bool operator!= (const coordN< N > &lhs, const coordN< N > rhs)
template<unsigned N> coordN< N > operator+ (const coordN< N > &lhs, const coordN< N > &rhs)
template<unsigned N> coordN< N > operator- (const coordN< N > &lhs, const coordN< N > &rhs)
template<unsigned N> coordN< N > operator * (const coordN< N > &lhs, const coord_N_component &rhs)
template<unsigned N> coordN< N > operator * (const coord_N_component &lhs, const coordN< N > &rhs)
template<unsigned N> coordN< N > operator/ (const coordN< N > &lhs, const coord_N_component &rhs)
template<unsigned N> coordN< N > operator- (const coordN< N > &rhs)
template<unsigned N> std::ostream & operator<< (std::ostream &out, const coordN< N > &P)
template<unsigned N> std::istream & operator>> (std::istream &in, coordN< N > &P)


Typedef Documentation

typedef double coord_N_component
 

A general class template for small geometric points. The only template parameter is currently the dimension N. This class could as well be parameterized over the type of the components, now fixed to double. Default template parameters offer a clean way to add this generality later without having to change code elsewhere.

Features: 1-based indexing with [] and () all algebraic operators:

  • :+=, -=, +, -
  • : unary -
  • : *=, /=, *, / There is NO operator * for the dot-product due to non-associativity!! ( for )
Specializations exist for N=2 and N=3. They can be disabled by define NO_COORD_SPECIAL 1

This class template can work together with the matrix<M.N> template.

Definition at line 47 of file coords.h.

Referenced by operator *, and operator/.


Function Documentation

template<unsigned N>
bool operator== const coordN< N > &    lhs,
const coordN< N >    rhs
[inline]
 

Definition at line 85 of file coords.h.

template<unsigned N>
bool operator!= const coordN< N > &    lhs,
const coordN< N >    rhs
[inline]
 

Definition at line 90 of file coords.h.

template<unsigned N>
coordN<N> operator+ const coordN< N > &    lhs,
const coordN< N > &    rhs
[inline]
 

Definition at line 94 of file coords.h.

template<unsigned N>
coordN<N> operator- const coordN< N > &    lhs,
const coordN< N > &    rhs
[inline]
 

Definition at line 98 of file coords.h.

template<unsigned N>
coordN<N> operator * const coordN< N > &    lhs,
const coord_N_component   rhs
[inline]
 

Definition at line 102 of file coords.h.

References coord_N_component.

template<unsigned N>
coordN<N> operator * const coord_N_component   lhs,
const coordN< N > &    rhs
[inline]
 

Definition at line 106 of file coords.h.

References coord_N_component.

template<unsigned N>
coordN<N> operator/ const coordN< N > &    lhs,
const coord_N_component   rhs
[inline]
 

Definition at line 110 of file coords.h.

References coord_N_component.

template<unsigned N>
coordN<N> operator- const coordN< N > &    rhs [inline]
 

Definition at line 115 of file coords.h.

template<unsigned N>
std::ostream& operator<< std::ostream &    out,
const coordN< N > &    P
[inline]
 

Definition at line 120 of file coords.h.

template<unsigned N>
std::istream& operator>> std::istream &    in,
coordN< N > &    P
[inline]
 

Definition at line 130 of file coords.h.


Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 15:57:27 2002 for Geometry by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000