TMeshQueries

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/MeshQueries.h

Include

#include "MeshQueries.h"

Syntax

template<class TriangleMeshType>
class TMeshQueries

Constructors

Name Description

Public function

TMeshQueries()

Functions

Name Description

Public function Static

double

 

AverageEdgeLength

(
    const TriangleMeshType& Mesh
)

Compute the mean edge length for the given mesh.

Public function Static

void

 

EdgeLengthStats

(
    const TriangleMeshType& Mesh,
    double& MinEdgeLength,
    double& MaxEdgeLength,
    double& AverageEdgeLength,
    int NumSamples
)

Compute the min, max, and mean edge lengths for the given mesh.

Public function Static

void

 

EdgeLengthStatsFromEdges

(
    const TriangleMeshType& Mesh,
    const TArray< int >& Edges,
    double& MinEdgeLength,
    double& MaxEdgeLength,
    double& AverageEdgeLength
)

Given a mesh and a subset of mesh edges, compute the min, max, and mean edge lengths.

Public function Static

int

 

FindHitTriangle_LinearSearch

(
    const TriangleMeshType& Mesh,
    const FRay3d& Ray
)

Brute force search for nearest triangle intersection

Public function Static

void

 

FindHitTriangles_LinearSearch

(
    const TriangleMeshType& Mesh,
    const FRay3d& Ray,
    TArray< TPair< float, int >>& Sort...
)

Brute force search for all triangle intersections, sorted

Public function Static

FIndex2i

 

FindIntersectingTriangles_LinearSearch

(
    const TriangleMeshType& Mesh1,
    const TriangleMeshType& Mesh2
)

Brute force search for any intersecting triangles on two meshes

Public function Static

FVector3d

 

FindNearestPoint_LinearSearch

(
    const TriangleMeshType& Mesh,
    const FVector3d& P
)

Public function Static

int

 

FindNearestTriangle_LinearSearch

(
    const TriangleMeshType& Mesh,
    const FVector3d& P
)

Brute force search for nearest triangle to Point

Public function Static

FAxisAligned...

 

GetBounds

(
    const TriangleMeshType& Mesh
)

Public function Static

FVector3d

 

GetMeshVerticesCentroid

(
    const TriangleMeshType& Mesh
)

Get the average of the mesh vertices.

Public function Static

FAxisAligned...

 

GetTriBounds

(
    const TriangleMeshType& Mesh,
    int TID
)

Public function Static

FVector3d

 

GetTriCentroid

(
    const TriangleMeshType& Mesh,
    int TriIdx
)

Compute triangle centroid

Public function Static

void

 

GetTriNormalAreaCentroid

(
    const TriangleMeshType& Mesh,
    int TriIdx,
    FVector3d& Normal,
    double& Area,
    FVector3d& Centroid
)

Compute the normal, area, and centroid of a triangle all together

Public function Static

FVector2d

 

GetVolumeArea

(
    const TriangleMeshType& Mesh
)

Public function Static

FVector2d

 

GetVolumeArea

(
    const TriangleMeshType& Mesh,
    const TArray< int >& TriIndices
)

Public function Static

double

 

GetVolumeNonWatertight

(
    const TriangleMeshType& Mesh,
    double DimScaleFactor
)

Get the volume of a mesh using a method that is more robust to inputs with holes

Public function Static

double

 

HausdorffDistance

(
    const TriangleMeshType& MeshA,
    const MeshSpatialType& SpatialB
)

Compute all vertex-to-surface distances in parallel.

Public function Static

double

 

HausdorffDistanceSerial

(
    const TriangleMeshType& MeshA,
    const MeshSpatialType& SpatialB
)

Compute all distances in serial, then a serial raw loop to find max.

Public function Static

double

 

MaxEdgeLength

(
    const TriangleMeshType& Mesh
)

Compute the longest edge length for the given mesh.

Public function Static

double

 

MinEdgeLength

(
    const TriangleMeshType& Mesh
)

Compute the shortest edge length for the given mesh.

Public function Static

FIntrRay3Tri...

 

RayTriangleIntersection

(
    const TriangleMeshType& Mesh,
    int TriIdx,
    const FRay3d& Ray
)

Convenience function to construct a IntrRay3Triangle3 object for a Mesh triangle

Public function Static

FDistPoint3T...

 

TriangleDistance

(
    const TriangleMeshType& Mesh,
    int TriIdx,
    FVector3d Point
)

Construct a DistPoint3Triangle3 object for a Mesh triangle

Public function Static

FIntrRay3Tri...

 

TriangleIntersection

(
    const TriangleMeshType& Mesh,
    int TriIdx,
    const FRay3d& Ray
)

Convenience function to construct a IntrRay3Triangle3 object for a Mesh triangle

Public function Static

double

 

TriDistanceSqr

(
    const TriangleMeshType& Mesh,
    int TriIdx,
    const FVector3d& Point
)

Compute distance from Point to triangle in Mesh, with minimal extra objects/etc

Public function Static

double

 

TwoSidedHausdorffDistance

(
    const TriangleMeshType& MeshA,
    const MeshSpatialType& SpatialA,
    const TriangleMeshType& MeshB,
    const MeshSpatialType& SpatialB
)

Because Hausdorff distance is not symmetric, we compute the maximum of the distances between two surfaces.

Public function Static

double

 

TwoSidedHausdorffDistanceSerial

(
    const TriangleMeshType& MeshA,
    const MeshSpatialType& SpatialA,
    const TriangleMeshType& MeshB,
    const MeshSpatialType& SpatialB
)

Public function Static

void

 

VertexToSurfaceDistances

(
    const TriangleMeshType& MeshA,
    const MeshSpatialType& SpatialB,
    TArray< double >& Distances
)

For each vertex on MeshA, compute the distance to the nearest point on the surface contained in SpatialB.

Public function Static

void

 

VertexToSurfaceDistancesSerial

(
    const TriangleMeshType& MeshA,
    const MeshSpatialType& SpatialB,
    TArray< double >& Distances
)

Compute all vertex-to-surface distances in serial. Should only be used for debugging the parallel version above!

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss