Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
NormalMapping.h
Go to the documentation of this file.
1
#ifndef NORMAL_MAPPING_H
2
#define NORMAL_MAPPING_H
3
4
#include "
Mapping.h
"
5
6
//-------------------------------------------------------------
7
// Define a Mapping by extending normals from another Mapping
8
//-------------------------------------------------------------
9
class
NormalMapping
:
public
Mapping
10
{
11
private
:
12
aString
className;
13
Mapping
*surface;
// here is the surface that we extend normals from
14
real
normalDistance;
15
16
public
:
17
18
NormalMapping
();
19
NormalMapping
(
Mapping
& surface,
const
real
& normalDistance=.5 );
20
21
// Copy constructor is deep by default
22
NormalMapping
(
const
NormalMapping
&,
const
CopyType
copyType=
DEEP
);
23
24
~NormalMapping
();
25
26
NormalMapping
&
operator =
(
const
NormalMapping
&
X0
);
27
28
void
setReferenceSurface
(
Mapping
& surface );
29
void
setNormalDistance
(
real
distance );
30
31
void
map
(
const
realArray
&
r
,
realArray
&
x
,
realArray
&
xr
=
Overture::nullRealDistributedArray
(),
32
MappingParameters
& params =
Overture::nullMappingParameters
() );
33
34
void
mapS
(
const
RealArray
& r,
RealArray
& x,
RealArray
&
xr
=
Overture::nullRealArray
(),
35
MappingParameters
& params =
Overture::nullMappingParameters
());
36
37
virtual
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
// get from a database file
38
virtual
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
// put to a database file
39
40
Mapping
*
make
(
const
aString
&
mappingClassName
);
41
aString
getClassName
()
const
{
return
NormalMapping::className; }
42
43
int
update
(
MappingInformation
& mapInfo ) ;
44
45
protected
:
46
47
void
initialize
();
48
49
private
:
50
51
//
52
// Virtual member functions used only through class ReferenceCounting:
53
//
54
virtual
ReferenceCounting
&
operator=
(
const
ReferenceCounting
& x)
55
{
return
operator=
((
NormalMapping
&)x); }
56
virtual
void
reference(
const
ReferenceCounting
& x)
57
{ reference((
NormalMapping
&)x); }
// *** Conversion to this class for the virtual = ****
58
virtual
ReferenceCounting
* virtualConstructor(
const
CopyType
ct =
DEEP
)
const
59
{ return ::new
NormalMapping
(*
this
, ct); }
60
61
};
62
63
64
#endif
Generated on Fri Jan 4 2013 10:17:56 for Overture by
1.8.3