Geometry

Functions

IPLVector3 iplCalculateRelativeDirection(IPLContext context, IPLVector3 sourcePosition, IPLVector3 listenerPosition, IPLVector3 listenerAhead, IPLVector3 listenerUp)

Calculates the relative direction from the listener to a sound source.

The returned direction vector is expressed in the listener’s coordinate system.

Parameters
  • context – The context used to initialize Steam Audio.

  • sourcePosition – World-space coordinates of the source.

  • listenerPosition – World-space coordinates of the listener.

  • listenerAhead – World-space unit-length vector pointing ahead relative to the listener.

  • listenerUp – World-space unit-length vector pointing up relative to the listener.

Returns

A unit-length vector in the listener’s coordinate space, pointing from the listener to the source.

Structures

struct IPLVector3

A point or vector in 3D space.

Steam Audio uses a right-handed coordinate system, with the positive x-axis pointing right, the positive y-axis pointing up, and the negative z-axis pointing ahead. Position and direction data obtained from a game engine or audio engine must be properly transformed before being passed to any Steam Audio API function.

Public Members

IPLfloat32 x

The x-coordinate.

IPLfloat32 y

The y-coordinate.

IPLfloat32 z

The z-coordinate.

struct IPLMatrix4x4

A 4x4 matrix used to represent an affine transform.

Public Members

IPLfloat32 elements[4][4]

Matrix elements, in row-major order.

struct IPLBox

An axis-aligned box.

Axis-aligned boxes are used to specify a volume of 3D space.

Public Members

IPLVector3 minCoordinates

The minimum coordinates of any vertex.

IPLVector3 maxCoordinates

The maximum coordinates of any vertex.

struct IPLSphere

A sphere.

Spheres are used to define a region of influence around a point.

Public Members

IPLVector3 center

The center.

IPLfloat32 radius

The radius.

struct IPLCoordinateSpace3

A 3D coordinate system, expressed relative to a canonical coordinate system.

Public Members

IPLVector3 right

Unit vector pointing to the right (local +x axis).

IPLVector3 up

Unit vector pointing upwards (local +y axis).

IPLVector3 ahead

Unit vector pointing forwards (local -z axis).

IPLVector3 origin

The origin, relative to the canonical coordinate system.