RE: [AD] Proposal for new matrix functions |

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

*To*: <alleg-developers@xxxxxxxxxx>*Subject*: RE: [AD] Proposal for new matrix functions*From*: "Marcel Smit" <marcel.athlon@xxxxxxxxxx>*Date*: Mon, 17 Mar 2003 09:30:50 +0100

> -----Oorspronkelijk bericht----- > Van: alleg-developers-admin@xxxxxxxxxx > [mailto:alleg-developers-admin@xxxxxxxxxx Eric > Botcazou > Verzonden: maandag 17 maart 2003 7:55 > Aan: alleg-developers@xxxxxxxxxx > Onderwerp: Re: [AD] Proposal for new matrix functions > > > > Hehe, forgot a word there. Should have read "to change apply_...". > > I don't like apply_matrix3 very much either... I think that the > most correct > naming would be apply_matrix_vectorial() and > apply_matrix_affine() but I'm > not sure whether such names would be as easily understood as > apply_matrix_rotation_and_scaling() and apply_matrix_translation(). apply_matrix_vectorial is not a good name as well.. a 4D vector is a vector as well ;-). As for the affine part, noone will understand that one :D. Apply_matrix_translation more or less says what is does. 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...). apply_matrix is like apply_matrix4 in that case, but implicitly sets w to 1. Anyone did a design of Allegro5's matrix/vector functions yet? Maybe whe should strive to make them compatible with OpenGL... True 4x4 matrices (it really doesn't matter nowadays with 3DNow etc), true 4D vectors (with optional 3D vector of course), etc, etc. -- Marcel

**Follow-Ups**:**Re: [AD] Proposal for new matrix functions***From:*Eric Botcazou

**References**:**Re: [AD] Proposal for new matrix functions***From:*Eric Botcazou

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [AD] Proposal for new matrix functions** - Next by Date:
**Re: [AD] Proposal for new matrix functions** - Previous by thread:
**Re: [AD] Proposal for new matrix functions** - Next by thread:
**Re: [AD] Proposal for new matrix functions**

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