Overture  Version 25
SweepMapping.h
Go to the documentation of this file.
1 #ifndef SWEEP_MAPPING_H
2 #define SWEEP_MAPPING_H
3 
4 #include "Mapping.h"
5 #include "SplineMapping.h"
6 #include "MatrixTransform.h"
7 
8 class SweepMapping : public Mapping
9 {
10 
11  public:
12 
14  {
18  };
19 
21  {
25  };
26 
27  SweepMapping(Mapping *sweepmap=NULL,
28  Mapping *dirsweepmap=NULL,
29  Mapping *scale=NULL,
30  const int domainDimension=3 );
31 
32  // Copy constructor is deep by default
33  SweepMapping( const SweepMapping & map, const CopyType copyType=DEEP );
34 
35  ~SweepMapping();
36 
37  SweepMapping & operator =( const SweepMapping & X );
38 
41 
44 
45  virtual void mapS( const RealArray & r, RealArray & x, RealArray &xr = Overture::nullRealArray(),
47 
48  virtual void basicInverseS(const RealArray & x,
49  RealArray & r,
52 
53  int setCentering( CenteringOptionsEnum centeringOption ); // specify the centering
54  int setOrientation( real orientation_ =1. );
55 
56  // build an extruded mapping
57  int setExtrudeBounds( real za=0., real zb=1. );
58 
59 // build a tabulated cylinder
60  int setStraightLine(real lx=0., real ly=0., real lz=1.);
61 
62  void setScale(Mapping *scale); // specify a Mapping for scaling
63  void setSweepCurve(Mapping *dirsweepmap); // specify the sweep curve
64  void setSweepSurface(Mapping *sweepmap); // specify the sweep surface
65 
66  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
67  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
68 
70 
71  aString getClassName() const;
72 
73  int update( MappingInformation & mapInfo ) ;
74 
75  protected:
77 
80 
83 
85  void findRowSplines();
89 
90  int initialize();
92  void crossProduct(real *v1, real *v2, real *v3);
93  real dotProduct(real *v1, real *v2);
94 
95  private:
96 
97  //
98  // Virtual member functions used only through class ReferenceCounting:
99  //
101  { return operator=((SweepMapping &)x); }
102  virtual void reference( const ReferenceCounting& x)
103  { reference((SweepMapping &)x); } // *** Conversion to this class for the virtual = ****
104  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
105  { return ::new SweepMapping(*this, ct); }
106 };
107 
108 #endif