diff options
| author | Bryan Galdrikian <[email protected]> | 2019-05-03 00:25:46 -0700 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2019-05-03 00:25:46 -0700 |
| commit | 74b64a27f8e07b1b0b47b809b1a060518fa11a97 (patch) | |
| tree | 34cca01711be56892c149706f02ba7358d87ec54 /sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp | |
| parent | Fixing chunk reorder bug in BlastTool, when importing a prefractured mesh (diff) | |
| download | blast-1.1.5_pre1.tar.xz blast-1.1.5_pre1.zip | |
Blast SDK 1.1.5 prerelease #1v1.1.5_pre1
Diffstat (limited to 'sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp')
| -rwxr-xr-x | sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp b/sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp index 0cb270d..cef97f7 100755 --- a/sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp +++ b/sdk/extensions/authoring/source/NvBlastExtAuthoringCutoutImpl.cpp @@ -26,14 +26,16 @@ // Copyright (c) 2016-2018 NVIDIA Corporation. All rights reserved.
-#include "NvBlastExtAuthoringCutoutImpl.h"
#include "NvBlastGlobals.h"
#include <NvBlastAssert.h>
+#include <PxBounds3.h>
+#include <PxMath.h>
+#include <NvBlastPxSharedHelpers.h>
+#include "NvBlastExtAuthoringCutoutImpl.h"
#include <algorithm>
#include <set>
#include <map>
#include <stack>
-#include "PxMath.h"
#define CUTOUT_DISTANCE_THRESHOLD (0.7f)
@@ -2420,9 +2422,9 @@ PX_INLINE bool calculateUVMapping(const Nv::Blast::Triangle& triangle, physx::Px physx::PxMat33 uvMat;
for (unsigned col = 0; col < 3; ++col)
{
- auto v = triangle.getVertex(col);
- rMat[col] = v.p;
- uvMat[col] = physx::PxVec3(v.uv[0][0], v.uv[0][1], 1.0f);
+ auto v = (&triangle.a)[col];
+ rMat[col] = toPxShared(v.p);
+ uvMat[col] = physx::PxVec3(v.uv[0].x, v.uv[0].y, 1.0f);
}
if (uvMat.getDeterminant() == 0.0f)
@@ -2503,4 +2505,12 @@ PX_INLINE bool calculateUVMapping(const Nv::Blast::Triangle& triangle, physx::Px // return ::calculateUVMapping(targetDirection, theMapping);
//}
+const NvcVec3& CutoutSetImpl::getCutoutVertex(uint32_t cutoutIndex, uint32_t loopIndex, uint32_t vertexIndex) const
+{
+ return fromPxShared(cutoutLoops[cutouts[cutoutIndex] + loopIndex].vertices[vertexIndex]);
+}
+const NvcVec2& CutoutSetImpl::getDimensions() const
+{
+ return fromPxShared(dimensions);
+}
|