You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-56Lines changed: 56 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ A _JAVA_ library to construct and manipulate geometry in Three-dimensional space
10
10
11
11
## Background / Intension
12
12
13
-
This Java library began as a hobby project in 2015/2016. I started it to
13
+
This Java library began as a hobby project in 2015/2016. I started it to
14
14
deepen my understanding of creating and manipulating 3D geometry. This built
15
15
upon knowledge I gained from an earlier internship with product design students.
16
16
During that time, I was introduced to the programming language Processing.
@@ -23,6 +23,7 @@ Processing offers a convenient way to visualize constructed meshes through its
23
23
rendering pipeline, which leverages JAVA, JAVA2D, and OPENGL.
24
24
25
25
## Status Quo
26
+
26
27
Currently, my primary focus is on refining the user documentation. As my
27
28
understanding of code structure and architecture has evolved, I've been
28
29
actively refactoring the codebase to maintain its cleanliness and organization.
@@ -36,30 +37,30 @@ endeavor, in my opinion, an essential practice.
36
37
37
38
## Future
38
39
39
-
The scope of related topics is vast, and my list of potential features is
40
+
The scope of related topics is vast, and my list of potential features is
40
41
accordingly expansive. Some of these are outlined under 'Planned Features'.
41
42
42
43
## What It Is:
43
44
44
-
***A Personal Playground for 3D Exploration:** Experiment with 3D shapes and coding techniques to create your own virtual worlds.
45
-
***Tool for Creative Programmers:** Build procedural meshes and generate simple game assets with ease.
46
-
***Customizable and Extensible:** Craft unique shapes using a variety of mesh creation tools and modifiers. Even add new functionalities to the library itself.
45
+
-**A Personal Playground for 3D Exploration:** Experiment with 3D shapes and coding techniques to create your own virtual worlds.
46
+
-**Tool for Creative Programmers:** Build procedural meshes and generate simple game assets with ease.
47
+
-**Customizable and Extensible:** Craft unique shapes using a variety of mesh creation tools and modifiers. Even add new functionalities to the library itself.
47
48
48
49
## What It Is Not:
49
50
50
-
***A Full-Featured 3D Modeling Software:** This library is designed for exploration and learning, not professional-grade modeling. While it offers powerful features, it doesn't aim to replace industry-standard software.
51
-
***A High-Performance Rendering Engine:** The library primarily focuses on mesh creation and manipulation, and doesn't prioritize real-time rendering for large scenes.
51
+
-**A Full-Featured 3D Modeling Software:** This library is designed for exploration and learning, not professional-grade modeling. While it offers powerful features, it doesn't aim to replace industry-standard software.
52
+
-**A High-Performance Rendering Engine:** The library primarily focuses on mesh creation and manipulation, and doesn't prioritize real-time rendering for large scenes.
52
53
53
54
## Core Features
54
55
55
-
***3D Geometry Creation and Manipulation** Build a wide range of 3D shapes and
56
-
modify them using various operations.
57
-
***Customizable Mesh Creation:** Create custom shapes using a variety of mesh
58
-
creation tools and modifiers.
59
-
***Extensible Framework:** Easily add new features and functionalities to the
60
-
library.
61
-
***OBJ File Import and Export:** Import and export 3D models in the OBJ file
62
-
format.
56
+
-**3D Geometry Creation and Manipulation** Build a wide range of 3D shapes and
57
+
modify them using various operations.
58
+
-**Customizable Mesh Creation:** Create custom shapes using a variety of mesh
59
+
creation tools and modifiers.
60
+
-**Extensible Framework:** Easily add new features and functionalities to the
61
+
library.
62
+
-**OBJ File Import and Export:** Import and export 3D models in the OBJ file
63
+
format.
63
64
64
65
## Showcase
65
66
@@ -91,13 +92,13 @@ environment. So the library could be used independently.
91
92
92
93
## Mesh3D
93
94
94
-
The following example shows how to work with the base mesh class. For this
95
+
The following example shows how to work with the base mesh class. For this
95
96
purpose we want to create a simple quad. The quad has four vertices, one for
96
-
each corner. To make things a bit more explanatory we compose the quad out of
97
-
two triangular faces. **Important:** This is just an example to illustrate the
98
-
base concepts. The library already provides a convenient way to construct
99
-
primitives and more complex shapes. But we dive into this at a later point.
100
-
For now let's keep things simple. But also keep in mind that it might be useful
97
+
each corner. To make things a bit more explanatory we compose the quad out of
98
+
two triangular faces. **Important:** This is just an example to illustrate the
99
+
base concepts. The library already provides a convenient way to construct
100
+
primitives and more complex shapes. But we dive into this at a later point.
101
+
For now let's keep things simple. But also keep in mind that it might be useful
101
102
to construct shapes by yourself in some cases.
102
103
103
104
```
@@ -124,7 +125,7 @@ Mesh3D mesh = new Mesh3D();
124
125
125
126
### Vertex Coordinates
126
127
127
-
Next we determine the shape's coordinates in Three-Dimensional space.
128
+
Next we determine the shape's coordinates in Three-Dimensional space.
128
129
In this case the shape lies flat on the xz plane, so each y-coordinate is 0.0f.
129
130
130
131
```java
@@ -159,8 +160,8 @@ The added vertices are now at an indexed position within the mesh.
159
160
21
160
161
```
161
162
162
-
Knowing the index of each vertex makes adding faces a piece of cake. We only
163
-
have to take care of the winding order. Inthiscase the winding order is
163
+
Knowing the index of each vertex makes adding faces a piece of cake. We only
164
+
have to take care of the winding order. Inthiscase the winding order is
164
165
counter-clockwise with all face normals pointing up towards negative y.
165
166
166
167
```java
@@ -172,15 +173,15 @@ mesh.addFace(1, 2, 3);
172
173
173
174
### Modify the mesh
174
175
175
-
Now we have a mesh constisting of four vertices and two triangular faces.
176
+
Now we have a mesh constisting of four vertices and two triangular faces.
176
177
This could be retrieved by using:
177
178
178
179
```java
179
180
int vertexCount = mesh.getVertexCount();
180
181
int faceCount = mesh.getFaceCount();
181
182
```
182
183
183
-
We can modify the present mesh by using so called _Modifiers_.
184
+
We can modify the present mesh by using so called _Modifiers_.
184
185
Each modifier derives from the root interface `IMeshModifier`.
185
186
186
187
```java
@@ -208,20 +209,20 @@ modifier.modify(mesh);
208
209
209
210
Effortless Shape Creation with Mesh Creators
210
211
211
-
The library provides a variety of Mesh Creators to simplify the construction of
212
+
The library provides a variety of Mesh Creators to simplify the construction of
212
213
various shapes. These creators employ the Factory Method or Builder design
213
214
pattern, allowing for a flexible and streamlined approach.
214
215
215
216
While similar to a classic builder, Mesh Creators offer a unique combination of
216
217
features:
217
218
218
-
* **Getters and Setters:** Access and modify the creator's internal state using
219
-
getters and setters, providing fine-grained control over the mesh creation
220
-
process.
219
+
- **Getters and Setters:** Access and modify the creator's internal state using
220
+
getters and setters, providing fine-grained control over the mesh creation
221
+
process.
221
222
222
-
***Chaining is not supported:**
223
+
-**Chaining is not supported:**
223
224
224
-
With over 100MeshCreators categorized for easy access, you can quickly and
225
+
With over 100MeshCreators categorized for easy access, you can quickly and
225
226
efficiently build a wide range of 3D shapes. For a comprehensive overview,
226
227
refer to our documentation: [MeshCreators](documentation/documentation.md)
227
228
@@ -242,7 +243,7 @@ public interface IMeshCreator {
242
243
}
243
244
```
244
245
245
-
To get a little more specific we can plug the quad example code into a custom
246
+
To get a little more specific we can plug the quad example code into a custom
246
247
creator to illustrate the overall concept.
247
248
248
249
Let's have a look at our example code again.
@@ -260,7 +261,7 @@ mesh.addFace(0, 1, 3);
260
261
mesh.addFace(1, 2, 3);
261
262
```
262
263
263
-
First we move our example code into the factory method of a custom mesh
264
+
First we move our example code into the factory method of a custom mesh
264
265
creator class and simply return the mesh.
265
266
266
267
```java
@@ -283,7 +284,7 @@ public class MyQuadCreator implements IMeshCreator {
283
284
}
284
285
```
285
286
286
-
Let's assume we want to generalize the code a bit further. We introduce a
287
+
Let's assume we want to generalize the code a bit further. We introduce a
287
288
parameter for the vertex coordinates named _halfSize_.
288
289
289
290
```java
@@ -353,9 +354,9 @@ See also: [Mesh Creators](documentation/documentation.md)
353
354
354
355
## Workspace
355
356
356
-
The workspace serves as a simple mesh viewer, providing a convenient way to
357
-
visualize and inspect 3D models. It offers basic functionalities without aiming to be
358
-
a full-fledged modeling software. Currently, its sole purpose is to support the work
357
+
The workspace serves as a simple mesh viewer, providing a convenient way to
358
+
visualize and inspect 3D models. It offers basic functionalities without aiming to be
359
+
a full-fledged modeling software. Currently, its sole purpose is to support the work
359
360
with the mesh library.
360
361
361
362
In its current version, the viewer is tightly coupled to the Processing environment,
@@ -411,25 +412,25 @@ public class WorkspaceTemplate extends PApplet {
411
412
412
413
The workspace provides the following features:
413
414
414
-
**Camera movement:**
415
+
**Camera movement:**
415
416
416
-
*Zoom with the mouse wheel,
417
-
* rotate by dragging with the middle mouse button,
418
-
* pan by dragging with the middle mouse button and holding down the Shift key,
419
-
* navigate in first-person mode using WASD keys.
417
+
-Zoom with the mouse wheel,
418
+
- rotate by dragging with the middle mouse button,
419
+
- pan by dragging with the middle mouse button and holding down the Shift key,
420
+
- navigate in first-person mode using WASD keys.
420
421
421
-
**Scene manipulation:**
422
+
**Scene manipulation:**
422
423
423
-
*Reset camera position (C),
424
-
* toggle UI visibility (Y),
425
-
* toggle grid visibility (G),
426
-
* show/hide face and vertex normals (N, V),
427
-
*switch between wireframe and solid view (Z),
428
-
* show/hide axes (1, 2, 3),
429
-
* show/hide edges (E),
430
-
* toggle smooth and flat shading (S),
431
-
*switch to first-person mode and back (4),
432
-
* toggle the rendering loop via the UI.
424
+
-Reset camera position (C),
425
+
- toggle UI visibility (Y),
426
+
- toggle grid visibility (G),
427
+
- show/hide face and vertex normals (N, V),
428
+
-switch between wireframe and solid view (Z),
429
+
- show/hide axes (1, 2, 3),
430
+
- show/hide edges (E),
431
+
- toggle smooth and flat shading (S),
432
+
-switch to first-person mode and back (4),
433
+
- toggle the rendering loop via the UI.
433
434
434
435
## Planed features
435
436
@@ -439,10 +440,9 @@ The workspace provides the following features:
0 commit comments