Added another sconv scene
parent
b521474b10
commit
384293a853
|
@ -624,6 +624,22 @@ struct SconvHullScene {
|
||||||
simd4x4f_matrix_mul(&translation, &rot, &mHullB.transform);
|
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() {
|
void init() {
|
||||||
sch_create_unitbox(&mHullA.hull);
|
sch_create_unitbox(&mHullA.hull);
|
||||||
mHullA.createMesh();
|
mHullA.createMesh();
|
||||||
|
@ -631,7 +647,8 @@ struct SconvHullScene {
|
||||||
sch_create_unitbox(&mHullB.hull);
|
sch_create_unitbox(&mHullB.hull);
|
||||||
mHullB.createMesh();
|
mHullB.createMesh();
|
||||||
|
|
||||||
setupSceneEdgeCollision();
|
// setupSceneEdgeCollision();
|
||||||
|
setupRotatedBoxes();
|
||||||
|
|
||||||
mCurrentHull = &mHullA;
|
mCurrentHull = &mHullA;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue