Class MeshQueries
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public static class MeshQueries
Methods
BaryCoords(DMesh3, Int32, Vector3d)
Get barycentric coords of point in triangle
Declaration
public static Vector3d BaryCoords(DMesh3 mesh, int tID, Vector3d point)
Parameters
Returns
EdgeLengthStats(DMesh3, out Double, out Double, out Double, Int32)
Declaration
public static void EdgeLengthStats(DMesh3 mesh, out double minEdgeLen, out double maxEdgeLen, out double avgEdgeLen, int samples = 0)
Parameters
EdgeLengthStatsFromEdges(DMesh3, IEnumerable<Int32>, out Double, out Double, out Double, Int32)
Declaration
public static void EdgeLengthStatsFromEdges(DMesh3 mesh, IEnumerable<int> EdgeItr, out double minEdgeLen, out double maxEdgeLen, out double avgEdgeLen, int samples = 0)
Parameters
FindHitTriangle_LinearSearch(DMesh3, Ray3d)
Declaration
public static int FindHitTriangle_LinearSearch(DMesh3 mesh, Ray3d ray)
Parameters
Returns
FindIntersectingTriangles_LinearSearch(DMesh3, DMesh3)
brute force search for any intersecting triangles on two meshes
Declaration
public static Index2i FindIntersectingTriangles_LinearSearch(DMesh3 mesh1, DMesh3 mesh2)
Parameters
Returns
FindNearestTriangle_LinearSearch(DMesh3, Vector3d)
Declaration
public static int FindNearestTriangle_LinearSearch(DMesh3 mesh, Vector3d p)
Parameters
Returns
FindNearestTriangles_LinearSearch(DMesh3, DMesh3, out Double)
Brute-force search for closest pair of triangles on two meshes
Declaration
public static Index2i FindNearestTriangles_LinearSearch(DMesh3 mesh1, DMesh3 mesh2, out double fNearestSqr)
Parameters
Returns
FindNearestVertex_LinearSearch(DMesh3, Vector3d)
Declaration
public static int FindNearestVertex_LinearSearch(DMesh3 mesh, Vector3d p)
Parameters
Returns
NearestPointDistance(DMesh3, ISpatial, Vector3d, Double)
Find distance from point to mesh
Returns interpolated vertex-normal frame if available, otherwise tri-normal frame.
Declaration
public static double NearestPointDistance(DMesh3 mesh, ISpatial spatial, Vector3d queryPoint, double maxDist = 1.7976931348623157E+308)
Parameters
Returns
NearestPointFrame(DMesh3, ISpatial, Vector3d, Boolean)
Find point-normal(Z) frame at closest point to queryPoint on mesh.
Returns interpolated vertex-normal frame if available, otherwise tri-normal frame.
Declaration
public static Frame3f NearestPointFrame(DMesh3 mesh, ISpatial spatial, Vector3d queryPoint, bool bForceFaceNormal = false)
Parameters
Returns
RayHitPointFrame(DMesh3, ISpatial, Ray3d, out Frame3f, Boolean)
Find point-normal frame at ray-intersection point on mesh, or return false if no hit.
Returns interpolated vertex-normal frame if available, otherwise tri-normal frame.
Declaration
public static bool RayHitPointFrame(DMesh3 mesh, ISpatial spatial, Ray3d ray, out Frame3f hitPosFrame, bool bForceFaceNormal = false)
Parameters
Returns
SurfaceFrame(DMesh3, Int32, Vector3d, Boolean)
Get point-normal frame on surface of mesh. Assumption is that point lies in tID.
returns interpolated vertex-normal frame if available, otherwise tri-normal frame.
Declaration
public static Frame3f SurfaceFrame(DMesh3 mesh, int tID, Vector3d point, bool bForceFaceNormal = false)
Parameters
Returns
TriangleDistance(DMesh3, Int32, Vector3d)
construct a DistPoint3Triangle3 object for a mesh triangle
Declaration
public static DistPoint3Triangle3 TriangleDistance(DMesh3 mesh, int ti, Vector3d point)
Parameters
Returns
TriangleIntersection(DMesh3, Int32, Ray3d)
convenience function to construct a IntrRay3Triangle3 object for a mesh triangle
Declaration
public static IntrRay3Triangle3 TriangleIntersection(DMesh3 mesh, int ti, Ray3d ray)
Parameters
Returns
TrianglesDistance(DMesh3, Int32, DMesh3, Int32, Func<Vector3d, Vector3d>)
convenience function to construct a DistTriangle3Triangle3 object for two mesh triangles
Declaration
public static DistTriangle3Triangle3 TrianglesDistance(DMesh3 mesh1, int ti, DMesh3 mesh2, int tj, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
TrianglesIntersection(DMesh3, Int32, DMesh3, Int32, Func<Vector3d, Vector3d>)
convenience function to construct a IntrTriangle3Triangle3 object for two mesh triangles
Declaration
public static IntrTriangle3Triangle3 TrianglesIntersection(DMesh3 mesh1, int ti, DMesh3 mesh2, int tj, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
TriangleTriangleDistance(DMesh3, Int32, DMesh3, Int32, Func<Vector3d, Vector3d>)
find distance between two triangles, with optional
transform on second triangle
Declaration
public static DistTriangle3Triangle3 TriangleTriangleDistance(DMesh3 mesh1, int ti, DMesh3 mesh2, int tj, Func<Vector3d, Vector3d> TransformF = null)
Parameters
Returns
TriDistanceSqr(DMesh3, Int32, Vector3d)
Compute distance from point to triangle in mesh, with minimal extra objects/etc
Declaration
public static double TriDistanceSqr(DMesh3 mesh, int ti, Vector3d point)
Parameters
Returns