AL_ORIENTATION

Started by xzero, October 09, 2003, 20:22:11

Previous topic - Next topic

xzero

Hi!

The OpenAL 1.0 specification says:  ORIENTATION is a pair of 3-tuples representing the 'at' direction vector and 'up' direction of the Object in Cartesian space.
AL expects two vectors that are orthogonal to each other. These vectors are not expected to be normalized.
If one or more vectors have zero length, implementation behavior is undefined. If the two vectors are linearly dependent, behavior is undefined.

The LWJGL has only three methods  to change the Listener attributes:
void alListener3f(int pname, float v1, float v2, float v3)
void alListenerf(int pname, float value)
void alListeneri(int pname, int value)

But the AL_ORIENTATION attribute need six float values, the three first for the 'at' direction and the other three for the 'up' direction.

I think that you have to implement the alListenerfv(....), which is the only way to set the AL_ORIENTATION attribute.

--------------------------------------------------------------------
Listener Orientation:

Name          Signature    Values             Default
ORIENTATION    fv         any except NaN      { { 0.0f, 0.0f, -1.0f }, { 0.0f, 1.0f, 0.0f } }
--------------------------------------------------------------------
The C specification:

ALvoid alListenerfv(ALenum pname, ALfloat *values);

pname       The name of the attribute to be set:
         AL_POSITION
         AL_VELOCITY
         AL_ORIENTATION

*values      Pointer to floating point-vector values
---------------------------------------------------------------------
zero
zDimensions - GREECE

Matzon

Hmm, you might actually have a point there... looking into it...

princec

I'm sure we had that method before... did it get deleted accidentally when we were doing the buffer thing? Maybe I did it...

Cas :)

xzero

Why you didn't fixed this in lwjgl 0.8?
zero
zDimensions - GREECE

princec

<fx: points finger at Matzon>He's in charge of OpenAL!</fx> :P

Cas :)

Matzon

blah, I've been quite busy the last 2 months, since I changed job. I haven't forgotten it though!
I imagine we'll do a 0.8.1, and I'll have it in then.

when 0.8.1 is out I don't know, but not too far away - it basically depends on os x status.

Matzon

fixed, and comitted - called
alListener(int property, FloatBuffer values);
alSource(int source, int propery, FloatBuffer values);

Matzon

added org.lwjgl.test.openal.PositionTest to test it