Search Results for

    Show / Hide Table of Contents

    Class LineSegment3DEx

    Inheritance
    System.Object
    LineSegment3DEx
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: PLATEAU.Util.GeoGraph
    Assembly: cs.temp.dll.dll
    Syntax
    public static class LineSegment3DEx

    Methods

    GetDistance(LineSegment3D, Vector3)

    selfとvの距離を返す

    Declaration
    public static float GetDistance(this LineSegment3D self, Vector3 v)
    Parameters
    Type Name Description
    LineSegment3D self
    Vector3 v
    Returns
    Type Description
    System.Single

    GetNearestPoint(LineSegment3D, Vector3)

    点vから線分に対して最も近い点を返す

    Declaration
    public static Vector3 GetNearestPoint(this LineSegment3D self, Vector3 v)
    Parameters
    Type Name Description
    LineSegment3D self
    Vector3 v
    Returns
    Type Description
    Vector3

    GetNearestPoint(LineSegment3D, Vector3, out Single)

    点vから線分に対して最も近い点を返す.

    Declaration
    public static Vector3 GetNearestPoint(this LineSegment3D self, Vector3 v, out float distanceFromStart)
    Parameters
    Type Name Description
    LineSegment3D self
    Vector3 v
    System.Single distanceFromStart

    self.Startからの距離が入る

    Returns
    Type Description
    Vector3

    GetPoint(LineSegment3D, Single)

    self.Start + distance * self.Direction

    Declaration
    public static Vector3 GetPoint(this LineSegment3D self, float distance)
    Parameters
    Type Name Description
    LineSegment3D self
    System.Single distance
    Returns
    Type Description
    Vector3

    Lerp(LineSegment3D, Single)

    Vector3.Lerp(self.Start, self.End, t)

    Declaration
    public static Vector3 Lerp(this LineSegment3D self, float t)
    Parameters
    Type Name Description
    LineSegment3D self
    System.Single t
    Returns
    Type Description
    Vector3

    Reversed(LineSegment3D)

    Start/End反転させたものを返す

    Declaration
    public static LineSegment3D Reversed(this LineSegment3D self)
    Parameters
    Type Name Description
    LineSegment3D self
    Returns
    Type Description
    LineSegment3D

    To2D(LineSegment3D, Func<Vector3, Vector2>)

    Declaration
    public static LineSegment2D To2D(this LineSegment3D self, Func<Vector3, Vector2> toVec2)
    Parameters
    Type Name Description
    LineSegment3D self
    Func<Vector3, Vector2> toVec2
    Returns
    Type Description
    LineSegment2D

    To2D(LineSegment3D, AxisPlane)

    Declaration
    public static LineSegment2D To2D(this LineSegment3D self, AxisPlane plane)
    Parameters
    Type Name Description
    LineSegment3D self
    AxisPlane plane
    Returns
    Type Description
    LineSegment2D

    TryHalfLineIntersectionBy2D(LineSegment3D, Vector3, Vector3, AxisPlane, Single, out Vector3, out Single, out Single)

    selfと半直線(origin, dir)が交差するかチェック. ただし、planeで指定された平面に射影した状態での交差判定かつ、そのうえで平面の法線方向の差分がnormalTolerance以下の場合のみ交差と判定. normalToleranceが負数の時は無限大扱い

    Declaration
    public static bool TryHalfLineIntersectionBy2D(this LineSegment3D self, Vector3 origin, Vector3 dir, AxisPlane plane, float normalTolerance, out Vector3 intersection, out float halfLineOffset, out float selfT)
    Parameters
    Type Name Description
    LineSegment3D self
    Vector3 origin
    Vector3 dir
    AxisPlane plane
    System.Single normalTolerance
    Vector3 intersection
    System.Single halfLineOffset
    System.Single selfT
    Returns
    Type Description
    System.Boolean

    TryLineIntersectionBy2D(LineSegment3D, Vector3, Vector3, AxisPlane, Single, out Vector3, out Single, out Single)

    selfと直線(origin, dir)が交差するかチェック. ただし、planeで指定された平面に射影した状態での交差判定かつ、そのうえで平面の法線方向の差分がnormalTolerance以下の場合のみ交差と判定. normalToleranceが負数の時は無限大扱い

    Declaration
    public static bool TryLineIntersectionBy2D(this LineSegment3D self, Vector3 origin, Vector3 dir, AxisPlane plane, float normalTolerance, out Vector3 intersection, out float lineLength, out float segmentT)
    Parameters
    Type Name Description
    LineSegment3D self
    Vector3 origin
    Vector3 dir
    AxisPlane plane
    System.Single normalTolerance
    Vector3 intersection
    System.Single lineLength
    System.Single segmentT
    Returns
    Type Description
    System.Boolean

    TrySegmentIntersectionBy2D(LineSegment3D, LineSegment3D, AxisPlane, Single, out Vector3)

    self, otherが交差するかチェック. ただし、planeで指定された平面に射影した状態での交差判定かつ、そのうえで平面の法線方向の差分がnormalEpsilon以下の場合のみ交差と判定

    Declaration
    public static bool TrySegmentIntersectionBy2D(this LineSegment3D self, LineSegment3D other, AxisPlane plane, float normalEpsilon, out Vector3 intersection)
    Parameters
    Type Name Description
    LineSegment3D self
    LineSegment3D other
    AxisPlane plane
    System.Single normalEpsilon
    Vector3 intersection
    Returns
    Type Description
    System.Boolean

    TrySegmentIntersectionBy2D(LineSegment3D, LineSegment3D, AxisPlane, Single, out Vector3, out Single, out Single)

    self, otherが交差するかチェック. ただし、planeで指定された平面に射影した状態での交差判定かつ、そのうえで平面の法線方向の差分がnormalTolerance以下の場合のみ交差と判定. normalToleranceが負数の時は無限大扱い normal

    Declaration
    public static bool TrySegmentIntersectionBy2D(this LineSegment3D self, LineSegment3D other, AxisPlane plane, float normalTolerance, out Vector3 intersection, out float selfT, out float otherT)
    Parameters
    Type Name Description
    LineSegment3D self
    LineSegment3D other
    AxisPlane plane
    System.Single normalTolerance

    法線成分のねじれ許容量

    Vector3 intersection

    交点

    System.Single selfT

    selfから見た交点を表す正規化位置

    System.Single otherT

    otherから見た交点を表す正規化位置

    Returns
    Type Description
    System.Boolean
    In This Article
    Back to top PLATEAU SDK for Unity