You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
GeometryProcessing: replace invalid vertex position check with checkSlow, and handle invalid positions more cleanly
#rb none #rnx #fyi jimmy.andrews [CL 9965788 by Ryan Schmidt in Dev-Editor branch]
This commit is contained in:
@@ -569,7 +569,12 @@ FVector3d FRemesher::ComputeSmoothedVertexPos(int vID,
|
||||
}
|
||||
|
||||
FVector3d vSmoothed = smoothFunc(*Mesh, vID, SmoothSpeedT);
|
||||
check(VectorUtil::IsFinite(vSmoothed)); // this will really catch a lot of bugs...
|
||||
// @todo we should probably make sure that vertex does not move too far here...
|
||||
checkSlow(VectorUtil::IsFinite(vSmoothed));
|
||||
if (VectorUtil::IsFinite(vSmoothed) == false)
|
||||
{
|
||||
return Mesh->GetVertex(vID);
|
||||
}
|
||||
|
||||
// project onto either vtx constraint target, or surface target
|
||||
if (vConstraint.Target != nullptr)
|
||||
|
||||
@@ -533,13 +533,16 @@ public:
|
||||
/** Set vertex position */
|
||||
inline void SetVertex(int VertexID, const FVector3d& vNewPos)
|
||||
{
|
||||
check(VectorUtil::IsFinite(vNewPos));
|
||||
checkSlow(VectorUtil::IsFinite(vNewPos));
|
||||
check(IsVertex(VertexID));
|
||||
int i = 3 * VertexID;
|
||||
Vertices[i] = vNewPos.X;
|
||||
Vertices[i + 1] = vNewPos.Y;
|
||||
Vertices[i + 2] = vNewPos.Z;
|
||||
UpdateTimeStamp(true, false);
|
||||
if (VectorUtil::IsFinite(vNewPos))
|
||||
{
|
||||
int i = 3 * VertexID;
|
||||
Vertices[i] = vNewPos.X;
|
||||
Vertices[i + 1] = vNewPos.Y;
|
||||
Vertices[i + 2] = vNewPos.Z;
|
||||
UpdateTimeStamp(true, false);
|
||||
}
|
||||
}
|
||||
|
||||
/** Get extended vertex information */
|
||||
|
||||
Reference in New Issue
Block a user