|Re: [eigen] about Transform API|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] about Transform API
- From: "Thomas Vaughan" <tevaughan@xxxxxxxxx>
- Date: Wed, 27 Aug 2008 10:02:04 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=wmMXgrv4aiCEVdgOEG68fBUzAmSsT8txrwUlsgo1qgU=; b=bqcAoZSLlSdXYWqQnaviAR3Tm9tCLU6ci/XNU4mGzBmifQ1PpfgBI9aS1FHirb12HI gu6BCpOxHLEytFMxo6JQljisImdB4cNflkBJYU/UDJctpfiim6Ez+w0W2LMC6WTZB+S0 6nrsPhpj4uXwUJ6+0udTHLJeCF31jocsk8eG8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=fBVOuF5c1Ym6W+8ACKCk3Osc1FR7afY2fQ4cQTxn++DMugCiziOrHy+5Mg+Fmc/qdz mhqRLMI9uDg7/FFRmAEMy9rHeXBglBefFYXv0WrZq3b+/Qm67o6PCXwBp6rfLhMRTJlk oLY1BTxsQzMd0dY3oENsvLWqANXemhec6aRjk=
On Wed, Aug 27, 2008 at 9:32 AM, Gael Guennebaud
> in my imagination, Scale and Translation would be new types with
> appropriate operator *... Internally they would store a Vector.
> An example:
> Translation() * v;
> will actually be compiled to a single vector addition ! (That means
> that Translation really means TranslationTransform and not
Oh, I see! That's a bit more complexity in the library source, but it's
> explicit constructors from vectors will also be part of the game. In
> particular I don't want to enforce people to use these classes to
> store their translation vectors or non uniform scaling factors (see
> the story about Point vs Vector).
Yes, yes. I know. :^)
> So one could use these classes only to "type" their vector/array to
> create a Transform object:
> T = Scale(a_vector_considered_as_a_generic_array) *
Your Translation type naturally takes a displacement vector in the
> so currently we have 1.75 pts versus 0.25 .... yeah, I count myself
> for 0.75 in favor of that idea, 0.25 against because I'm a bit afraid
> that will lead to the same unnecessary mess as having a Point type
For the Point type there is the inconvenience of converting to
displacement vectors (from a particular origin Point) when there is a
large number of Points.
I don't see an analogous drawback in the usage of this Transform API.
That is, I thought that we had established that the implementation of
Point was not really the problem, but that the usage of the library
would be difficult in some circumstances.
Thomas E. Vaughan
There are only two kinds of people; those who accept dogma and know it,
and those who accept dogma and don't know it. - G.K. Chesterton