38 : m_width(width), m_height(height), m_optimize(optimize), m_system(system)
71 else if((
double)(
m_width / tHeight) >= 1)
82 if((
double)(
m_width / tHeight) <= 1)
87 else if((
double)(tWidth /
m_height) <= 1)
100 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
163 float polar[3] = {0, 0, 0};
166 if(kart[0] != 0 && kart[1] != 0 && kart[2] != 0)
177 float theta = polar[0];
178 float phi = polar[1];
184 phi = (2 *
M_PI) - phi;
218 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
251 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
268 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
284 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
286 int numberOfImages = 3;
318 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
322 int numberOfIMages = 2;
343 m_sPannini = (param + 1) / (param + sin(
m_p1) * tan(
m_iMaxY) + cos(
m_p1) * cos(m_iMaxX -
m_l0));
353 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
357 int numberOfIMages = 2;
392 :
Projection(width, height, minH, maxH, minV, maxV, optimize, system)
422 float phi, theta, rho;
424 float x_sqr, y_sqr, z_sqr;
425 x_sqr = _cartesian[0] * _cartesian[0];
426 y_sqr = _cartesian[1] * _cartesian[1];
427 z_sqr = _cartesian[2] * _cartesian[2];
429 rho = std::sqrt(x_sqr + y_sqr + z_sqr);
432 cartesian[0] = _cartesian[0] / rho;
433 cartesian[1] = _cartesian[1] / rho;
434 cartesian[2] = _cartesian[2] / rho;
436 phi = std::acos(cartesian[2]);
450 if(
std::abs(cartesian[0]/std::sin(phi)) > 1.0)
452 if(cartesian[0]/std::sin(phi) < 0)
463 theta0 = acos(cartesian[0]/std::sin(phi));
467 float sintheta = cartesian[1]/std::sin(phi);
470 if(
std::abs(std::sin(theta0) - sintheta) < EPS)
474 else if(
std::abs( std::sin( 2*
M_PI - theta0 ) - sintheta ) < EPS)
476 theta = 2*
M_PI - theta0;
CylindricalProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
StereographicProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
PanniniProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
ConicProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
RectilinearProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
AzimuthalProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
EquirectangularProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
virtual void project(int &i, int &j, float &r, float x, float y, float z) override
ModelToImage::CoordinateSystem m_system
MercatorProjection(int width, int height, int minH, int maxH, int minV, int maxV, bool optimize, ModelToImage::CoordinateSystem system=ModelToImage::NATIVE)
void toPolar(const float point[], float polar[])
static constexpr float m_ph