[eigen] Re: Translation times Rotation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Re: Translation times Rotation
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Mon, 18 Jul 2011 19:39:44 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=PqWeFP4D8/Y8P71T/heivcgwlRgI2proOVXJMkdlSOE=; b=NpniPjt7xHHCiwEhavr0lZSNM1GIl1Lv5uRa1nfgE9aEv298TTgBJ2ZMfaZzITsAXS OGx7SrAPsx0p688Oub6ND5PnHDUb3qKhXDJNM+pj7befxyPtLMTndnIh56T5KqtGQ+/B U3Ca6kP1zWawzj+6P6iDzyrFczCN5Kn6Ffleo=
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
>