Overture  Version 25
OrthographicTransform.h
Go to the documentation of this file.
1 #ifndef ORTHOGRAPHIC_TRANSFORM_H
2 #define ORTHOGRAPHIC_TRANSFORM_H
3 
4 #include "Mapping.h"
5 
7 //---------------------------------------------------------------------
8 // Define an orthographic Transformation which can be used to remove
9 // polar singularities
10 //---------------------------------------------------------------------
11 {
12  public:
13 
14  enum Pole
15  {
18  };
19 
20  OrthographicTransform( const real sa=1., const real sb=1., const Pole pole=northPole );
21 
22  // Copy constructor is deep by default
23  OrthographicTransform( const OrthographicTransform &, const CopyType copyType=DEEP );
24 
26 
28 
29  int setPole( const Pole & pole );
30 
31  int setSize( const real & sa, const real & sb );
32 
33  int setAngularAxis( const int & tAxis ); // angular axis is axis2 (default) or axis1
34 
37 
40 
41  void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
43 
44  void basicInverseS(const RealArray & x,
45  RealArray & r,
48 
49  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
50  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
51 
53  aString getClassName() const { return OrthographicTransform::className; }
54 
55  int update( MappingInformation & mapInfo ) ;
56 
57  private:
58 
59  //
60  // Virtual member functions used only through class ReferenceCounting:
61  //
63  { return operator=((OrthographicTransform &)x); }
64  virtual void reference( const ReferenceCounting& x)
65  { reference((OrthographicTransform &)x); } // *** Conversion to this class for the virtual = ****
66  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
67  { return ::new OrthographicTransform(*this, ct); }
68 
69 private:
70  aString className;
71  real sa,sb;
72  int pole; // reparameterize north pole (pole=1) or south pole (pole=-1)
73  int tAxis; // angular (tangential axis) axis
74 
75 };
76 
77 
78 #endif
79 
80