Module | Joyau::Listener |
In: |
Drawable.cpp
|
This is only used when setting the listner’s position, just like you can set the others objects position.
Sets the audio listener’s direction.
/* call-seq: direction=(vector) Sets the audio listener's direction. */ VALUE Listener_directionOp(VALUE self, VALUE val) { Vector3f &ref = getRef<Vector3f>(val); alListener3f(AL_DIRECTION, ref.x,ref.y, ref.z); return val; }
Sets the audio listener’s position.
/* call-seq: Joyau::Listener.pos=(vector) -> Vector3f Sets the audio listener's position. */ VALUE Listener_posOp(VALUE self, VALUE val) { Vector3f &ref = getRef<Vector3f>(val); alListener3f(AL_POSITION, ref.x,ref.y, ref.z); return val; }
Sets the audio listener’s direction.
/* call-seq: setDirection(x, y, z) Sets the audio listener's direction. */ VALUE Listener_setDirection(VALUE self, VALUE x, VALUE y, VALUE z) { double _x = NUM2DBL(x); double _y = NUM2DBL(y); double _z = NUM2DBL(z); alListener3f(AL_DIRECTION, _x, _y, _z); return Qnil; }
Sets the audio listener’s orientation.
/* call-seq: setOrientation(atX, atY, at2, upX, upY, upZ) Sets the audio listener's orientation. */ VALUE Listener_setOrientation(VALUE self, VALUE atX, VALUE atY, VALUE atZ, VALUE upX, VALUE upY, VALUE upZ) { float args[6]; args[0] = NUM2DBL(atX); args[1] = NUM2DBL(atY); args[2] = NUM2DBL(atZ); args[3] = NUM2DBL(upX); args[4] = NUM2DBL(upY); args[5] = NUM2DBL(upZ); alListenerfv(AL_ORIENTATION, args); return Qnil; }
Sets the audio listener’s position.
/* call-seq: setPos(x, y, z) Sets the audio listener's position. */ VALUE Listener_setPos(VALUE self, VALUE x, VALUE y, VALUE z) { double _x = NUM2DBL(x); double _y = NUM2DBL(y); double _z = NUM2DBL(z); alListener3f(AL_POSITION, _x, _y, _z); return Qnil; }
Sets the audio listener’s velocity.
/* call-seq: setVelocity(x, y, z) Sets the audio listener's velocity. */ VALUE Listener_setVelocity(VALUE self, VALUE x, VALUE y, VALUE z) { double _x = NUM2DBL(x); double _y = NUM2DBL(y); double _z = NUM2DBL(z); alListener3f(AL_VELOCITY, _x, _y, _z); return Qnil; }