Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to rotate a vector around a direction...

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to rotate a vector around a direction...


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Subject: Re: [cgal-discuss] How to rotate a vector around a direction...
  • Date: Fri, 28 Oct 2011 08:34:04 +0200 (CEST)

On Thu, 27 Oct 2011, damian wrote:

I find the manual's description on Aff_transformation_2 quite unhelpful and
it is even sparser for Aff_transformation_3.
If I've got a direction Direction_3 object and want to rotate another
Vector_3-object around that Direction, how do I manage that?

It looks like there is no convenient constructor for this. The best you can do is compute the transformation matrix yourself and feed its coefficients to Aff_transformation_3. Note that you can do it in several steps, first a change of basis so that your Direction_3 is the new z-axis, then the rotation, then the inverse of the first change, and multiply (aka compose) the 3 transformations.

--
Marc Glisse



Archive powered by MHonArc 2.6.16.

Top of Page