Re: [AD] Proposal for new matrix functions

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


> apply_matrix_vectorial is not a good name as well.. a 4D vector is
> a vector as well ;-).

Don't forget that the transformations represented by Allegro matrices are 
applied to 3d points externally and that they are affine transformations in 
the 3d space. So mathematically it makes sense to speak of their underlying 
vectorial part and of their affine-only part.

> As for the affine part, noone will understand that one :D.
> Apply_matrix_translation more or less says what is does.

Yes, applix_matrix_translation() is probably fine.

> I think apply_matrix3 is not chosen that badly. Eg, you could have
> another function called apply_matrix4 that lets you explicitly define the
> 4th value of the vector (w). Not that this makes much sense though. The
> only common values for w are 0 and 1. 1 is covered by apply_matrix and 0
> by apply_matrix3. OpenGL for example lets you explicitly define the w
> components when you create lights. In the Win32-OpenGL docs it says
> pass 0 if you want a directional light, and 1 if you want a positional
> one. (1 adds the translocation, 0 does the rotation only - of course
> OpenGL checks if w is 0 or not too, to toggle between positional and
> directional, but I hope you get the idea...).

The interface of the matrix API is 3d, whatever its internal representation 
is. So I think it would be very confusing for the user to have both 
apply_matrix() and apply_matrix3().

-- 
Eric Botcazou




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