Overture  Version 25
QuadraticMapping.h
Go to the documentation of this file.
1 #ifndef QUADRATIC_MAPPING_H
2 #define QUADRATIC_MAPPING_H
3 
4 #include "Mapping.h"
5 
6 //-------------------------------------------------------------
7 // Define a quadratic curve or surface
8 //
9 //-------------------------------------------------------------
10 class QuadraticMapping : public Mapping
11 {
12 
13 public:
14 
16  {
19  };
20 
22  // Copy constructor is deep by default
23  QuadraticMapping( const QuadraticMapping &, const CopyType copyType=DEEP );
24 
26 
28 
29  int chooseQuadratic( QuadraticOption option, int rangeDimension=2 );
30  int setParameters(real c0x,
31  real c1x,
32  real c0y,
33  real c1y,
34  real a00,
35  real a10,
36  real a01,
37  real a20,
38  real a11,
39  real a02,
40  real signForHyperbola = 1. );
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 
50 
51  int update( MappingInformation & mapInfo ) ;
52 
53  protected:
55 
57 
58  real a[3][3],c[2][2]; // quadratic parameters
60 
61  private:
62 
63  //
64  // Virtual member functions used only through class ReferenceCounting:
65  //
67  { return operator=((QuadraticMapping &)x); }
68  virtual void reference( const ReferenceCounting& x)
69  { reference((QuadraticMapping &)x); } // *** Conversion to this class for the virtual = ****
70  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
71  { return ::new QuadraticMapping(*this, ct); }
72 
73 };
74 
75 
76 #endif