Skip to content

Commit cdec4bf

Browse files
committed
Format changes according to max line length.
1 parent 2cfe55c commit cdec4bf

File tree

1 file changed

+76
-31
lines changed

1 file changed

+76
-31
lines changed

README.md

Lines changed: 76 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,45 @@ A _JAVA_ library to construct and manipulate geometry in Three-dimensional space
1010

1111
## Background / Intension
1212

13-
This Java library began as a hobby project in 2015/2016. I started it to deepen my understanding of creating and manipulating 3D geometry. This built upon knowledge I gained from an earlier internship with product design students. During that time, I was introduced to the programming language Processing.
14-
15-
Processing captivated me from the start. Designed for visual learners, Processing is a great tool to get started with programming. You can learn more at processing.org. While Processing isn't strictly necessary, the library's core functionality is independent of the Processing environment. However, Processing offers a convenient way to visualize constructed meshes through its rendering pipeline, which leverages JAVA, JAVA2D, and OPENGL.
13+
This Java library began as a hobby project in 2015/2016. I started it to
14+
deepen my understanding of creating and manipulating 3D geometry. This built
15+
upon knowledge I gained from an earlier internship with product design students.
16+
During that time, I was introduced to the programming language Processing.
17+
18+
Processing captivated me from the start. Designed for visual learners,
19+
Processing is a great tool to get started with programming. You can learn more
20+
at processing.org. While Processing isn't strictly necessary, the library's
21+
core functionality is independent of the Processing environment. However,
22+
Processing offers a convenient way to visualize constructed meshes through its
23+
rendering pipeline, which leverages JAVA, JAVA2D, and OPENGL.
1624

1725
## Status Quo
18-
Currently, my primary focus is on refining the user documentation. As my understanding of code structure and architecture has evolved, I've been actively refactoring the codebase to maintain its cleanliness and organization. Smaller additions are made periodically.
26+
Currently, my primary focus is on refining the user documentation. As my
27+
understanding of code structure and architecture has evolved, I've been
28+
actively refactoring the codebase to maintain its cleanliness and organization.
29+
Smaller additions are made periodically.
1930

20-
In essence, this codebase serves as a platform for learning and working with legacy code. I've embraced the challenge of working with existing code, viewing it as an opportunity to explore new testing approaches. Constructing tests around legacy code for refactoring purposes is a fascinating and valuable endeavor, in my opinion, an essential practice.
31+
In essence, this codebase serves as a platform for learning and working with
32+
legacy code. I've embraced the challenge of working with existing code, viewing
33+
it as an opportunity to explore new testing approaches. Constructing tests
34+
around legacy code for refactoring purposes is a fascinating and valuable
35+
endeavor, in my opinion, an essential practice.
2136

2237
## Future
2338

24-
The scope of related topics is vast, and my list of potential features is accordingly expansive. Some of these are outlined under 'Planned Features'.
39+
The scope of related topics is vast, and my list of potential features is
40+
accordingly expansive. Some of these are outlined under 'Planned Features'.
2541

2642
## Core Features
2743

28-
* **3D Geometry Creation and Manipulation** Build a wide range of 3D shapes and modify them using various operations.
29-
* **Customizable Mesh Creation:** Create custom shapes using a variety of mesh creation tools and modifiers.
30-
* **Extensible Framework:** Easily add new features and functionalities to the library.
31-
* **OBJ File Import and Export:** Import and export 3D models in the OBJ file format.
44+
* **3D Geometry Creation and Manipulation** Build a wide range of 3D shapes and
45+
modify them using various operations.
46+
* **Customizable Mesh Creation:** Create custom shapes using a variety of mesh
47+
creation tools and modifiers.
48+
* **Extensible Framework:** Easily add new features and functionalities to the
49+
library.
50+
* **OBJ File Import and Export:** Import and export 3D models in the OBJ file
51+
format.
3252

3353
## Showcase
3454

@@ -54,15 +74,20 @@ Throwing some conway operations on a cube seed.
5474
## Coordinate System
5575

5676
The library is build up on a left-handed coordinate system.
57-
The decision was justified by using the 'Processing' rendering pipeline in the first place.
58-
But the core library is highly decoupled from the 'Processing' environment.
59-
So the library could be used independently.
77+
The decision was justified by using the 'Processing' rendering pipeline in the
78+
first place. But the core library is highly decoupled from the 'Processing'
79+
environment. So the library could be used independently.
6080

6181
## Mesh3D
6282

63-
The following example shows how to work with the base mesh class. For this purpose we want to create a simple quad. The quad has four vertices, one for each
64-
corner. To make things a bit more explanatory we compose the quad out of two triangular faces. **Important:** This is just an example to illustrate the base concepts. The library already provides a convenient way to construct primitives and more complex shapes. But we dive into this at a later point. For now
65-
let's keep things simple. But also keep in mind that it might be useful to construct shapes by yourself in some cases.
83+
The following example shows how to work with the base mesh class. For this
84+
purpose we want to create a simple quad. The quad has four vertices, one for
85+
each corner. To make things a bit more explanatory we compose the quad out of
86+
two triangular faces. **Important:** This is just an example to illustrate the
87+
base concepts. The library already provides a convenient way to construct
88+
primitives and more complex shapes. But we dive into this at a later point.
89+
For now let's keep things simple. But also keep in mind that it might be useful
90+
to construct shapes by yourself in some cases.
6691

