Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
IntersectionMapping.h
Go to the documentation of this file.
1
#ifndef INTERSECTION_MAPPING_H
2
#define INTERSECTION_MAPPING_H
3
4
#include "
Mapping.h
"
5
class
GenericGraphicsInterface
;
6
7
#include "
GenericGraphicsInterface.h
"
8
9
//-------------------------------------------------------------
10
// Define a Mapping by the intersection of two other mappings
11
//-------------------------------------------------------------
12
class
IntersectionMapping
:
public
Mapping
13
{
14
private
:
15
aString
className;
16
17
Mapping
*map1,*map2;
// pointers to Mapping's that are intersected
18
19
20
public
:
21
22
Mapping
*
rCurve1
, *
rCurve2
, *
curve
;
// intersection curve, three representations
23
24
25
IntersectionMapping
();
26
27
IntersectionMapping
(
Mapping
& map1,
28
Mapping
& map2 );
29
30
// IntersectionMapping(Mapping & surface, const real & TFIDistance=0. );
31
32
// Copy constructor is deep by default
33
IntersectionMapping
(
const
IntersectionMapping
&,
const
CopyType
copyType=
DEEP
);
34
35
~IntersectionMapping
();
36
37
IntersectionMapping
&
operator =
(
const
IntersectionMapping
& X0 );
38
39
int
intersect
(
Mapping
& map1,
40
Mapping
& map2,
41
GenericGraphicsInterface
*gi=
NULL
,
42
GraphicsParameters
& params=
Overture::defaultGraphicsParameters
());
43
44
void
map
(
const
realArray
&
r
,
realArray
& x,
realArray
& xr =
Overture::nullRealDistributedArray
(),
45
MappingParameters
& params =
Overture::nullMappingParameters
() );
46
47
virtual
int
project
(
realArray
& x,
// project points onto the curve of intersection
48
int
& iStart,
49
int
& iEnd,
50
periodicType
period);
51
virtual
int
project
(
realArray
& x,
52
MappingProjectionParameters
& mpParams ){
return
Mapping::project
(x,mpParams); }
53
54
virtual
int
reparameterize
(
const
real
& arcLengthWeight=1.,
// reparameterize by arc-length and curvature
55
const
real
& curvatureWeight=.5 );
56
57
// intersect two curves in 2D
58
int
intersectCurves
(
Mapping
& map1,
Mapping
& map2,
59
int
& numberOfIntersectionPoints,
60
realArray
& r1,
61
realArray
& r2,
62
realArray
& x );
63
64
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
65
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
66
67
Mapping
*
make
(
const
aString
&
mappingClassName
);
68
aString
getClassName
()
const
{
return
IntersectionMapping::className; }
69
70
int
update
(
MappingInformation
& mapInfo ) ;
71
72
protected
:
73
int
determineIntersection
(
GenericGraphicsInterface
*gi=
NULL
,
74
GraphicsParameters
& params=
Overture::defaultGraphicsParameters
());
75
76
int
newtonIntersection
(
realArray
& x,
realArray
& r1,
realArray
& r2,
const
realArray
& n );
77
78
BoundingBox
*
createBoundingBox
(
BoundingBox
& child1,
BoundingBox
& child2 ) ;
79
void
destroyBoundingBox
(
BoundingBox
& box );
80
void
reOrder
(
realArray
& x,
int
& iStart,
int
& iEnd,
periodicType
& periodic,
81
periodicType
curveIsPeriodic[2],
real
epsX);
82
void
reduce
(
realArray
& x,
int
& iStart,
int
& iEnd);
83
84
int
intersectWithCompositeSurface
(
Mapping
& map1_,
CompositeSurface
& cs,
85
GenericGraphicsInterface
*gi=
NULL
,
86
GraphicsParameters
& params =
Overture::defaultGraphicsParameters
() );
87
88
private
:
89
90
91
//
92
// Virtual member functions used only through class ReferenceCounting:
93
//
94
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
95
{
return
operator=
((
IntersectionMapping
&)x); }
96
virtual
void
reference(
const
ReferenceCounting
& x)
97
{ reference((
IntersectionMapping
&)x); }
// *** Conversion to this class for the virtual = ****
98
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
99
{ return ::new
IntersectionMapping
(*
this
, ct); }
100
101
};
102
103
104
#endif
Generated on Fri Jan 4 2013 10:17:54 for Overture by
1.8.3