Blame view

fieldslice.h 1.16 KB
3f56f1f9   dmayerich   initial commit
1
2
3
4
5
6
7
  #ifndef FIELDSLICE_H

  #define FIELDSLICE_H

  

  #include "dataTypes.h"

  

  #include <string>

  #include <sstream>

d6f53e68   dmayerich   rts organization
8
  #include "rts/math/quad.h"

3f56f1f9   dmayerich   initial commit
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  

  #include "scalarslice.h"

  

  

  struct fieldslice

  {

  	//images representing the slice for each world-space polarization direction

  	bsComplex* x_hat;

  	bsComplex* y_hat;

  	bsComplex* z_hat;

  

  

  

  	//slice resolution

  	unsigned int R[2];

  

  	//if the slice is a scalar

  	bool scalarField;

  

  	fieldslice(unsigned int x_res, unsigned int y_res);

  

  	fieldslice();

  

  	~fieldslice();

  

51b6469a   dmayerich   added look-up tables
34
35
36
  	//copy constructor

  	fieldslice(const fieldslice& rhs);

  

3f56f1f9   dmayerich   initial commit
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  	//void setPos(bsPoint pMin, bsPoint pMax, bsVector N);

  

  	scalarslice Mag();

  	scalarslice Real();

  	scalarslice Imag();

  	scalarslice Intensity();

  	void IntegrateAndResample(scalarslice* detector, unsigned int supersample);

  

  	void ScaleField(ptype v);

  

  	//convert the field slice to the angular spectrum

  	void toAngularSpectrum();

  	void fromAngularSpectrum();

  

  	//crop a region from the field

  	fieldslice crop(int u, int v, int su, int sv);

51b6469a   dmayerich   added look-up tables
53
  	fieldslice& operator=(const fieldslice& rhs);

3f56f1f9   dmayerich   initial commit
54
55
56
57
58
59
60
61
62
  

  	void init_gpu();

  	void kill_gpu();

  	void clear_gpu();

  

  	std::string toStr();

  };

  

  #endif