Overture  Version 25
JoinMapping.h
Go to the documentation of this file.
1 #ifndef JOIN_MAPPING_H
2 #define JOIN_MAPPING_H
3 
4 #include "IntersectionMapping.h"
5 
6 //-------------------------------------------------------------
7 // Define a mapping that tranforms a "source-mapping" so that
8 // it intersects another "clip-surface" "exactly". For example,
9 // a Mapping for a wing (source) can be joined to a fuselage (clip-surface).
10 //
11 //-------------------------------------------------------------
12 class JoinMapping : public Mapping
13 {
14 public:
15 
16  enum JoinType // There are two types of joins
17  {
20  };
21 
22  JoinMapping();
23  JoinMapping(Mapping & sourceMapping,
24  Mapping & clipSurface);
25 
26  // Copy constructor is deep by default
27  JoinMapping( const JoinMapping &, const CopyType copyType=DEEP );
28 
29  ~JoinMapping();
30 
31  JoinMapping & operator =( const JoinMapping & X0 );
32 
33  int setCurves(Mapping & sourceMapping,
34  Mapping & clipSurface);
35 
36  int setEndOfJoin( const real & endOfJoin );
37 
40 
41  virtual int get( const GenericDataBase & dir, const aString & name); // get from a database file
42  virtual int put( GenericDataBase & dir, const aString & name) const; // put to a database file
43 
46 
47  int update( MappingInformation & mapInfo ) ;
48 
49  protected:
54  int numberOfIntersections; // number of intersection points/curves
55  int intersectionToUse; // make a join at this intersection
56  bool intersectionFound; // true if an intersection curve has been found.
57  real endOfJoin; // r value for end of the join
58  // for intersection of curves:
59  bool newCurves;
61 
63 
64  void setup();
65  void initialize();
66 
67  private:
68 
69  //
70  // Virtual member functions used only through class ReferenceCounting:
71  //
73  { return operator=((JoinMapping &)x); }
74  virtual void reference( const ReferenceCounting& x)
75  { reference((JoinMapping &)x); } // *** Conversion to this class for the virtual = ****
76  virtual ReferenceCounting* virtualConstructor( const CopyType ct = DEEP ) const
77  { return ::new JoinMapping(*this, ct); }
78 
79 };
80 
81 
82 #endif