diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-09 01:41:26 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-09 01:41:26 +0000 |
commit | a74580123fe36ba1227611c3703c1fe1a520719a (patch) | |
tree | f667f5f0813eba8aa8048eeef9da4abfd6f6a59c /assetFactory/shape.h | |
parent | Hugely more detailed Brush47 model and revision to test case details (diff) | |
download | ilt-a74580123fe36ba1227611c3703c1fe1a520719a.tar.bz2 ilt-a74580123fe36ba1227611c3703c1fe1a520719a.tar.xz ilt-a74580123fe36ba1227611c3703c1fe1a520719a.zip |
Refactor of asset factory to address mutation/face controller logic
Fixes issue where face controller extrusions applied to a rotated or
scaled mesh would be applied incorrectly. Now we create the mesh at the
origin, deform it as required (scale), apply face controllers and
finally relocate it as required (position and rotation). A relative
level of detail is cascade into the generation for shapes like cylinder,
which generate fewer faces for small objects.
Diffstat (limited to 'assetFactory/shape.h')
-rw-r--r-- | assetFactory/shape.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/assetFactory/shape.h b/assetFactory/shape.h index 5a2b59c..fe517c1 100644 --- a/assetFactory/shape.h +++ b/assetFactory/shape.h @@ -1,9 +1,9 @@ #pragma once #include "modelFactoryMesh_fwd.h" -#include "mutation.h" #include "stdTypeDefs.hpp" #include <OpenMesh/Core/Mesh/Handles.hh> +#include <glm/vec3.hpp> #include <map> #include <span> #include <string> @@ -18,8 +18,8 @@ public: virtual ~Shape() = default; - virtual CreatedFaces createMesh(ModelFactoryMesh &, const Mutation::Matrix & mutation) const = 0; + virtual CreatedFaces createMesh(ModelFactoryMesh &, float levelOfDetailFactor) const = 0; - static std::vector<OpenMesh::VertexHandle> addMutatedToMesh( - ModelFactoryMesh & mesh, const std::span<const glm::vec3> vertices, const Mutation::Matrix & mutation); + static std::vector<OpenMesh::VertexHandle> addToMesh( + ModelFactoryMesh & mesh, const std::span<const glm::vec3> vertices); }; |