Skip to content

Commit d335725

Browse files
committed
Feat: Added drawFaces(Mesh mesh) to render wire frame representations
1 parent 9c72cc8 commit d335725

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main/java/workspace/GraphicsPImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ public void fillFaces(Mesh3D mesh) {
9696
}
9797
}
9898

99+
@Override
100+
public void drawFaces(Mesh3D mesh) {
101+
g.noFill();
102+
stroke();
103+
drawMeshFaces(mesh);
104+
}
105+
99106
@Override
100107
public void renderInstances(Mesh3D mesh, List<Matrix4f> instanceTransforms) {
101108
if (mesh.getFaces().isEmpty() || mesh.getVertices().isEmpty()) {

src/main/java/workspace/ui/Graphics3D.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public interface Graphics3D extends Graphics2D {
2525

2626
void render(Light light);
2727

28+
void drawFaces(Mesh3D mesh);
29+
2830
void fillFaces(Mesh3D mesh);
2931

3032
void renderInstances(Mesh3D mesh, List<Matrix4f> instanceTransforms);

0 commit comments

Comments
 (0)