| Class | Joyau::AudioObject |
| In: |
Drawable.cpp
|
| Parent: | Object |
This class is not here to be instancied, but rather for generic method used on Sound as well as on Stream.
Sets an audio object’s direction.
/*
call-seq: direction=(vector)
Sets an audio object's direction.
*/
VALUE AudioObject_setDirectionVector(VALUE self, VALUE val)
{
if (!rb_obj_is_kind_of(val, getClass("Vector3f")))
rb_raise(rb_eTypeError, "Can't convert %s into Joyau::Vector3f",
rb_obj_classname(val));
AudioObject &ref = getRef<AudioObject>(self);
Vector3f &vector = getRef<Vector3f>(val);
ref.setDirection(vector);
return val;
}
Returns whether the object is playing.
/*
call-seq: object.playing?
Returns whether the object is playing.
*/
VALUE AudioObject_playing(VALUE self)
{
AudioObject &ref = getRef<AudioObject>(self);
if (ref.playing())
return Qtrue;
return Qfalse;
}
Sets an audio object’s position.
/*
call-seq:
object.direction=(vector) -> Vector3f
Sets an audio object's position.
*/
VALUE AudioObject_setPosVector(VALUE self, VALUE val)
{
if (!rb_obj_is_kind_of(val, getClass("Vector3f")))
rb_raise(rb_eTypeError, "Can't convert %s into Joyau::Vector3f",
rb_obj_classname(val));
AudioObject &ref = getRef<AudioObject>(self);
Vector3f &vector = getRef<Vector3f>(val);
ref.setPos(vector);
return val;
}
Sets an audio object’s direction.
/*
call-seq:
object.setDirection(x, y, z) -> nil
Sets an audio object's direction.
*/
VALUE AudioObject_setDirection(VALUE self, VALUE x, VALUE y, VALUE z)
{
AudioObject &ref = getRef<AudioObject>(self);
double _x = NUM2DBL(x);
double _y = NUM2DBL(y);
double _z = NUM2DBL(z);
ref.setDirection(_x, _y, _z);
return Qnil;
}
Sets an audio object’s position.
/*
call-seq: setPos(x, y, z)
Sets an audio object's position.
*/
VALUE AudioObject_setPos(VALUE self, VALUE x, VALUE y, VALUE z)
{
AudioObject &ref = getRef<AudioObject>(self);
double _x = NUM2DBL(x);
double _y = NUM2DBL(y);
double _z = NUM2DBL(z);
ref.setPos(_x, _y, _z);
return Qnil;
}
Sets an audio object’s velocity.
/*
call-seq: setVelocity(x, y, z)
Sets an audio object's velocity.
*/
VALUE AudioObject_setVelocity(VALUE self, VALUE x, VALUE y, VALUE z)
{
AudioObject &ref = getRef<AudioObject>(self);
double _x = NUM2DBL(x);
double _y = NUM2DBL(y);
double _z = NUM2DBL(z);
ref.setVelocity(_x, _y, _z);
return Qnil;
}
Sets an audio object’s velocity.
/*
call-seq: velocity=(vector)
Sets an audio object's velocity.
*/
VALUE AudioObject_setVelocityVector(VALUE self, VALUE val)
{
if (!rb_obj_is_kind_of(val, getClass("Vector3f")))
rb_raise(rb_eTypeError, "Can't convert %s into Joyau::Vector3f",
rb_obj_classname(val));
AudioObject &ref = getRef<AudioObject>(self);
Vector3f &vector = getRef<Vector3f>(val);
ref.setVelocity(vector);
return val;
}