Implementation of reflector objects. More...
#include <iostream>#include <vector>#include <array>#include <cmath>#include "Utils.h"#include "InterfaceReflector.h"Macros | |
| #define | M_PI 3.14159265358979323846 |
Functions | |
| template<typename T , typename U > | |
| void | transformGrids (T *reflc, int idx, std::array< U, 3 > &inp, std::array< U, 3 > &out, Utils< U > *ut, U mat[16]) |
| template<typename T , typename U > | |
| void | Parabola_xy (T *parabola, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U a, U b, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Parabola_uv (T *parabola, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U ecc_uv, U rot_uv, U a, U b, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Hyperbola_xy (T *hyperbola, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U a, U b, U c, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Hyperbola_uv (T *hyperbola, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U ecc_uv, U rot_uv, U a, U b, U c, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Ellipse_xy (T *ellipse, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U a, U b, U c, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Ellipse_uv (T *ellipse, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U ecc_uv, U rot_uv, U a, U b, U c, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Plane_xy (T *plane, U xu_lo, U xu_up, U yv_lo, U yv_up, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Plane_uv (T *plane, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, U ecc_uv, U rot_uv, int ncx, int ncy, int nfac, U mat[16], bool transform) |
| template<typename T , typename U > | |
| void | Plane_AoE (T *plane, U xu_lo, U xu_up, U yv_lo, U yv_up, U xcenter, U ycenter, int ncx, int ncy, U mat[16], bool transform, bool spheric) |
| template<typename T , typename U , typename W > | |
| void | add_surferr_uncorr (T refl, W *container) |
| void | generateGrid (reflparams refl, reflcontainer *container, bool transform, bool spheric) |
| void | generateGridf (reflparamsf refl, reflcontainerf *container, bool transform, bool spheric) |
Implementation of reflector objects.
General definitions of reflector objects. Generates reflectors using xy, uv or Azimuth over Elevation parametrization. Associated normal vectors and area element sizes are also returned.
| void Ellipse_uv | ( | T * | ellipse, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | ecc_uv, | ||
| U | rot_uv, | ||
| U | a, | ||
| U | b, | ||
| U | c, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate ellipsoid from uv parametrization.
Generate a ellipsoid using a uv parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| ellipse | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on u co-ordinate, double/float. |
| xu_up | Upper limit on u co-ordinate, double/float. |
| yv_lo | Lower limit on v co-ordinate, double/float. |
| yv_up | Upper limit on v co-ordinate, double/float. |
| xcenter | Center x co-ordinate of xy region. |
| ycenter | Center y co-ordinate of xy region. |
| ecc_uv | Eccentricity of uv-generated ellipse in xy-grid, double/float. |
| rot_uv | Position angle of uv-generated ellipse in xy-grid, double/float. |
| a | Scaling factor along x-axis. |
| b | Scaling factor along y-axis. |
| c | Scaling factor along z-axis |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void Ellipse_xy | ( | T * | ellipse, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | a, | ||
| U | b, | ||
| U | c, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate ellipsoid from xy parametrization.
Generate a ellipsoid using an xy parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| ellipse | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on x co-ordinate, double/float. |
| xu_up | Upper limit on x co-ordinate, double/float. |
| yv_lo | Lower limit on y co-ordinate, double/float. |
| yv_up | Upper limit on y co-ordinate, double/float. |
| xcenter | Center x co-ordinate of xy region. |
| ycenter | Center y co-ordinate of xy region. |
| a | Scaling factor along x-axis. |
| b | Scaling factor along y-axis. |
| c | Scaling factor along z-axis |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void generateGrid | ( | reflparams | refl, |
| reflcontainer * | container, | ||
| bool | transform, | ||
| bool | spheric | ||
| ) |
Generate reflector/far-field grids.
Generate x, y, z grids and corresponding normal vectors nx, ny, nz. Also generates area elements. For far-field grids, generates Az and El grid, leaves z-container at 0 values.
| refl | A reflparams object containing reflector parameters. |
| container | Pointer to reflcontainer object. |
| transform | Whether or not to apply transformation to reflector. |
| spheric | Whether or not to convert a far-field grid to spherical co-ordinates, for plotting purposes. |
| void generateGridf | ( | reflparamsf | refl, |
| reflcontainerf * | container, | ||
| bool | transform, | ||
| bool | spheric | ||
| ) |
Generate reflector/far-field grids.
Generate x, y, z grids and corresponding normal vectors nx, ny, nz. Also generates area elements. For far-field grids, generates Az and El grid, leaves z-container at 0 values.
| refl | A reflparamsf object containing reflector parameters. |
| container | Pointer to reflcontainerf object. |
| transform | Whether or not to apply transformation to reflector. |
| spheric | Whether or not to convert a far-field grid to spherical co-ordinates, for plotting purposes. |
| void Hyperbola_uv | ( | T * | hyperbola, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | ecc_uv, | ||
| U | rot_uv, | ||
| U | a, | ||
| U | b, | ||
| U | c, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate hyperboloid from uv parametrization.
Generate a hyperboloid using a uv parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| hyperbola | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on u co-ordinate, double/float. |
| xu_up | Upper limit on u co-ordinate, double/float. |
| yv_lo | Lower limit on v co-ordinate, double/float. |
| yv_up | Upper limit on v co-ordinate, double/float. |
| xcenter | Center x co-ordinate of xy region. |
| ycenter | Center y co-ordinate of xy region. |
| ecc_uv | Eccentricity of uv-generated ellipse in xy-grid, double/float. |
| rot_uv | Position angle of uv-generated ellipse in xy-grid, double/float. |
| a | Scaling factor along x-axis. |
| b | Scaling factor along y-axis. |
| c | Scaling factor along z-axis |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void Hyperbola_xy | ( | T * | hyperbola, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | a, | ||
| U | b, | ||
| U | c, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate hyperboloid from xy parametrization.
Generate a hyperboloid using an xy parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| hyperbola | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on x co-ordinate, double/float. |
| xu_up | Upper limit on x co-ordinate, double/float. |
| yv_lo | Lower limit on y co-ordinate, double/float. |
| yv_up | Upper limit on y co-ordinate, double/float. |
| xcenter | Center x co-ordinate of xy region. |
| ycenter | Center y co-ordinate of xy region. |
| a | Scaling factor along x-axis. |
| b | Scaling factor along y-axis. |
| c | Scaling factor along z-axis |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void Parabola_uv | ( | T * | parabola, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | ecc_uv, | ||
| U | rot_uv, | ||
| U | a, | ||
| U | b, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate paraboloid from uv parametrization.
Generate a paraboloid using a uv parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| parabola | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on u co-ordinate, double/float. |
| xu_up | Upper limit on u co-ordinate, double/float. |
| yv_lo | Lower limit on v co-ordinate, double/float. |
| yv_up | Upper limit on v co-ordinate, double/float. |
| xcenter | Center x co-ordinate of uv region. |
| ycenter | Center y co-ordinate of uv region. |
| ecc_uv | Eccentricity of uv-generated ellipse in xy-grid, double/float. |
| rot_uv | Position angle of uv-generated ellipse in xy-grid, double/float. |
| a | Scaling factor along x-axis. |
| b | Scaling factor along y-axis. |
| ncx | Number of cells along u-axis. |
| ncy | Number of cells along v-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void Parabola_xy | ( | T * | parabola, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | a, | ||
| U | b, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate paraboloid from xy parametrization.
Generate a paraboloid using an xy parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| parabola | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on x co-ordinate, double/float. |
| xu_up | Upper limit on x co-ordinate, double/float. |
| yv_lo | Lower limit on y co-ordinate, double/float. |
| yv_up | Upper limit on y co-ordinate, double/float. |
| xcenter | Center x co-ordinate of xy region. |
| ycenter | Center y co-ordinate of xy region. |
| a | Scaling factor along x-axis. |
| b | Scaling factor along y-axis. |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void Plane_AoE | ( | T * | plane, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| int | ncx, | ||
| int | ncy, | ||
| U | mat[16], | ||
| bool | transform, | ||
| bool | spheric | ||
| ) |
Generate plane from AoE (on-sky angles) parametrization.
Generate a plane using an AoE parametrization. Used for calculating far-fields only.
| plane | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on Az co-ordinate, double/float. |
| xu_up | Upper limit on Az co-ordinate, double/float. |
| yv_lo | Lower limit on El co-ordinate, double/float. |
| yv_up | Upper limit on El co-ordinate, double/float. |
| xcenter | Center Az co-ordinate of Az-El region. |
| ycenter | Center El co-ordinate of Az-El region. |
| ncx | Number of cells along Az-axis. |
| ncy | Number of cells along El-axis. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to plane. |
| spheric | Whether or not to apply spherical transformation to plane, for plotting purposes.. |
| void Plane_uv | ( | T * | plane, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| U | xcenter, | ||
| U | ycenter, | ||
| U | ecc_uv, | ||
| U | rot_uv, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate plane from uv parametrization.
Generate a plane using an uv parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| plane | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on x co-ordinate, double/float. |
| xu_up | Upper limit on x co-ordinate, double/float. |
| yv_lo | Lower limit on y co-ordinate, double/float. |
| yv_up | Upper limit on y co-ordinate, double/float. |
| xcenter | Center x co-ordinate of xy region. |
| ycenter | Center y co-ordinate of xy region. |
| ecc_uv | Eccentricity of uv-generated ellipse in xy-grid, double/float. |
| rot_uv | Position angle of uv-generated ellipse in xy-grid, double/float. |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void Plane_xy | ( | T * | plane, |
| U | xu_lo, | ||
| U | xu_up, | ||
| U | yv_lo, | ||
| U | yv_up, | ||
| int | ncx, | ||
| int | ncy, | ||
| int | nfac, | ||
| U | mat[16], | ||
| bool | transform | ||
| ) |
Generate plane from xy parametrization.
Generate a plane using an xy parametrization. Also generates the normal vectors and area elements. Applies specified transformations as well, if enabled.
| plane | Pointer to reflcontainer or reflcontainerf object. |
| xu_lo | Lower limit on x co-ordinate, double/float. |
| xu_up | Upper limit on x co-ordinate, double/float. |
| yv_lo | Lower limit on y co-ordinate, double/float. |
| yv_up | Upper limit on y co-ordinate, double/float. |
| ncx | Number of cells along x-axis. |
| ncy | Number of cells along y-axis. |
| nfac | Flip normal vectors. |
| mat | Array of 16 double/float, transformation matrix. |
| transform | Whether or not to apply transformation to reflector. |
| void transformGrids | ( | T * | reflc, |
| int | idx, | ||
| std::array< U, 3 > & | inp, | ||
| std::array< U, 3 > & | out, | ||
| Utils< U > * | ut, | ||
| U | mat[16] | ||
| ) |
Transform reflector grids.
Applies rotations and translations to reflector, co-ordinate wise.
| reflc | Pointer to reflcontainer or reflcontainerf object. |
| idx | Index of co-ordinate. |
| inp | Array of 3 double/float. |
| out | Array of 3 double/float. |
| ut | Pointer to Utils object. |
| mat | Array of 16 double/float. |