From 93e7cae6b062b84e048681799ffb685024687606 Mon Sep 17 00:00:00 2001 From: spatialfree Date: Mon, 2 Dec 2024 15:07:31 -0500 Subject: [PATCH] virtual world hierarchy pose --- src/Arts.cs | 15 ++++++++------- src/Mono.cs | 3 +++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Arts.cs b/src/Arts.cs index aec17c3..850b4a8 100644 --- a/src/Arts.cs +++ b/src/Arts.cs @@ -44,13 +44,11 @@ static class Arts public static void Frame() { - bool vr = Device.DisplayBlend == DisplayBlend.Opaque; - // render hands if not in mixed reality - Input.HandVisible(Handed.Max, false); - if (vr) - { - // background standin if no passthrough - } + // Input.HandVisible(Handed.Max, false); + + // world + Matrix m4_world = Mono.world_pose.ToMatrix(); + Hierarchy.Push(m4_world); meshes["Food"].Draw( mat_mono, @@ -76,6 +74,9 @@ static class Arts ); } + Hierarchy.Pop(); + + // menu Matrix m4_menu = Mono.menu_pose.ToMatrix(Mono.menu_scale); Hierarchy.Push(m4_menu); diff --git a/src/Mono.cs b/src/Mono.cs index 73992df..fd61364 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -9,6 +9,8 @@ static class Mono public static int score; + public static Pose world_pose; + public static DeltaBool menu; public static Pose menu_pose; public static float menu_scale; @@ -24,6 +26,7 @@ static class Mono public static void Init() { game_time = 0.0; + world_pose = new(0, 0, 0); menu = new(true); menu_pose = new(0, 0, 0); menu_scale = 1 * U.cm;