Search Results for

    Show / Hide Table of Contents

    Struct Segment2d

    Implements
    IParametricCurve2d
    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public struct Segment2d : IParametricCurve2d

    Constructors

    Segment2d(Vector2d, Vector2d)

    Declaration
    public Segment2d(Vector2d p0, Vector2d p1)
    Parameters
    Type Name Description
    Vector2d p0
    Vector2d p1

    Segment2d(Vector2d, Vector2d, Double)

    Declaration
    public Segment2d(Vector2d center, Vector2d direction, double extent)
    Parameters
    Type Name Description
    Vector2d center
    Vector2d direction
    Double extent

    Fields

    Center

    Declaration
    public Vector2d Center
    Field Value
    Type Description
    Vector2d

    Direction

    Declaration
    public Vector2d Direction
    Field Value
    Type Description
    Vector2d

    Extent

    Declaration
    public double Extent
    Field Value
    Type Description
    Double

    Properties

    ArcLength

    Declaration
    public double ArcLength { get; }
    Property Value
    Type Description
    Double

    HasArcLength

    Declaration
    public bool HasArcLength { get; }
    Property Value
    Type Description
    Boolean

    IsClosed

    Declaration
    public bool IsClosed { get; }
    Property Value
    Type Description
    Boolean

    IsTransformable

    Declaration
    public bool IsTransformable { get; }
    Property Value
    Type Description
    Boolean

    Length

    Declaration
    public double Length { get; }
    Property Value
    Type Description
    Double

    P0

    Declaration
    public Vector2d P0 { get; set; }
    Property Value
    Type Description
    Vector2d

    P1

    Declaration
    public Vector2d P1 { get; set; }
    Property Value
    Type Description
    Vector2d

    ParamLength

    Declaration
    public double ParamLength { get; }
    Property Value
    Type Description
    Double

    Methods

    Clone()

    Declaration
    public IParametricCurve2d Clone()
    Returns
    Type Description
    IParametricCurve2d

    DistanceSquared(Vector2d)

    Declaration
    public double DistanceSquared(Vector2d p)
    Parameters
    Type Name Description
    Vector2d p
    Returns
    Type Description
    Double

    DistanceSquared(Vector2d, out Double)

    Declaration
    public double DistanceSquared(Vector2d p, out double t)
    Parameters
    Type Name Description
    Vector2d p
    Double t
    Returns
    Type Description
    Double

    Endpoint(Int32)

    Declaration
    public Vector2d Endpoint(int i)
    Parameters
    Type Name Description
    Int32 i
    Returns
    Type Description
    Vector2d

    FastDistanceSquared(ref Vector2d, ref Vector2d, ref Vector2d)

    distance from pt to segment (a,b), with no square roots

    Declaration
    public static double FastDistanceSquared(ref Vector2d a, ref Vector2d b, ref Vector2d pt)
    Parameters
    Type Name Description
    Vector2d a
    Vector2d b
    Vector2d pt
    Returns
    Type Description
    Double

    Intersects(Segment2d, Double, Double)

    Declaration
    public bool Intersects(Segment2d seg2, double dotThresh = 4.94065645841247E-324, double intervalThresh = 0)
    Parameters
    Type Name Description
    Segment2d seg2
    Double dotThresh
    Double intervalThresh
    Returns
    Type Description
    Boolean

    Intersects(ref Segment2d, Double, Double)

    Test if segments intersect. Returns true for parallel-line overlaps. Returns same result as IntrSegment2Segment2.

    Declaration
    public bool Intersects(ref Segment2d seg2, double dotThresh = 4.94065645841247E-324, double intervalThresh = 0)
    Parameters
    Type Name Description
    Segment2d seg2
    Double dotThresh
    Double intervalThresh
    Returns
    Type Description
    Boolean

    NearestPoint(Vector2d)

    Declaration
    public Vector2d NearestPoint(Vector2d p)
    Parameters
    Type Name Description
    Vector2d p
    Returns
    Type Description
    Vector2d

    PointAt(Double)

    Declaration
    public Vector2d PointAt(double d)
    Parameters
    Type Name Description
    Double d
    Returns
    Type Description
    Vector2d

    PointBetween(Double)

    Declaration
    public Vector2d PointBetween(double t)
    Parameters
    Type Name Description
    Double t
    Returns
    Type Description
    Vector2d

    Project(Vector2d)

    Declaration
    public double Project(Vector2d p)
    Parameters
    Type Name Description
    Vector2d p
    Returns
    Type Description
    Double

    Reverse()

    Declaration
    public void Reverse()

    SampleArcLength(Double)

    Declaration
    public Vector2d SampleArcLength(double a)
    Parameters
    Type Name Description
    Double a
    Returns
    Type Description
    Vector2d

    SampleT(Double)

    Declaration
    public Vector2d SampleT(double t)
    Parameters
    Type Name Description
    Double t
    Returns
    Type Description
    Vector2d

    TangentT(Double)

    Declaration
    public Vector2d TangentT(double t)
    Parameters
    Type Name Description
    Double t
    Returns
    Type Description
    Vector2d

    Transform(ITransform2)

    Declaration
    public void Transform(ITransform2 xform)
    Parameters
    Type Name Description
    ITransform2 xform

    WhichSide(Vector2d, Double)

    Returns: +1, on right of line -1, on left of line 0, on the line

    Declaration
    public int WhichSide(Vector2d test, double tol = 0)
    Parameters
    Type Name Description
    Vector2d test
    Double tol
    Returns
    Type Description
    Int32

    WhichSide(ref Vector2d, ref Vector2d, ref Vector2d, Double)

    Returns: +1, on right of line -1, on left of line 0, on the line

    Declaration
    public static int WhichSide(ref Vector2d a, ref Vector2d b, ref Vector2d test, double tol = 0)
    Parameters
    Type Name Description
    Vector2d a
    Vector2d b
    Vector2d test
    Double tol
    Returns
    Type Description
    Int32

    Implements

    IParametricCurve2d
    In This Article
    Back to top ViRGIS VR GIS