From a74580123fe36ba1227611c3703c1fe1a520719a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 9 Mar 2023 01:41:26 +0000 Subject: 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. --- assetFactory/plane.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'assetFactory/plane.cpp') diff --git a/assetFactory/plane.cpp b/assetFactory/plane.cpp index 563c4e9..c6e1b5a 100644 --- a/assetFactory/plane.cpp +++ b/assetFactory/plane.cpp @@ -2,7 +2,7 @@ #include "modelFactoryMesh.h" Plane::CreatedFaces -Plane::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const +Plane::createMesh(ModelFactoryMesh & mesh, float) const { static constexpr std::array VERTICES {{ {n, n, z}, @@ -11,5 +11,5 @@ Plane::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) co {n, y, z}, }}; - return {mesh.add_namedFace("plane", addMutatedToMesh(mesh, VERTICES, mutation))}; + return {mesh.add_namedFace("plane", addToMesh(mesh, VERTICES))}; } -- cgit v1.2.3