This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Forward vector from Affine3f

Tags: None
(comma "," separated)
mmarcin
Registered Member
Posts
9
Karma
0

Forward vector from Affine3f

Tue Dec 06, 2011 2:01 am
Is there an easy way to extract the forward vector from an Affine3f?

Is transform.matrix().block<1,3>( 2, 0 ) the best I can do?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Forward vector from Affine3f

Tue Dec 06, 2011 10:44 am
mmarcin
Registered Member
Posts
9
Karma
0

Re: Forward vector from Affine3f

Tue Dec 06, 2011 4:57 pm
I see it but isn't that the translation (4th column) not the forward vector (3rd column)?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Forward vector from Affine3f

Tue Dec 06, 2011 7:15 pm
oh, then t.affine().col(2) is what you want
mmarcin
Registered Member
Posts
9
Karma
0

Re: Forward vector from Affine3f

Tue Dec 06, 2011 8:26 pm
Perfect thanks!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]