[eigen] Re: conversions in geometry module |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Re: conversions in geometry module
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 6 Dec 2008 21:08:27 +0100
- 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=ORHMmm2lJrJpM4+bD7x+P6AZBSc/Uujz4riTq/YT9kA=; b=hC/WIEy3lCJ8PRJfsPuc/jLSde9EI8v/kWDtY6sXcWnKkm1FzqDc8zJdEUyE2JbMrg slPp2AofTkSYTZNSTOaZJZyiweMsplVqvqdI1iRvoXBbGTuDiIQEYXRZYA4nTN06eFQi kXz9RnnFImc+04vkMkPfjjBg1M4hM2TtPYTZg=
- 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=u4w8OkyxFMRVMX3UR95isJwMNCtv6xcdiTfTsOAEe/UZJrQCSwk3dAy3ZyNkTRw3PA Hxsf5mzspkcEWuiz56Xxp6lt1K7X5GLQe1P66T88jc9YAJW0FWDSj5b+I62uy65oyq8V Fl5wThjEgv+VB0Ud3ZTsJjg2pflH5umjInyB0=
specifically, he tried to do:
Eigen::Transform3f t = Eigen::Translation3f(1.0f, 2.0f, 0.0f);
and that failed to compile because gcc wanted to use a conversion
constructor here.
Instead with current Eigen he has to do
Eigen::Transform3f t;
t = Eigen::Translation3f(1.0f, 2.0f, 0.0f);
I'd fix it myself but I want to make sure it's not conflicting with
another design aspect...
Cheers,
Benoit
2008/12/6 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Hi Gael,
>
> today a user on IRC was puzzled because Translation's couldn't be
> casted to Transform's.
>
> Is there any specific reason why the Transform class doesn't have (at
> least explicit) constructors taking Translation?
> Same question for Rotation types, etc?
>
> Any opinion on whether such constructors should be explicit? (Somehow
> if have a rough feeling that they should)
>
> Cheers,
> Benoit
>
---