Boost logo

Boost :

Subject: Re: [boost] [geometry] few questions
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2010-04-23 09:34:42


Barend Gehrels said: (by the date of Fri, 23 Apr 2010 09:19:51 +0200)

> No. The 3D is implemented in the design but there is hardly any
> implementation. 3D points and boxes can be defined. 3D distances can be
> calculated. There is some more but the operations you ask for are not
> yet implemented.
>
> The sphere is moved to an extension. The other geometries you mention
> are not (yet) there. We concentrate on finishing the part for first
> inclusion into Boost first.

I see. I asked to get the picture about current state of matters. Now
that it is as you tell me, I think that the best thing for me, is to
focus on 3d vectors and quaternions. I'll be implementing the 3D
shapes on my own, as I need them. (I have plenty of old code with
such things, lying around, but never enough time to clean it up).

> > Also I wanted to ask about 3D points regarded as vectors. Can I add
> > and subtract them? What about 3D vector cross product. What about dot
> > product? I guess that I need to write that 'very old formula'
> > function myself?
> >
> This is possible: seeing 3D points as vectors, adding and subtracting
> indeed. Dot product in any dimension; cross product in 2 and 3 dimensions.

this would be great. From Emil's answer I hope that this in fact
already is going to work. See my other reply that I've just sent.

> So these things should be possible, however the calculation of the
> rotation about an arbitrary axis was in draft and not yet in the SVN. If
> wished I can add this once. On the other hand a link with
> boost::quaternion sounds also as an attractive alternative.

I believe that using boost::quaternion is the best way to go. Maybe
Emil's extensions to it are just enough?

-- 
Janek Kozicki                               http://janek.kozicki.pl/  |

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk