Open PaperOpt
SurfaceTNSubflat Class Reference

#include <SurfaceTNSubflat.h>

Inheritance diagram for SurfaceTNSubflat:
Collaboration diagram for SurfaceTNSubflat:

List of all members.

Public Member Functions

 SurfaceTNSubflat (float _zoffset, float sizeX, float sizeY, Array2D< float >, int _normfact, bool _interpolate, float _rmsmin, float _rmsmax, StructureObject *_el)
 SurfaceTNSubflat (float _zoffset, float sizeX, float sizeY, Array2D< float > &z, int _normfact, bool _interpolate, Array2D< V2< float > > &v, StructureObject *_el)
 SurfaceTNSubflat (float _zoffset, float sizeX, float sizeY, Array2D< float > &z, int _mNorm, int _nnorm, std::string _normfile, bool _interpolate, Array2D< V2< float > > &v, StructureObject *_el)
 SurfaceTNSubflat (float _zoffset, float sizeX, float sizeY, Array2D< float >, float _rmsmin, float _rmsmax, StructureObject *_el)
virtual ~SurfaceTNSubflat ()
int mIntercept (WavePacket &wp, double t1in, double t2in, int updown, double &t) const
double mZposition (WavePacket &wp) const

Constructor & Destructor Documentation

SurfaceTNSubflat::SurfaceTNSubflat ( float  _zoffset,
float  sizeX,
float  sizeY,
Array2D< float >  ,
int  _normfact,
bool  _interpolate,
float  _rmsmin,
float  _rmsmax,
StructureObject _el 
)

CONSTRUCTOR we have used a lot of constructors because of different parameters to read topography and roughness. Creates a flat surface at _zoffset. Calculates normals from the topography z,sizeX and sizeY should be its size, resulting in _normfact times as many precalculated normals (typically _normfact = 1 to 3).

Parameters:
_zoffsetIndicates actualy where is surface actualy exists
sizeXSize of normal
sizeYSize of normal
zReplacement of topography file
_normfactRepresents how many normals can be calculated
_interpolateResolution of generated surface normal map.
_rmsminRoot mean suare roughness of the paper over the small area
_rmsmaxRoot mean suare roughness of the paper over the small area
_elInstance of StructureObject class is used to appraoch next surface layer untill last one

Set various constants

Set the topography size. dxtopo and dytopo are set later when reading the topography.

Set the size of the normal array. mXmax, mYMax, dxnorm and dynorm are set later when reading the topography.

Since we don't map different roughness values to the surface, we use the member 'rms' and ignore the matrix 'roughness'.

Read the topography and estimate the normals from the topography.

Here is the call graph for this function:

SurfaceTNSubflat::SurfaceTNSubflat ( float  _zoffset,
float  sizeX,
float  sizeY,
Array2D< float > &  z,
int  _normfact,
bool  _interpolate,
Array2D< V2< float > > &  v,
StructureObject _el 
)

Constructor that creates normals from an actual topography z. No roughness mapping.

Parameters:
_zoffsetIndicates actualy where is surface actualy exists
sizeXSize of normal
sizeYSize of normal
zInstance Array2D vector to handle row and columns and to read topography
_normfactRepresents how many normal can be calculated
_interpolateResolution of generated surface normal map.
vReplacement of roughness
_elInstance of StructureObject class is used to appraoch next surface layer untill last one

Set various constants

Set the topography size. dxtopo and dytopo are set when reading the topography.

Set the size of the normal array. mXmax, mYMax, dxnorm and dynorm are set when reading the topography.

Set the size of the roughness array. dxrough and dyrough are set below when the surface size is known.

Read the topography and the roughness, and estimate the normals from the topography.

Here is the call graph for this function:

SurfaceTNSubflat::SurfaceTNSubflat ( float  _zoffset,
float  sizeX,
float  sizeY,
Array2D< float > &  z,
int  _mNorm,
int  _nnorm,
std::string  _normfile,
bool  _interpolate,
Array2D< V2< float > > &  v,
StructureObject _el 
)

Set various constants

Set the topography size. dxtopo and dytopo are set later when reading the topography.

Set the remaining array sizes, etc. dx and dy for the normals and the roughness is set below when the surface size is known.

Read the topography, the normals and the roughness from files.

Here is the call graph for this function:

SurfaceTNSubflat::SurfaceTNSubflat ( float  _zoffset,
float  sizeX,
float  sizeY,
Array2D< float >  ar,
float  _rmsmin,
float  _rmsmax,
StructureObject _el 
)

Set various constants

Set the topography size. dxtopo and dytopo are set later when reading the topography.

We will not use normal mapping

Since we don't map different roughness values to the surface, we use the member 'rms' and ignore the matrix 'roughness'.

Read the topography and estimate the normals from the topography.

Here is the call graph for this function:

SurfaceTNSubflat::~SurfaceTNSubflat ( ) [virtual]

Constructor that reads the topography as well as the normal and roughness mappings from files.


Member Function Documentation

int SurfaceTNSubflat::mIntercept ( WavePacket wp,
double  t1in,
double  t2in,
int  updown,
double &  t 
) const [virtual]

Find intersection between surfaces and return value of travelled distance

Parameters:
wpWave Packet's object to calculate ditance of plane surface
t1inSmaller distance of propagation
t2inSmaller distance of propagation
ud
tDetermines the propagation distance

Update t1 and t2 so that they are within the volume spanned by the surface. If any of the components of wp.mDir is 0, we are impudent enough to change them to a small number.

Get the indices of the cell of t1. Note the need of 0.5 term imposed by the fact that cell is centered around the height point.

Very useful in many situations below

Abort if the wp is on the wrong side of the surface for t1. This is not the behaviour of SurfaceTopo / -topo_tri. If we end up exactly on a grid line, the result may not be correct.

Cell indices for t2. NOTE: one could use t2 to discover when the search should end instead of [x2,y2], but it is difficult to say if the algorithm would be faster / more simple...

Various variables needed in the algorithm

The main algorithm: test the cells along the path of the ray (wp).

Reimplemented from SurfaceTN.

Here is the call graph for this function:

double SurfaceTNSubflat::mZposition ( WavePacket wp) const [virtual]

Find intersection between surfaces and return value of travelled distance

Parameters:
wpInstance of wave packet class

Check on the boundary. There is really no good behavoiur if this case should be detected...

Reimplemented from SurfaceTN.

Here is the call graph for this function:


The documentation for this class was generated from the following files: