Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
CircleMapping.h
Go to the documentation of this file.
1
#ifndef CIRCLE_MAPPING_H
2
#define CIRCLE_MAPPING_H
3
4
#include "
Mapping.h
"
5
6
//-------------------------------------------------------------
7
// Define a 2D Circle or Ellipse
8
//-------------------------------------------------------------
9
class
CircleMapping
:
public
Mapping
10
{
11
public
:
12
aString
className
;
13
real
a
,
b
,
xa
,
ya
,
za
;
14
real
startTheta
,
endTheta
;
15
16
// define a circle or ellipse in 2D, minor axis a, major axis b, angle from startTheta to endTheta
17
CircleMapping
(
const
real
& x0=0.,
18
const
real
& y0=0.,
19
const
real
&
a
=1.,
20
const
real
&
b
=-1.,
21
const
real
&
startTheta
=0.,
22
const
real
&
endTheta
=1.) ;
23
// define a circle or ellipse in 3D
24
CircleMapping
(
const
real
& x0,
25
const
real
& y0,
26
const
real
& z0,
27
const
real
&
a
,
28
const
real
&
b
,
29
const
real
&
startTheta
,
30
const
real
&
endTheta
) ;
31
32
// Copy constructor is deep by default
33
CircleMapping
(
const
CircleMapping
&
map
,
const
CopyType
copyType=
DEEP
);
34
35
~CircleMapping
();
36
37
CircleMapping
&
operator =
(
const
CircleMapping
& x );
38
39
void
map
(
const
realArray
&
r
,
realArray
& x,
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
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
48
Mapping
*
make
(
const
aString
&
mappingClassName
);
49
50
aString
getClassName
()
const
;
51
52
int
update
(
MappingInformation
& mapInfo ) ;
53
54
protected
:
55
56
void
initialize
(
const
real
& x0,
const
real
& y0,
const
real
& z0,
const
real
&
a
,
const
real
&
b
,
57
const
real
&
startTheta
,
const
real
&
endTheta
) ;
58
private
:
59
//
60
// Virtual member functions used only through class ReferenceCounting:
61
//
62
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
63
{
return
operator=
((
CircleMapping
&)x); }
64
virtual
void
reference(
const
ReferenceCounting
& x)
65
{ reference((
CircleMapping
&)x); }
// *** Conversion to this class for the virtual = ****
66
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
67
{ return ::new
CircleMapping
(*
this
, ct); }
68
};
69
70
#endif
Generated on Fri Jan 4 2013 10:17:49 for Overture by
1.8.3