Search Results for

    Show / Hide Table of Contents

    Class MeshQueries

    Inheritance
    Object
    MeshQueries
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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
    Type Name Description
    DMesh3 mesh
    Int32 tID
    Vector3d point
    Returns
    Type Description
    Vector3d

    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
    Type Name Description
    DMesh3 mesh
    Double minEdgeLen
    Double maxEdgeLen
    Double avgEdgeLen
    Int32 samples

    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
    Type Name Description
    DMesh3 mesh
    IEnumerable<Int32> EdgeItr
    Double minEdgeLen
    Double maxEdgeLen
    Double avgEdgeLen
    Int32 samples

    FindHitTriangle_LinearSearch(DMesh3, Ray3d)

    Declaration
    public static int FindHitTriangle_LinearSearch(DMesh3 mesh, Ray3d ray)
    Parameters
    Type Name Description
    DMesh3 mesh
    Ray3d ray
    Returns
    Type Description
    Int32

    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
    Type Name Description
    DMesh3 mesh1
    DMesh3 mesh2
    Returns
    Type Description
    Index2i

    FindNearestTriangle_LinearSearch(DMesh3, Vector3d)

    Declaration
    public static int FindNearestTriangle_LinearSearch(DMesh3 mesh, Vector3d p)
    Parameters
    Type Name Description
    DMesh3 mesh
    Vector3d p
    Returns
    Type Description
    Int32

    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
    Type Name Description
    DMesh3 mesh1
    DMesh3 mesh2
    Double fNearestSqr
    Returns
    Type Description
    Index2i

    FindNearestVertex_LinearSearch(DMesh3, Vector3d)

    Declaration
    public static int FindNearestVertex_LinearSearch(DMesh3 mesh, Vector3d p)
    Parameters
    Type Name Description
    DMesh3 mesh
    Vector3d p
    Returns
    Type Description
    Int32

    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
    Type Name Description
    DMesh3 mesh
    ISpatial spatial
    Vector3d queryPoint
    Double maxDist
    Returns
    Type Description
    Double

    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
    Type Name Description
    DMesh3 mesh
    ISpatial spatial
    Vector3d queryPoint
    Boolean bForceFaceNormal
    Returns
    Type Description
    Frame3f

    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
    Type Name Description
    DMesh3 mesh
    ISpatial spatial
    Ray3d ray
    Frame3f hitPosFrame
    Boolean bForceFaceNormal
    Returns
    Type Description
    Boolean

    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
    Type Name Description
    DMesh3 mesh
    Int32 tID
    Vector3d point
    Boolean bForceFaceNormal
    Returns
    Type Description
    Frame3f

    TriangleDistance(DMesh3, Int32, Vector3d)

    construct a DistPoint3Triangle3 object for a mesh triangle

    Declaration
    public static DistPoint3Triangle3 TriangleDistance(DMesh3 mesh, int ti, Vector3d point)
    Parameters
    Type Name Description
    DMesh3 mesh
    Int32 ti
    Vector3d point
    Returns
    Type Description
    DistPoint3Triangle3

    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
    Type Name Description
    DMesh3 mesh
    Int32 ti
    Ray3d ray
    Returns
    Type Description
    IntrRay3Triangle3

    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
    Type Name Description
    DMesh3 mesh1
    Int32 ti
    DMesh3 mesh2
    Int32 tj
    Func<Vector3d, Vector3d> TransformF
    Returns
    Type Description
    DistTriangle3Triangle3

    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
    Type Name Description
    DMesh3 mesh1
    Int32 ti
    DMesh3 mesh2
    Int32 tj
    Func<Vector3d, Vector3d> TransformF
    Returns
    Type Description
    IntrTriangle3Triangle3

    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
    Type Name Description
    DMesh3 mesh1
    Int32 ti
    DMesh3 mesh2
    Int32 tj
    Func<Vector3d, Vector3d> TransformF
    Returns
    Type Description
    DistTriangle3Triangle3

    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
    Type Name Description
    DMesh3 mesh
    Int32 ti
    Vector3d point
    Returns
    Type Description
    Double
    In This Article
    Back to top ViRGIS VR GIS