From 2894d2f9e4e2a646116836aa2b471c33fbba85f5 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sat, 5 Mar 2022 20:33:23 -0500 Subject: Implement movement in spatial objects --- include/xas/spatial.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/xas') diff --git a/include/xas/spatial.h b/include/xas/spatial.h index ed5157a..f8591df 100644 --- a/include/xas/spatial.h +++ b/include/xas/spatial.h @@ -47,7 +47,11 @@ struct _xas_spatial_object { void *ctx; int flags; - xas_spatial_coord point; + xas_spatial_coord point, + heading; + + float speed; + xas_spatial_object *next; }; @@ -120,6 +124,16 @@ int xas_spatial_object_stop(xas_spatial_object *object); void xas_spatial_object_get_point(xas_spatial_object *object, xas_spatial_coord *point); +float xas_spatial_object_get_speed(xas_spatial_object *object); + +void xas_spatial_object_set_speed(xas_spatial_object *object, float speed); + +void xas_spatial_object_get_heading(xas_spatial_object *object, + xas_spatial_coord *heading); + +void xas_spatial_object_set_heading(xas_spatial_object *object, + xas_spatial_coord heading); + xas_audio_stream *xas_spatial_scene_stream_new(xas_spatial_scene *scene, size_t buffer_size); -- cgit v1.2.3