Struct Triangle
Represents a triangle in 3D space that supports raycasting
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
Namespace: AnyPath.Graphs
Assembly: Assembly-CSharp.dll
Syntax
public struct Triangle
Constructors
| Improve this Doc View SourceTriangle(Vector3, Vector3, Vector3)
Declaration
public Triangle(Vector3 a, Vector3 b, Vector3 c)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | a | |
UnityEngine.Vector3 | b | |
UnityEngine.Vector3 | c |
Fields
| Improve this Doc View Sourcea
Declaration
public float3 a
Field Value
Type | Description |
---|---|
Unity.Mathematics.float3 |
b
Declaration
public float3 b
Field Value
Type | Description |
---|---|
Unity.Mathematics.float3 |
c
Declaration
public float3 c
Field Value
Type | Description |
---|---|
Unity.Mathematics.float3 |
Properties
| Improve this Doc View SourceCentroid
Declaration
public readonly float3 Centroid { get; }
Property Value
Type | Description |
---|---|
Unity.Mathematics.float3 |
Normal
Declaration
public readonly float3 Normal { get; }
Property Value
Type | Description |
---|---|
Unity.Mathematics.float3 |
Methods
| Improve this Doc View SourceRaycast(Ray, out float3)
Checks if the specified ray hits the triangle. Möller–Trumbore ray-triangle intersection algorithm implementation.
Declaration
public bool Raycast(Ray ray, out float3 point)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Ray | ray | The ray to test hit for. |
Unity.Mathematics.float3 | point | The point where the triangle was hit. |
Returns
Type | Description |
---|---|
System.Boolean |
|