Index

C++ Code Documentation

geom::surface0::Vertex

File: GEOM/geom/surface0/Vertex.H

Vertex data structure A Vertex represents a point on a surface. There are two projection modes: central and stereographic. A Vertex is exported according to the projection mode. Let N = the dimension of the ambient space of the surface. A Vertex stores N+2 real numbers (v[0]...v[N+1]). In the following comments, these are called (y[1]...y[N], y[0], y[inf]). In central projection mode, only the first N+1 real numbers (y[1]...y[N], y[0]) are used. The last real number y[inf] is not used. The first N+1 coordinates are interpreted as homogeneous coordinates in RP^N. The Vertex is exported in either of two ways: point in RP^N: [ y[1] ... y[N] ] point in R^N via central projection: ( y[1] ... y[N-1] ) / y[N] In stereographic projection mode, all N+2 real numbers are used. First, comments in a different coordinate system x[1]...x[N],x[0],x[inf]. The last real number x[inf] is precomputed so that (x[1]...x[N],x[0],x[inf]) lies in the projective quadric Q: x[1]^2 + ... + x[N]^2 + x[0]^2 - x[inf]^2 = 0. The Vertex is exported as point in RP^(N+1): [ x[0] ... x[N], x[inf] - x[0] ] point in R^N via stereographic projection: ( x[1] ... x[N] ) / (x[inf] - x[0]) The numbers x[1]...x[N],x[0],x[inf] are stored in a memory-efficient way, namely as y[1]...y[n],y[0],y[inf] where y[1] = x[1] ... y[N] = x[N] y[0] = x[inf]-x[0] y[inf] = x[inf] + x[0] so x[1] = y[1] ... x[N] = y[N] x[0] = (y[inf]-y[0])/2 x[inf] = (y[inf] + y[0])/2 Under this change of coordinates, the quadric Q: x[1]^2 + ... + x[N]^2 + x[0]^2 - x[inf]^2 = 0. becomes Q': y[1]^2 + ... + y[N]^2 - y[0] y[inf] = 0. Thus y[inf] is computed as y[inf] = (y[1]^2 + ... + y[N]^2)/y[0].

public:
  • inline Vertex( SpaceForm const & );
    constructor
  • inline Vertex( Vertex const & );
    copy constructor
  • inline virtual ~Vertex();
    destructor
  • inline Vertex &operator=( Vertex const & );
    assignment operator
  • void import( Vertex2 const &v );
  • void import( Vertex3 const &v );
  • void import( Vertex4 const &v );
  • void import( math::Vector<Real> const &v );
  • template <class T> inline void import( base::vector<T> const &v );
  • void export_( Vertex2 &v ) const;
  • void export_( Vertex3 &v ) const;
  • void export_( Vertex4 &v ) const;
  • void export_( math::Vector<Real> &v ) const;
  • void export_( Vertex4 &v, Transform const &t, ProjectionMode p ) const;
  • void import( base::vector<float> const &v, SpaceForm spaceform );
  • void import( base::vector<double> const &v, SpaceForm spaceform );
  • friend std::ostream &operator<<( std::ostream &o, Vertex const & );
protected:
private:
  • template <class T> void import_homogeneous( T const &, uint N );
  • template <class T> void import_inhomogeneous( T const &, uint N );
  • template <class T> void export_homogeneous( T &, uint N ) const;
  • template <class T> void export_inhomogeneous( T &, uint N ) const;
  • template <class T> void export_homogeneous( T &, uint N, Transform const &t, ProjectionMode p) const;
  • static void mulleft( Real const *, Real *, uint );
  • template <class T> void import_S( base::vector<T> const &v );
  • template <class T> void import_H( base::vector<T> const &v );
  • SpaceForm _spaceform;
  • math::Vector<Real> _x;
  • Real _xp;
  • Real _x0;
  • Real _xi;


geom::surface0::Vertex GANG