matrix_look_at_RH... non view-transform version?

Anything else CML-related (such as questions about how to use the library).

matrix_look_at_RH... non view-transform version?

Postby sprite » Sun Jun 28, 2015 4:44 am

matrix_look_at_RH gives me a view transform given an eye position, target position, and up vector. Is there a different function that gives me the actual camera transform directly from the same parameters (i.e. the inverse)?

(I think matrix_aim_at is nearly there, but it seems to aim the positive z axis at the target, instead of the negative z axis, and there's no _RH version...)

Thanks!
sprite
 
Posts: 6
Joined: Tue Jun 29, 2010 10:36 pm

Re: matrix_look_at_RH... non view-transform version?

Postby dnave » Mon Jun 29, 2015 1:41 pm

You could just compute the inverse using cml::inverse() or matrix<>::inverse(). Also, matrix_aim_at() is really independent of the coordinate system, so _RH() and _LH() probably wouldn't be useful.

If this isn't what you are looking for, please let me know.
Cheers, Demian
dnave
 
Posts: 113
Joined: Fri Jun 29, 2007 12:46 am
Location: Pittsburgh, PA


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron