COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

rotate

• Email
• Follow

```Hi
could i use glrotatef for setting openal sound positions?

how to rotate two sounds, one in front and one behind a given x,y,z
point?

float vX=10,vY=1,vZ=1; // in front back would be -10?
alSource3f(Sources[1], AL_POSITION, lX/10+vX, lY/10+vY, lZ/10+vZ); //
not working lX etc. are local coordinates

Thanks

```
 0
Reply ahso47 (55) 5/23/2012 9:31:38 AM

See related articles to this posting

```On Wednesday, May 23, 2012 5:31:38 AM UTC-4, ahso wrote:
> Hi
> could i use glrotatef for setting openal sound positions?

No.

> how to rotate two sounds, one in front and one behind a given x,y,z
> point?
>
> float vX=10,vY=1,vZ=1; // in front back would be -10?

This suggests that you think glRotatef modifies vX, vY and vZ.
This is not true; glRotatef uses an angle (pPsi) and a vector
(vX,vY,vZ) to modify the current matrix by applying a rotation
of the given angle around the vector.

> alSource3f(Sources[1], AL_POSITION, lX/10+vX, lY/10+vY, lZ/10+vZ); //
> not working lX etc. are local coordinates

You need to compute the rotated positions yourself.

--
Andy V
```
 0

1 Replies
96 Views

Similar Articles

12/7/2013 12:37:26 AM
[PageSpeed]