Overture  Version 25
CircleMapping.h
Go to the documentation of this file.
1 #ifndef CIRCLE_MAPPING_H
2 #define CIRCLE_MAPPING_H
3 
4 #include "Mapping.h"
5 
6 //-------------------------------------------------------------
7 // Define a 2D Circle or Ellipse
8 //-------------------------------------------------------------
9 class CircleMapping : public Mapping
10 {
11  public:
15 
16  // define a circle or ellipse in 2D, minor axis a, major axis b, angle from startTheta to endTheta
17  CircleMapping(const real & x0=0.,
18  const real & y0=0.,
19  const real & a=1.,
20  const real & b=-1.,
21  const real & startTheta=0.,
22  const real & endTheta=1.) ;
23  // define a circle or ellipse in 3D
24  CircleMapping(const real & x0,
25  const real & y0,
26  const real & z0,
27  const real & a,
28  const real & b,
29  const real & startTheta,
30  const real & endTheta ) ;
31 
32  // Copy constructor is deep by default
33  CircleMapping( const CircleMapping & map, const CopyType copyType=DEEP );
34 
36 
37  CircleMapping & operator =( const CircleMapping & x );
38 
41 
44 
45  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
46  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
47 
49 
50  aString getClassName() const;
51 
52  int update( MappingInformation & mapInfo ) ;
53 
54  protected:
55 
56  void initialize(const real & x0, const real & y0, const real & z0, const real & a, const real & b,
57  const real & startTheta, const real & endTheta ) ;
58  private:
59  //
60  // Virtual member functions used only through class ReferenceCounting:
61  //
63  { return operator=((CircleMapping &)x); }
64  virtual void reference( const ReferenceCounting& x)
65  { reference((CircleMapping &)x); } // *** Conversion to this class for the virtual = ****
66  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
67  { return ::new CircleMapping(*this, ct); }
68 };
69 
70 #endif