File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 ***************************************************************************/
1818
1919#include < boost/format.hpp>
20+ #include < limits>
2021#include < optional>
2122
2223#include " luxrays/core/exttrianglemesh.h"
2324#include " slg/shapes/pointiness.h"
2425#include " slg/scene/scene.h"
26+ #include " slg/shapes/merge_on_distance.h"
2527
2628using namespace std ;
2729using namespace luxrays ;
@@ -68,11 +70,18 @@ class VertexAverageComparator {
6870 const Point *verts_;
6971};
7072
71- PointinessShape::PointinessShape (ExtTriangleMeshRef srcMesh, const u_int destAOVIndex) {
72- SDL_LOG (" Pointiness shape " << srcMesh.GetName ());
73+ PointinessShape::PointinessShape (ExtTriangleMeshRef rawSrcMesh, const u_int destAOVIndex) {
74+ // rawSrcMesh is source mesh before merge-on-distance
75+ SDL_LOG (" Pointiness shape " << rawSrcMesh.GetName ());
7376
7477 const double startTime = WallClockTime ();
7578
79+ // Merge vertices on distance
80+ auto srcMeshPtr = MergeOnDistanceShape::ApplyMergeOnDistance (
81+ rawSrcMesh, std::numeric_limits<float >::min (), true
82+ );
83+ auto & srcMesh = *srcMeshPtr;
84+
7685 const u_int originalVertCount = srcMesh.GetTotalVertexCount ();
7786 const u_int triCount = srcMesh.GetTotalTriangleCount ();
7887
You can’t perform that action at this time.
0 commit comments