Re: [eigen] Re: Translation times Rotation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Re: Translation times Rotation
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 19 Jul 2011 09:16:12 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=qJZ/WZY3StM0xdtHLKnbXs0rPU46p3eFRx9ggs442X4=; b=fFGKbqLLFmbbROSWZkxzXYi5nN4IWBzSO/hrGEjwYLlxBEb7sdDxZCcm1Mjp2a7gCS 7I8mNzSulkn9SpbOXmd4a+DHwQaXKHzIQFw+alXigsGobHasTCOqOrdRU+dNwEJLOfP8 u3yRVTTEdPnqZlnKF94jl2MbIqALgzsSJ4d9s=
this would make more sense, so I agree.
gael
On Mon, Jul 18, 2011 at 7:39 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> Ok, it needs to be a little bit different:
>
> template<typename Derived>
> inline IsometryTransformType operator*(const
> RotationBase<Derived,Dim>& r) const
> {
> IsometryTransformType res;
> res.matrix().setZero();
> res.linear() = r.toRotationMatrix().derived();
> res.translation() = m_coeffs;
> res.matrix().row(Dim).setZero();
> res(Dim,Dim) = Scalar(1);
> return res;
> }
>
> Here, it's working...
>
> - Hauke
>
> On Mon, Jul 18, 2011 at 7:22 PM, Hauke Heibel
> <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>> Hi guys,
>>
>> would anybody mind if I changed
>>
>> template<typename Derived>
>> inline AffineTransformType operator*(const RotationBase<Derived,Dim>& r) const
>> { return *this * r.toRotationMatrix(); }
>>
>> in the Translation class to
>>
>> template<typename Derived>
>> inline Transform<Scalar,Dim,Isometry> operator*(const
>> RotationBase<Derived,Dim>& r) const
>> { return *this * r.toRotationMatrix(); }
>>
>> ??
>>
>> I have a function in which I want to create a random
>> Transform<Scalar,Dim,Isometry> but returning a product of
>>
>> Translation<...> * Rotation2D
>>
>> does not work because of the issue above.
>>
>> Regards,
>> Hauke
>>
>
>
>