40 #define conditional_set(variable, value) \
41 if (image.variable##isLinked())\
44 while (j < i && !image.variable##isLinkedWith(panorama.getImage(j)))\
48 if (j == i) copy.set##variable(value);\
50 copy.set##variable(value);\
59 double y = image.getYaw();
60 double p = image.getPitch();
61 double r = image.getRoll();
64 DEBUG_DEBUG(
"rotation matrix (PT) for img " << i <<
" << ypr:" << y <<
" " << p <<
" " << r << std::endl << mat);
66 rotated = transformMat * mat;
67 DEBUG_DEBUG(
"rotation matrix after transform: " << rotated);
72 DEBUG_DEBUG(
"rotated angles of img " << i <<
": " << y <<
" " << p <<
" " << r);
78 if(image.getX()!=0.0 || image.getY()!=0.0 || image.getZ()!=0.0)
86 mat.SetRotationPT(
DEG_TO_RAD(image.getTranslationPlaneYaw()),
DEG_TO_RAD(image.getTranslationPlanePitch()), 0.0);
87 rotated = transformMat * mat;
general : Matrix3 is a class for handling 3x3 Matrix manipulation.
void GetRotationPT(double &Yaw, double &Pitch, double &Roll)
GetRotation in panotools style.
double TranslationPlanePitch
Vector3 TransformVector(const Vector3 &V) const
transforms a vector
void SetRotationPT(double yaw, double pitch, double roll)
set rotation in panotools style, code adapted from Panotools-Script by Bruno Postle ...
RotatePanorama(PanoramaData &panorama, const Matrix3 &transformMat)
virtual void setImage(std::size_t nr, const SrcPanoImage &img)=0
set a panorama image, counting starts with 0
double TranslationPlaneYaw
virtual const SrcPanoImage & getImage(std::size_t nr) const =0
get a panorama image, counting starts with 0
#define conditional_set(variable, value)
Matrix3 Inverse() const
return inverse if it exists, otherwise identity
virtual void imageChanged(unsigned int imgNr)=0
mark image change for maintainance
static void rotatePano(PanoramaData &panorama, const Matrix3 &transformMat)
general : Vector3 is a class for handling 3D Vectors manipulation.
double x
x,y,z coordinates, 0 at the initialisation
virtual std::size_t getNrOfImages() const =0
number of images.
All variables of a source image.