Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
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
13
enum
CenteringOptionsEnum
14
{
15
useCenterOfSweepSurface
,
16
useCenterOfSweepCurve
,
17
specifiedCenter
18
};
19
20
enum
SweepTypeEnum
21
{
22
sweep
,
23
extrude
,
24
tabulatedCylinder
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
39
void
map
(
const
realArray
&
r
,
realArray
& x=
Overture::nullRealDistributedArray
(),
realArray
& xr =
Overture::nullRealDistributedArray
(),
40
MappingParameters
& params=
Overture::nullMappingParameters
() );
41
42
void
basicInverse
(
const
realArray
& x,
realArray
& r,
realArray
& rx =
Overture::nullRealDistributedArray
(),
43
MappingParameters
& params =
Overture::nullMappingParameters
() );
44
45
virtual
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&xr =
Overture::nullRealArray
(),
46
MappingParameters
& params =
Overture::nullMappingParameters
());
47
48
virtual
void
basicInverseS
(
const
RealArray
& x,
49
RealArray
& r,
50
RealArray
& rx =
Overture::nullRealArray
(),
51
MappingParameters
& params =
Overture::nullMappingParameters
());
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
69
Mapping
*
make
(
const
aString
&
mappingClassName
);
70
71
aString
getClassName
()
const
;
72
73
int
update
(
MappingInformation
& mapInfo ) ;
74
75
protected
:
76
RealArray
straightLine
;
77
78
aString
className
;
79
Mapping
*
sweepMap
, *
dirSweepMap
;
80
81
SplineMapping
*
rowSpline0
, *
rowSpline1
, *
rowSpline2
;
82
Mapping
*
scaleSpline
;
83
84
real
center
[3],
orientation
;
85
void
findRowSplines
();
86
CenteringOptionsEnum
centeringOption
;
87
SweepTypeEnum
sweepType
;
88
real
za
,
zb
;
89
90
int
initialize
();
91
int
setMappingProperties
();
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
//
100
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
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
Generated on Fri Jan 4 2013 10:17:59 for Overture by
1.8.3