Re: [AD] Proposal for new matrix functions

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


> > How about apply_matrix_no_translation()?
> >
> > Or apply_matrix_relative(), since you'll probably apply it to
> > relative vectors
> > like normals rather than absolute ones like points?
>
> Nah! That sounds even more horrible ;-).

Both of them? :)

> You mean directional vectors vs points.
> Well, spinning around points is a nice effect too you know.

Yep, I do know. Initialise stars at arbitrary, perhaps small, distance from 
origin; neglect the translation and they look infinitely distant.

> The matrix / vector functions should actually not make assumptions about
> the kind of stuff you pass it. Points, normals, it should all be the same.

They wouldn't make assumptions. It'd just be the name. I was only trying to 
suggest friendly names, since Allegro's current approach to matrices isn't 
exactly as formal as a schoolbook's approach to matrices is.

> How about a apply_matrix_4x4(float x, y, z, w, float* xout, float* yout,
> float* zout, float* wout);
[snip]

As already stated, Allegro only does 3x3 matrices with a direct hack for 
translation, as opposed to the rather obtuse conventional mathematical hack. 
It's a common theme: mathematicians tend to find really obtuse ways of doing 
things (like specifying the natural numbers entirely in terms of zero and a 
successor function). I think Allegro's direct approach to translation is not 
only more efficient, but easier to understand. It may be breaking convention, 
but if you're smart enough to understand the convention, you're smart enough 
to understand what Allegro does; I'd say the converse is not true.

Ben




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