Skip to content

Commit

Permalink
Model Viewer: Remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed May 22, 2024
1 parent eb076ca commit f3137ac
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public Matrix4fc getProjectionMatrix() {
}

@NotNull
private Vector3f getForwardVector() {
public Vector3f getForwardVector() {
final float yawSin = (float) Math.sin(yaw);
final float yawCos = (float) Math.cos(yaw);
final float pitchSin = (float) Math.sin(pitch);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
import com.shade.platform.model.util.MathUtils;
import com.shade.util.NotNull;
import com.shade.util.Nullable;
import org.joml.Matrix4f;
import org.joml.Matrix4fc;
import org.joml.Vector2f;
import org.joml.Vector3f;
import org.lwjgl.opengl.GL;
Expand Down Expand Up @@ -148,22 +146,12 @@ public void paintGL() {
}

try (var ignored = new DebugGroup("Render Lines")) {
final Matrix4fc view = camera.getViewMatrix();
final Matrix4f viewInv = view.invert(new Matrix4f());

if (handler.isMouseDown(MouseEvent.BUTTON2) || handler.isMouseDown(MouseEvent.BUTTON3)) {
final Vector3f target = camera.getTarget();
debugRenderer.cross(target, 0.1f, false);
debugRenderer.circle(target, view.positiveZ(new Vector3f()), new Vector3f(1.0f, 1.0f, 0.0f), 0.05f, 8, false);
debugRenderer.circle(target, camera.getForwardVector(), new Vector3f(1.0f, 1.0f, 0.0f), 0.05f, 8, false);
}

debugRenderer.aabb(
new Vector3f(-1.718159f, -3.207981f, 0.018865682f),
new Vector3f(1.6391256f, 3.8506227f, 3.213379f),
new Vector3f(1.0f, 0.0f, 1.0f),
true
);

debugRenderer.render(delta, this);
}

Expand Down

0 comments on commit f3137ac

Please sign in to comment.