Search Results for

    Show / Hide Table of Contents

    Struct Triangle

    A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry. A triangle with vertices A, B, and C is denoted.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: ProjectDawn.Geometry3D
    Assembly: ProjectDawn.Geometry.dll
    Syntax
    [Serializable]
    public struct Triangle

    Constructors

    | Improve this Doc View Source

    Triangle(float3, float3, float3)

    Declaration
    public Triangle(float3 a, float3 b, float3 c)
    Parameters
    Type Name Description
    Unity.Mathematics.float3 a
    Unity.Mathematics.float3 b
    Unity.Mathematics.float3 c

    Fields

    | Improve this Doc View Source

    VertexA

    Declaration
    public float3 VertexA
    Field Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    VertexB

    Declaration
    public float3 VertexB
    Field Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    VertexC

    Declaration
    public float3 VertexC
    Field Value
    Type Description
    Unity.Mathematics.float3

    Properties

    | Improve this Doc View Source

    Area

    Returns the area of the triangle.

    Declaration
    public float Area { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Center

    Returns center of triangle.

    Declaration
    public float3 Center { get; }
    Property Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Normal

    Returns normal of triangle. Normal direction depends from triangle clockwise order.

    Declaration
    public float3 Normal { get; }
    Property Value
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    Perimeter

    Returns the perimeter of the triangle.

    Declaration
    public float Perimeter { get; }
    Property Value
    Type Description
    System.Single

    Methods

    | Improve this Doc View Source

    BarycentricCoordinates(float3)

    Returns point barycentric coordinates.

    Declaration
    public float3 BarycentricCoordinates(float3 point)
    Parameters
    Type Name Description
    Unity.Mathematics.float3 point

    Point coverted to barycentric.

    Returns
    Type Description
    Unity.Mathematics.float3
    | Improve this Doc View Source

    BoundingBox()

    Returns minimum rectangle that fully covers shape.

    Declaration
    public Box BoundingBox()
    Returns
    Type Description
    Box
    | Improve this Doc View Source

    GetLines(out Line, out Line, out Line)

    Returns triangle lines.

    Declaration
    public void GetLines(out Line a, out Line b, out Line c)
    Parameters
    Type Name Description
    Line a
    Line b
    Line c
    | Improve this Doc View Source

    Intersection(Triangle, out Line)

    Returns true if triangles intersect.

    Declaration
    public bool Intersection(Triangle triangle, out Line line)
    Parameters
    Type Name Description
    Triangle triangle

    Triangle.

    Line line

    Intersection line.

    Returns
    Type Description
    System.Boolean

    Returns true if triangles intersect.

    | Improve this Doc View Source

    IsClockwise()

    Returns if triangle vertices are clockwise ordered.

    Declaration
    public bool IsClockwise()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsCounterClockwise()

    Returns if triangle vertices are counter clockwise ordered.

    Declaration
    public bool IsCounterClockwise()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsValid()

    Returns true if triangle is valid.

    Declaration
    public bool IsValid()
    Returns
    Type Description
    System.Boolean

    Returns true if triangle is valid.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © ProjectDawn.
    Generated by DocFX