Struct Line
Line segment that has start and end points.
Inherited Members
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: ProjectDawn.Geometry.dll
Syntax
[Serializable]
public struct Line : IEquatable<Line>
Constructors
|
Improve this Doc
View Source
Line(float3, float3)
Declaration
public Line(float3 from, float3 to)
Parameters
| Type |
Name |
Description |
| Unity.Mathematics.float3 |
from |
|
| Unity.Mathematics.float3 |
to |
|
Fields
|
Improve this Doc
View Source
From
Declaration
Field Value
| Type |
Description |
| Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
To
Declaration
Field Value
| Type |
Description |
| Unity.Mathematics.float3 |
|
Properties
|
Improve this Doc
View Source
Direction
Returns direction of the line.
Declaration
public float3 Direction { get; }
Property Value
| Type |
Description |
| Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
Length
Returns length of the line.
Declaration
public float Length { get; }
Property Value
| Type |
Description |
| System.Single |
|
|
Improve this Doc
View Source
MidPoint
Declaration
public float3 MidPoint { get; }
Property Value
| Type |
Description |
| Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
Towards
Declaration
public float3 Towards { get; }
Property Value
| Type |
Description |
| Unity.Mathematics.float3 |
|
Methods
|
Improve this Doc
View Source
ClosestPoint(float3)
Returns a point on the perimeter of this rectangle that is closest to the specified point.
Declaration
public float3 ClosestPoint(float3 point)
Parameters
| Type |
Name |
Description |
| Unity.Mathematics.float3 |
point |
|
Returns
| Type |
Description |
| Unity.Mathematics.float3 |
|
|
Improve this Doc
View Source
Equals(Line)
Declaration
public bool Equals(Line other)
Parameters
| Type |
Name |
Description |
| Line |
other |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
| Type |
Name |
Description |
| System.Object |
other |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
|
Improve this Doc
View Source
Intersection(Triangle, out float3)
Returns true if line intersects triangle.
Declaration
public bool Intersection(Triangle triangle, out float3 point)
Parameters
| Type |
Name |
Description |
| Triangle |
triangle |
Triangle.
|
| Unity.Mathematics.float3 |
point |
Intersection point.
|
Returns
| Type |
Description |
| System.Boolean |
Returns true if line intersects triangle.
|
|
Improve this Doc
View Source
ToRay()
Declaration
Returns
Operators
|
Improve this Doc
View Source
Equality(Line, Line)
Declaration
public static bool operator ==(Line lhs, Line rhs)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Implicit(Single to Line)
Declaration
public static implicit operator Line(float value)
Parameters
| Type |
Name |
Description |
| System.Single |
value |
|
Returns
|
Improve this Doc
View Source
Inequality(Line, Line)
Declaration
public static bool operator !=(Line lhs, Line rhs)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implements
System.IEquatable<T>