test
This commit is contained in:
@@ -131,6 +131,18 @@ void Rubiks::run() {
|
|||||||
ImGui::SliderFloat("cam y", &camPos.y, -10.0f, 10.0f);
|
ImGui::SliderFloat("cam y", &camPos.y, -10.0f, 10.0f);
|
||||||
ImGui::SliderFloat("cam z", &camPos.z, -10.0f, 10.0f);
|
ImGui::SliderFloat("cam z", &camPos.z, -10.0f, 10.0f);
|
||||||
|
|
||||||
|
ImGui::Text("Rubiks Cube Properties");
|
||||||
|
|
||||||
|
ImGui::SliderFloat("cube pitch", &rot.x, -glm::pi<float>(), glm::pi<float>());
|
||||||
|
ImGui::SliderFloat("cube yaw", &rot.y, 0, 2 * glm::pi<float>());
|
||||||
|
ImGui::SliderFloat("cube roll", &rot.z, -glm::pi<float>(), glm::pi<float>());
|
||||||
|
|
||||||
|
ImGui::SliderFloat("cube x", &pos.x, -10.0f, 10.0f);
|
||||||
|
ImGui::SliderFloat("cube y", &pos.y, -10.0f, 10.0f);
|
||||||
|
ImGui::SliderFloat("cube z", &pos.z, -10.0f, 10.0f);
|
||||||
|
|
||||||
|
ImGui::SliderFloat("cube scale", &scale, 0.01f, 10.0f);
|
||||||
|
|
||||||
|
|
||||||
if(ImGui::Button("Reset Window Size")) {
|
if(ImGui::Button("Reset Window Size")) {
|
||||||
app->emitEvent(new Archimedes::ResizeWindowEvent(500, 500));
|
app->emitEvent(new Archimedes::ResizeWindowEvent(500, 500));
|
||||||
@@ -172,12 +184,6 @@ bool Rubiks::onEvent(const Archimedes::Event& e) {
|
|||||||
|
|
||||||
//camera.moveRel(glm::vec3(0.0f, 0.0f, event.dy));
|
//camera.moveRel(glm::vec3(0.0f, 0.0f, event.dy));
|
||||||
|
|
||||||
for(auto& b : rubiksCube.getBlocks()) {
|
|
||||||
b.scaleAdd(0.1f * event.dy);
|
|
||||||
std::cout << b.getScale() << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << std::endl;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else if(type == app->getEventType(Archimedes::MouseMovedWindowEvent()) && !io.WantCaptureMouse) {
|
} else if(type == app->getEventType(Archimedes::MouseMovedWindowEvent()) && !io.WantCaptureMouse) {
|
||||||
|
|||||||
Reference in New Issue
Block a user