Geometry Scripting : Geodesic Functions, add ability to trace a "straight" line on a mesh surface.

#preflight 642dbd7d4d26bcd1eb1bf94b
#rb Jimmy.Andrews

[CL 24956789 by david hill in ue5-main branch]
This commit is contained in:
david hill
2023-04-06 17:02:35 -04:00
parent 5a4d347ccd
commit 56153993ad
4 changed files with 128 additions and 2 deletions
@@ -772,6 +772,10 @@ double FMeshGeodesicSurfaceTracer::TraceMeshFromBaryPoint(const int32 TriID, con
// project the ray onto the X,Y plane ( i.e. the face of the triangle )
FVector2d ProjectedRay(FVector3d::DotProduct(XDir, RayDir3), FVector3d::DotProduct(YDir, RayDir3));
if (!ProjectedRay.Normalize())
{
ProjectedRay = FVector2d::UnitX();
}
// lower level code expects the 2d ray to be encoded relative to the "direction" of the first edge, edge(v0,v1)
const int32 EID = Mesh->GetTriEdge(TriID, 0);
@@ -199,7 +199,7 @@ public:
* in terms of barycentric coordinates, triangle references and local path direction relative
* to a local frame (in the form of one of the edges of the triangle).
*/
class FMeshGeodesicSurfaceTracer
class DYNAMICMESH_API FMeshGeodesicSurfaceTracer
{
public: