Added another sconv scene

master
Martin Felis 2021-11-16 15:26:01 +01:00
parent b521474b10
commit 384293a853
1 changed files with 18 additions and 1 deletions

View File

@ -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;
};