You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #jira none #preflight 61821056dd10170001f4d541 #ROBOMERGE-AUTHOR: ryan.schmidt #ROBOMERGE-SOURCE: CL 18041664 in //UE5/Release-5.0/... via CL 18041669 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292) #ROBOMERGE[STARSHIP]: UE5-Main [CL 18041673 by ryan schmidt in ue5-release-engine-test branch]
58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "MathUtil.h"
|
|
#include "VectorTypes.h"
|
|
#include "IntVectorTypes.h"
|
|
#include "GeometryTypes.h"
|
|
#include "LineTypes.h"
|
|
|
|
class FProgressCancel;
|
|
|
|
namespace UE
|
|
{
|
|
namespace Geometry
|
|
{
|
|
|
|
class FDynamicMesh3;
|
|
|
|
/**
|
|
* For each edge in EdgeList, compute a line segment offset from the original edge by
|
|
* distance InsetDistance. Assumes that each Edge is a boundary edge and so Triangle0
|
|
* of that edge defines "inside" direction.
|
|
*/
|
|
DYNAMICMESH_API void ComputeInsetLineSegmentsFromEdges(
|
|
const FDynamicMesh3& Mesh,
|
|
const TArray<int32>& EdgeList,
|
|
double InsetDistance,
|
|
TArray<FLine3d>& InsetLinesOut );
|
|
|
|
/**
|
|
* For each vertex in VertexIDs, compute inset position based on list of precomputed
|
|
* inset lines and store in VertexPositionsOut. Assumption is that each vertex position
|
|
* was at the intersection point of the pre-inset lines, ie sequential edge-line-pairs
|
|
* determine each sequential vertex position
|
|
* @param bIsLoop if true, vertex list is treated as a loop, otherwise as an open span
|
|
*/
|
|
DYNAMICMESH_API void SolveInsetVertexPositionsFromInsetLines(
|
|
const FDynamicMesh3& Mesh,
|
|
const TArray<FLine3d>& InsetEdgeLines,
|
|
const TArray<int32>& VertexIDs,
|
|
TArray<FVector3d>& VertexPositionsOut,
|
|
bool bIsLoop);
|
|
|
|
/**
|
|
* Solve for a new inset position by finding the intersection point
|
|
* a pair of inset-lines (or handle parallel-lines case). Assumption
|
|
* is that Position is the location of the initial vertex on the
|
|
* pre-inset edge-line-pair, ie at their intersection point.
|
|
*/
|
|
DYNAMICMESH_API FVector3d SolveInsetVertexPositionFromLinePair(
|
|
const FVector3d& Position,
|
|
const FLine3d& InsetEdgeLine1,
|
|
const FLine3d& InsetEdgeLine2);
|
|
|
|
|
|
} // end namespace UE::Geometry
|
|
} // end namespace UE
|