22 #ifndef CRYOMNI3D_OMNI3D_H 23 #define CRYOMNI3D_OMNI3D_H 25 #include "graphics/surface.h" 31 Omni3DManager() : _vfov(0), _alpha(0), _beta(0), _xSpeed(0), _ySpeed(0), _alphaMin(0), _alphaMax(0),
32 _betaMin(0), _betaMax(0), _helperValue(0), _dirty(
true), _dirtyCoords(
true),
33 _sourceSurface(
nullptr) {}
36 void init(
double hfov);
38 void setSourceSurface(
const Graphics::Surface *surface) { _sourceSurface = surface; _dirty =
true; }
40 void clearConstraints();
41 void setAlphaConstraints(
double alphaMin,
double alphaMax) { _alphaMin = alphaMin; _alphaMax = alphaMax; }
42 void setBetaMinConstraint(
double betaMin) { _betaMin = betaMin; }
43 void setBetaMaxConstraint(
double betaMax) { _betaMax = betaMax; }
45 void setAlpha(
double alpha) { _alpha = alpha; _dirtyCoords =
true; }
46 void setBeta(
double beta) { _beta = beta; _dirtyCoords =
true; }
47 void updateCoords(
int xDelta,
int yDelta,
bool useOldSpeed);
49 double getAlpha()
const {
return _alpha; }
50 double getBeta()
const {
return _beta; }
54 bool hasSpeed() {
return _xSpeed != 0. || _ySpeed != 0.; }
55 bool needsUpdate() {
return _dirty || _dirtyCoords; }
59 void updateImageCoords();
64 double _xSpeed, _ySpeed;
66 double _alphaMin, _alphaMax;
67 double _betaMin, _betaMax;
69 int _imageCoords[2544];
70 double _squaresCoords[31][21];
71 double _hypothenusesH[31];
73 double _oppositeV[21];
Definition: cryomni3d.h:62