Class ScreenToWorld
Inheritance
ScreenToWorld
Inherited Members
Unity.Entities.ComponentSystemBase.GetArchetypeChunkComponentType<T>(System.Boolean)
Unity.Entities.ComponentSystemBase.GetArchetypeChunkComponentTypeDynamic(Unity.Entities.ComponentType)
Unity.Entities.ComponentSystemBase.GetArchetypeChunkBufferType<T>(System.Boolean)
Unity.Entities.ComponentSystemBase.GetArchetypeChunkSharedComponentType<T>()
Unity.Entities.ComponentSystemBase.GetArchetypeChunkEntityType()
Syntax
public class ScreenToWorld : SystemBase
Methods
Declaration
public float2 AdjustInputPositionToPixels(float2 inputPos)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
inputPos |
|
Returns
Type |
Description |
Unity.Mathematics.float2 |
|
CameraFromPass(Entity)
Declaration
protected Entity CameraFromPass(Entity ePass)
Parameters
Type |
Name |
Description |
Entity |
ePass |
|
Returns
FindCamera(ScreenToWorldId)
Declaration
protected Entity FindCamera(ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Returns
FindPickRoot(out Entity, out Entity, ScreenToWorldId)
Declaration
protected void FindPickRoot(out Entity eOutPickRoot, out Entity eOutPass, ScreenToWorldId id)
Parameters
GetWorldSpaceCameraPlane(out float3, out float3, out float3, Single, Entity)
Declaration
public void GetWorldSpaceCameraPlane(out float3 pos, out float3 up, out float3 left, float distanceToCamera, Entity eCam = null)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
pos |
|
Unity.Mathematics.float3 |
up |
|
Unity.Mathematics.float3 |
left |
|
Single |
distanceToCamera |
|
Entity |
eCam |
|
InputPosToWorldSpacePos(float2, Single, ScreenToWorldId)
Declaration
public float3 InputPosToWorldSpacePos(float2 inputPos, float distanceToCamera, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Returns
Type |
Description |
Unity.Mathematics.float3 |
|
InputPosToWorldSpaceRay(float2, out float3, out float3, ScreenToWorldId)
Declaration
public void InputPosToWorldSpaceRay(float2 inputPos, out float3 origin, out float3 direction, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
inputPos |
|
Unity.Mathematics.float3 |
origin |
|
Unity.Mathematics.float3 |
direction |
|
ScreenToWorldId |
id |
|
IntersectPlaneRay(float3, float3, float3, float3)
Declaration
protected float3 IntersectPlaneRay(float3 planePos, float3 planeNormal, float3 rayOrigin, float3 rayDirection)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
planePos |
|
Unity.Mathematics.float3 |
planeNormal |
|
Unity.Mathematics.float3 |
rayOrigin |
|
Unity.Mathematics.float3 |
rayDirection |
|
Returns
Type |
Description |
Unity.Mathematics.float3 |
|
Declaration
public static float4 InversePassTransform(float4 pos, in RenderPass pass)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4 |
pos |
|
RenderPass |
pass |
|
Returns
Type |
Description |
Unity.Mathematics.float4 |
|
Declaration
public static float2 InverseViewPortTransform(float2 p, RenderPass pass)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
p |
|
RenderPass |
pass |
|
Returns
Type |
Description |
Unity.Mathematics.float2 |
|
OnUpdate()
Declaration
protected override void OnUpdate()
Overrides
Declaration
public static float4 PassTransform(float4 pos, in RenderPass pass)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4 |
pos |
|
RenderPass |
pass |
|
Returns
Type |
Description |
Unity.Mathematics.float4 |
|
ScreenSpaceToWorldSpace(float2, Single, ScreenToWorldId)
Declaration
public float3 ScreenSpaceToWorldSpace(float2 screenPos, float normalizedZ, ScreenToWorldId id)
Parameters
Returns
Type |
Description |
Unity.Mathematics.float3 |
|
ScreenSpaceToWorldSpacePos(float2, Single, ScreenToWorldId)
Declaration
public float3 ScreenSpaceToWorldSpacePos(float2 screenPos, float distanceToCamera, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Returns
Type |
Description |
Unity.Mathematics.float3 |
|
ScreenSpaceToWorldSpaceRay(float2, out float3, out float3, ScreenToWorldId)
Declaration
public void ScreenSpaceToWorldSpaceRay(float2 screenPos, out float3 origin, out float3 direction, ScreenToWorldId id = ScreenToWorldId.MainCamera)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
screenPos |
|
Unity.Mathematics.float3 |
origin |
|
Unity.Mathematics.float3 |
direction |
|
ScreenToWorldId |
id |
|
Declaration
public static float2 ViewPortTransform(float2 p, RenderPass pass)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
p |
|
RenderPass |
pass |
|
Returns
Type |
Description |
Unity.Mathematics.float2 |
|
WorldSpaceToScreenSpace(float3, ScreenToWorldId)
Declaration
public float3 WorldSpaceToScreenSpace(float3 worldPos, ScreenToWorldId id)
Parameters
Returns
Type |
Description |
Unity.Mathematics.float3 |
|