Struct SurfacePointIntersection
Intersection point of the surface.
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
public struct SurfacePointIntersection
Fields
| Improve this Doc View SourceTime
The time at which ray hits the surface.
Declaration
public float Time
Field Value
| Type | Description |
|---|---|
| System.Single |
TriangleIndex
The index of the triangle that was hit.
Declaration
public int TriangleIndex
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
| Improve this Doc View SourceGetBarycentric<T>(Ray, TriangularSurface<T>)
Returns the barycentric coordinate of the triangle we hit.
Declaration
public float3 GetBarycentric<T>(Ray ray, TriangularSurface<T> surface)
where T : struct, ITransformFloat3
Parameters
| Type | Name | Description |
|---|---|---|
| Ray | ray | |
| TriangularSurface<T> | surface |
Returns
| Type | Description |
|---|---|
| Unity.Mathematics.float3 |
Type Parameters
| Name | Description |
|---|---|
| T |
GetDistance(Ray)
The distance from the ray's origin to the impact point.
Declaration
public float GetDistance(Ray ray)
Parameters
| Type | Name | Description |
|---|---|---|
| Ray | ray |
Returns
| Type | Description |
|---|---|
| System.Single |
GetNormal<T>(TriangularSurface<T>)
Returns the normal of the surface the ray hit.
Declaration
public float3 GetNormal<T>(TriangularSurface<T> surface)
where T : struct, ITransformFloat3
Parameters
| Type | Name | Description |
|---|---|---|
| TriangularSurface<T> | surface |
Returns
| Type | Description |
|---|---|
| Unity.Mathematics.float3 |
Type Parameters
| Name | Description |
|---|---|
| T |
GetPoint(Ray)
Returns intersection point.
Declaration
public float3 GetPoint(Ray ray)
Parameters
| Type | Name | Description |
|---|---|---|
| Ray | ray |
Returns
| Type | Description |
|---|---|
| Unity.Mathematics.float3 |