From 384293a853a3ac3f3a10ed35026077c4f194daf6 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Tue, 16 Nov 2021 15:26:01 +0100 Subject: [PATCH] Added another sconv scene --- src/vissim.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/vissim.cc b/src/vissim.cc index b3f76ca..f73d01d 100644 --- a/src/vissim.cc +++ b/src/vissim.cc @@ -624,6 +624,22 @@ struct SconvHullScene { simd4x4f_matrix_mul(&translation, &rot, &mHullB.transform); } + void setupRotatedBoxes () { + simd4x4f trans_A; + simd4x4f trans_B; + simd4x4f_axis_rotation (&trans_A, M_PI / 180.0f * 45.f, simd4f_create(0.f, 0.f, 1.f, 1.f)); + + simd4x4f rot_B; + simd4x4f_axis_rotation (&rot_B, M_PI / 180.0f * 45.f, simd4f_create(0.f, 1.f, 0.f, 1.f)); + simd4x4f translation_B; + simd4x4f_translation (&translation_B, sqrt(2.f) + 0.001, 0.f, 0.f); + + simd4x4f_matrix_mul (&translation_B, &rot_B, &trans_B); + + mHullA.transform = trans_A; + mHullB.transform = trans_B; + } + void init() { sch_create_unitbox(&mHullA.hull); mHullA.createMesh(); @@ -631,7 +647,8 @@ struct SconvHullScene { sch_create_unitbox(&mHullB.hull); mHullB.createMesh(); - setupSceneEdgeCollision(); + // setupSceneEdgeCollision(); + setupRotatedBoxes(); mCurrentHull = &mHullA; };