6792
```
6893
(-1, 0, -1) (1, 0, -1)
@@ -88,7 +113,8 @@ Mesh3D mesh = new Mesh3D();
88113

89114
### Vertex Coordinates
90115

91-
Next we determine the shape's coordinates in Three-Dimensional space. In this case the shape lies flat on the xz plane, so each y-coordinate is 0.0f.
116+
Next we determine the shape's coordinates in Three-Dimensional space.
117+
In this case the shape lies flat on the xz plane, so each y-coordinate is 0.0f.
92118

93119
```java
94120
mesh.add(new Vector3f(1, 0, -1));
@@ -122,8 +148,9 @@ The added vertices are now at an indexed position within the mesh.
122148
2 1
123149
```
124150

125-
Knowing the index of each vertex makes adding faces a piece of cake. We only have to take care of the winding order. In this case the winding order
126-
is counter-clockwise with all face normals pointing up towards negative y.
151+
Knowing the index of each vertex makes adding faces a piece of cake. We only
152+
have to take care of the winding order. In this case the winding order is
153+
counter-clockwise with all face normals pointing up towards negative y.
127154

128155
```java
129156
mesh.addFace(0, 1, 3);
@@ -134,14 +161,16 @@ mesh.addFace(1, 2, 3);
134161

135162
### Modify the mesh
136163

137-
Now we have a mesh constisting of four vertices and two triangular faces. This could be retrieved by using:
164+
Now we have a mesh constisting of four vertices and two triangular faces.
165+
This could be retrieved by using:
138166

139167
```java
140168
int vertexCount = mesh.getVertexCount();
141169
int faceCount = mesh.getFaceCount();
142170
```
143171

144-
We can modify the present mesh by using so called _Modifiers_. Each modifier derives from the root interface `IMeshModifier`.
172+
We can modify the present mesh by using so called _Modifiers_.
173+
Each modifier derives from the root interface `IMeshModifier`.
145174

146175
```java
147176
package mesh.modifier;
@@ -168,18 +197,27 @@ modifier.modify(mesh);
168197
169198
Effortless Shape Creation with Mesh Creators
170199
171-
The library provides a variety of Mesh Creators to simplify the construction of various shapes. These creators employ the Factory Method or Builder design pattern, allowing for a flexible and streamlined approach.
200+
The library provides a variety of Mesh Creators to simplify the construction of
201+
various shapes. These creators employ the Factory Method or Builder design
202+
pattern, allowing for a flexible and streamlined approach.
203+
204+
While similar to a classic builder, Mesh Creators offer a unique combination of
205+
features:
172206
173-
While similar to a classic builder, Mesh Creators offer a unique combination of features:
207+
* **Getters and Setters:** Access and modify the creator's internal state using
208+
getters and setters, providing fine-grained control over the mesh creation
209+
process.
174210

175-
* **Getters and Setters:** Access and modify the creator's internal state using getters and setters, providing fine-grained control over the mesh creation process.
176211
* **Chaining is not supported:**
177212

178-
With over 100 Mesh Creators categorized for easy access, you can quickly and efficiently build a wide range of 3D shapes. For a comprehensive overview, refer to our documentation: [Mesh Creators](documentation/documentation.md)
213+
With over 100 Mesh Creators categorized for easy access, you can quickly and
214+
efficiently build a wide range of 3D shapes. For a comprehensive overview,
215+
refer to our documentation: [Mesh Creators](documentation/documentation.md)
179216

180217
Core of Mesh Creators: The IMeshCreator Interface
181218

182-
Every Mesh Creator in the library adheres to the IMeshCreator interface. The following code snippet illustrates this foundational interface:
219+
Every Mesh Creator in the library adheres to the IMeshCreator interface.
220+
The following code snippet illustrates this foundational interface:
183221

184222
```java
185223
package mesh.creator;
@@ -193,7 +231,9 @@ public interface IMeshCreator {
193231
}
194232
```
195233

196-
To get a little more specific we can plug the quad example code into a custom creator to illustrate the overall concept.
234+
To get a little more specific we can plug the quad example code into a custom
235+
creator to illustrate the overall concept.
236+
197237
Let's have a look at our example code again.
198238
199239
```java
@@ -209,7 +249,8 @@ mesh.addFace(0, 1, 3);
209249
mesh.addFace(1, 2, 3);
210250
```
211251
212-
First we move our example code into the factory method of a custom mesh creator class and simply return the mesh.
252+
First we move our example code into the factory method of a custom mesh
253+
creator class and simply return the mesh.
213254
214255
```java
215256
import mesh.Mesh3D;
@@ -231,7 +272,8 @@ public class MyQuadCreator implements IMeshCreator {
231272
}
232273
```
233274
234-
Let's assume we want to generalize the code a bit further. We introduce a parameter for the vertex coordinates named _halfSize_.
275+
Let's assume we want to generalize the code a bit further. We introduce a
276+
parameter for the vertex coordinates named _halfSize_.
235277

236278
```java
237279
import mesh.Mesh3D;
@@ -293,7 +335,9 @@ creator.setSize(4);
293335
mesh = creator.create();
294336
```
295337

296-
This explains the overall concept of mesh creators pretty well. You should now have an idea how to use existing creators and implement your own custom ones.
338+
This explains the overall concept of mesh creators pretty well. You should now
339+
have an idea how to use existing creators and implement your own custom ones.
340+
297341
See also: [Mesh Creators](documentation/documentation.md)
298342

299343
## Planed features
@@ -304,5 +348,6 @@ See also: [Mesh Creators](documentation/documentation.md)
304348

305349
## Licence
306350

307-
[MIT](https://github.com/ArtifactForms/MeshLibCore/blob/master/LICENSE) License Copyright (c) 2022 Simon Dietz
351+
[MIT](https://github.com/ArtifactForms/MeshLibCore/blob/master/LICENSE)
352+
License Copyright (c) 2022 Simon Dietz
308353

0 commit comments

Comments
 (0)