[AD] [ alleg-Feature Requests-2842561 ] [primitives addon] inverse transform and current transform

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Feature Requests item #2842561, was opened at 2009-08-22 14:37
Message generated for change (Tracker Item Submitted) made by neobrain
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355665&aid=2842561&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Tony (neobrain)
Assigned to: Nobody/Anonymous (nobody)
Summary: [primitives addon] inverse transform and current transform

Initial Comment:
Hi,
Even though A5 is probably not meant to support all different kinds of matrix operations, I think adding a al_inverse_transform and al_current_transform functions is a good idea:
For example, in my current project I'm transforming the whole scene with a translation+rotation matrix and when the user presses a mouse button, I need to transform the mouse coordinates back into global coordinates which is quite uncomfortable without inverse matrices. Also, to get the current transform I always have to keep a copy of the current ALLEGRO_TRANSFORM around and add an additional GetTransform call to my project. While this is not really painfull, having an Allegro function for this would be much handier ;)

The prototypes of the functions would look like this:
int al_inverse_transform(ALLEGRO_TRANSFORM *transform); /* returning 0 if the inverse is undefined */
void al_current_transform(ALLEGRO_TRANSFORM *transform; /* this would just al_copy_transform _al_global_trans */


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355665&aid=2842561&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/