Boost logo

Boost :

From: Geoffrey Irving (irving_at_[hidden])
Date: 2006-06-14 17:19:39


On Wed, Jun 14, 2006 at 04:56:37PM -0400, Hickerson, David A wrote:
> I would suggest, not a vector3 or vector<3>, but to support math with 3D
> transformation matrices, which is 4x4 matrix, with a vector4 or
> vector<4>, if 3 space is the desired representation. When doing
> transformations to vectors, you must use 1 dimension high than the level
> you are working in. If done properly, quaterion support can also be
> obtained, which is another way to represent rotations of vectors.
>
> I believe we need these contruct to work together in a complete
> solution, not just a piece.

I suppose no one said it explicitly, but I'm pretty sure everyone
who's been talking about vector<3> was actually talking about a
general vector<d> template.

And it is not true that "when doing transformations on vectors, you
must use 1 dimension higher than the level you are working in." That
is only true if you want to support both affine and projection maps
at the same time. If you happen to know you only need affine (or less),
using full 4x4 matrices is slow, unintuitive, and mathematically
imprecise.

Geoffrey


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