diff options
| author | bgaldrikian <[email protected]> | 2020-10-08 22:01:09 -0700 |
|---|---|---|
| committer | bgaldrikian <[email protected]> | 2020-10-08 22:01:09 -0700 |
| commit | c389ca2d86ed528e4d54941378a4752ca74026e8 (patch) | |
| tree | 271dba95c84f62d13bcebbc62b5dcdc5b7ff443e /sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp | |
| parent | * NvBlastAsset::testForValidChunkOrder (used when creating an NvBlastAsset) i... (diff) | |
| download | blast-1.1.6_release.tar.xz blast-1.1.6_release.zip | |
* Updated license filev1.1.6_releasev1.1.6_rc1
* Updated copyright dates
* Removed ArtistTool
* Pulled request #15 "Fix Blast bond generation"
* Pulled request #16 "Fix invalid pointer access in authoring tools"
Diffstat (limited to 'sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp')
| -rwxr-xr-x | sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp b/sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp index ffb838b..cee74fe 100755 --- a/sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp +++ b/sdk/extensions/authoring/source/NvBlastExtTriangleProcessor.cpp @@ -23,7 +23,7 @@ // components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
#include "NvBlastExtTriangleProcessor.h"
@@ -193,7 +193,7 @@ void TriangleProcessor::sortToCCW(std::vector<PxVec3>& points, PxVec3& normal) int lastUnique = 0;
for (uint32_t i = 1; i < points.size(); ++i)
{
- PxVec3 df = points[i] - points[lastUnique];
+ PxVec3 df = (points[i] - points[lastUnique]).abs();
if (df.x > V_COMP_EPS || df.y > V_COMP_EPS || df.z > V_COMP_EPS)
{
points[++lastUnique] = points[i];
@@ -216,7 +216,7 @@ void TriangleProcessor::buildConvexHull(std::vector<PxVec3>& points, std::vector int lastUnique = 0;
for (uint32_t i = 1; i < points.size(); ++i)
{
- PxVec3 df = points[i] - points[lastUnique];
+ PxVec3 df = (points[i] - points[lastUnique]).abs();
if (df.x > V_COMP_EPS || df.y > V_COMP_EPS || df.z > V_COMP_EPS)
{
points[++lastUnique] = points[i];
@@ -237,7 +237,7 @@ void TriangleProcessor::buildConvexHull(std::vector<PxVec3>& points, std::vector {
PxVec2 pnt = getProjectedPointWithWinding(points[i], projectionDirection);
PxVec2 vec = pnt - getProjectedPointWithWinding(convexHull.back(), projectionDirection);
- if (vec.x < V_COMP_EPS && vec.y < V_COMP_EPS)
+ if (PxAbs(vec.x) < V_COMP_EPS && PxAbs(vec.y) < V_COMP_EPS)
{
continue;
}
|