RE: [AD] Proposal for new matrix functions

[ Thread Index | Date Index | More Archives ]

> -----Oorspronkelijk bericht-----
> Van: alleg-developers-admin@xxxxxxxxxx
> [mailto:alleg-developers-admin@xxxxxxxxxx Ben Davis
> Verzonden: maandag 17 maart 2003 11:07
> Aan: alleg-developers@xxxxxxxxxx
> Onderwerp: Re: [AD] Proposal for new matrix functions
> 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 ;-).

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

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.

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

Which does a full 4x4 mult? pass (0, 0, 0, 1) as the first four arguments,
and you have the equivalent of apply_matrix_translation(..), etc.
Pass (x, y, z, 0) and you have apply_matrix_rotation. How about that Eric?

NB: We could also change Allegro's cheating by making the matrix structure
a full 4x4 one. (currently it assumes the fourth row to be (0, 0, 0, 1)).

Or would this break compatibility?

Anyways, if it does, we could still have a cheating apply_matrix_4x4 :-).

-- Marcel

Mail converted by MHonArc 2.6.19+