-
Notifications
You must be signed in to change notification settings - Fork 0
Notes
- The FlipFacesModifier has the potential for parallelism.
- The ScaleModifier has the potential for parallelism.
- The ScaleModifier does not need to scale if scale = 1
- Provide seed for the NoiseModifier -> testing
- The TranslateModifier does not need to translate if deltaX == deltaY == deltaZ == 0
- The TranslateModifier has the potential for parallelism.
- Implement Snap to ground modifier
Some Considerations for Future Features
Bending Modifiers:
- Currently, we have a
BendModifier
that bends the mesh along the X-axis. - Consider implementing modifiers for bending along the Y and Z axes as well.
Noise Modifier:
- The current
NoiseModifier
uses random noise. - We could explore other noise types, such as Perlin noise and Simplex noise, to provide more diverse and controllable noise effects.
- To ensure consistent results and facilitate testing, we could introduce a seed parameter to the
NoiseModifier
.
Basic Transformations:
- We have a
ScaleModifier
for scaling along the X, Y, and Z axes. - For convenience, we could add dedicated modifiers for rotations around individual axes:
RotateXModifier
,RotateYModifier
, andRotateZModifier
.
-
Goal To improve the extensibility, maintainability, and testability of the Mesh3D class by applying the Open-Closed Principle.
-
Approach Identify Modification Operations: Identify all operations that modify the mesh, such as rotation, scaling, translation, smoothing, subdivision, etc.
-
Refactor Existing Operations: Convert existing modification methods (e.g., rotateX, scale) into MeshModifier classes. Remove these methods from the Mesh3D class.
11-19-2024
- Unit testing of TranslateModifier
11-18-2024
- Goal: Further refactoring of the mesh class following the refactoring plan.
- Removed the update face normals method from the mesh class. Implemented a new modifier UpdateFaceNormalsModifier
- Removed the scaled copy from the mesh class
- The scaled copy should live as own creator class. The current implementation was wrong anyways, caus it did not copy face attributes.
// public Mesh3D scaledCopy(Vector3f scale) { // Mesh3D copy = new Mesh3D(); // List vertices = copy.vertices; // List faces = copy.faces; // // for (Vector3f v : this.vertices) // vertices.add(new Vector3f(v).multLocal(scale)); // // for (Face3D f : this.faces) // faces.add(new Face3D(f)); // // return copy; //}
- Removed the getSelection(String tag) from the mesh class. It exists as face selection option already and it is not used within the library.
- Removed rotateX from the mesh class
- Format changes of the README.md according to max line length = 80
- Let's have some fun and implement a low poly barrel creator based on Grant Abbitts tutorial: https://www.youtube.com/watch?v=0jWLjAaIEMg&t=450s
Dev Diary
Today, I decided to not only test and refactor my library but also actively expand it. Specifically, I implemented a new MeshCreator focused on procedural assets. I used a Blender tutorial by Grant Abbitt (https://www.youtube.com/watch?v=0jWLjAaIEMg&t=450s) as a reference to create a low-poly barrel.
My goal was to procedurally generate this asset using my library, thus expanding it and honing my skills. This approach offers several advantages:
- Learning Process: It forces me to think creatively about how to achieve the desired result using the existing tools in my library.
- Documentation: I can document my development process and share my solutions with others.
- Enjoyment: It's simply fun to actively use the library and create something new.
First Steps:
I watched the tutorial carefully and considered how to implement the individual steps using my library. Initially, I focused on the simpler variant and omitted details like indentations.
Implementation:
First, I defined the parameters that describe my barrel:
- Cylinder: Number of segments, radius
- Metal Rings: Height, thickness
- Wooden Part: Height of the bottom, middle, and top sections
11-20-2024
- Further refactoring of the Mesh3D class
- Further refactoring of the Mesh3DUtil class
- Started knowledge collection