struct

Tryst::SDL::Point3D

Inherits Struct < Value < Object

A point in the space a track can be placed in.

Right-handed, the way OpenGL and OpenAL are: x runs right, y runs up, z runs back toward the listener. The listener is always at the origin and cannot be moved, so these are positions relative to whoever is hearing them.

Distance from the origin attenuates - further is quieter - so Point3D.new(x: 50, y: 0, z: 0) is off to the right and faint, while x: 1 is off to the right and close.

Constructors

from_unsafe(point : LibSDLMixer::Point3D) : Point3D

@api private

Source
new(x : Float32 = 0.0_f32, y : Float32 = 0.0_f32, z : Float32 = 0.0_f32)
Source
new(x : Number = 0, y : Number = 0, z : Number = 0)
Source

Instance methods

clone
Source
copy_with(x _x = @x, y _y = @y, z _z = @z)
Source
to_unsafe
Source
x
y
z