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.

Methods

Public Class methods

Sets the audio listener’s direction.

[Source]

/*
  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.

[Source]

/*
  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.

[Source]

/*
  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.

[Source]

/*
  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.

[Source]

/*
  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.

[Source]

/*
  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;
}

Sets the audio listener’s velocity.

[Source]

/*
  call-seq:
    Joyau::Listener.velocity=(vector) -> Vector3f

  Sets the audio listener's velocity.
*/
VALUE Listener_velocityOp(VALUE self, VALUE val)
{
   Vector3f &ref = getRef<Vector3f>(val);
   alListener3f(AL_VELOCITY, ref.x,ref.y, ref.z);

   return val;
}

[Validate]