Thank you, James.

On September 27, 2010 10:08:09 pm James Legg wrote:
> >   where are they implemented?
> 
> Right there: src/hugin1/PT/panorama.h, lines 149 to 152, and 158 to 161.

ok, I have used the wrong twem / not expressed myself well.  What I see in 
those lines (excuse my layman terms) is a convoluted way to pass the arguments 
on to the actual implementation.

 
> However, both use the HuginBase::RotatePanorama class[1], which has an
> overloaded constructor: it also handles Euler angles or a rotation
> matrix.

That's what I was meaning with "implemented".

src/hugin_base/algorithms/basic/RotatePanorama.cpp is what I was looking for.  
And I still have to make sense of it.

I see two fuctions in there - one that does the actual calculations (which I 
understand and thus can read), and another one that simply put the three Euler 
angles into a matrix after converting them to radians.  But how exactly does 
it work?  I mean who calls whom?

 
> >   is there one that should be preferred over the other?
> 
> The one with the easiest to supply arguments.

That's an answer I like to hear.

 
> If you are writing something for the Hugin GUI, you probably want to use
> PT::RotatePanoCmd[2] instead

yes, this I understood.  What I ma trying to do (which is probably trivial to 
you) is to expand the numeric transform in the fast preview window.  Currently 
we have rotate (yaw/pitch/roll) - I would like to have translate too (X/Y/Z).  
Today I bumped into a project where I would need translation.

My intention (correct me if I am wrong) is to implement PT::TranslatePanoCmd 
(pano, trx, try, trz).

To make it similar to HuginBase::RotatePanorama, I will have to implement a 
new class, HuginBase::TranslatePanorama ? does it make sense for such a small 
functionality? should I put it in its own file TranslatePanorama.cpp or is it 
better to add a new one, TranslatePanorama.cpp ?


> PT::RotatePanoCmd could be extended to support a rotation matrix in its
> constructor instead of Euler angles.

or should I extend PT::RotatePanoCmd to support also translation?
 

> [1]
> http://hugin.sourceforge.net/docs/html/classHuginBase_1_1RotatePanorama.html

yes, the doxygen documentaiton is good to point details, but we still need 
some "higher up" description to guide newbies and occasional contributors.  A 
top down approach that is human enough not to scare people...

Yuv

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to