Class HitTestContext
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
public sealed class HitTestContext
- Inheritance
-
HitTestContext
- Inherited Members
Constructors
HitTestContext(IRenderMatrices?, Ray, Vector2)
Initializes a new instance of the HitTestContext class.
public HitTestContext(IRenderMatrices? metrices, Ray rayWS, Vector2 hitSP)
Parameters
metricesIRenderMatricesThe render metrices.
rayWSRayThe ray in world space.
hitSPVector2The hit point on screen space. Pass in the hit point on viewport region directly.
Do not scale with DpiScale factor.
HitTestContext(IRenderMatrices?, ref Ray)
Initializes a new instance of the HitTestContext class. This calculates screen hit point automatically from metrices and world space ray.
public HitTestContext(IRenderMatrices? metrices, ref Ray rayWS)
Parameters
metricesIRenderMatricesThe render metrices.
rayWSRayThe ray in world space.
HitTestContext(IRenderMatrices?, ref Ray, ref Vector2)
Initializes a new instance of the HitTestContext class.
public HitTestContext(IRenderMatrices? metrices, ref Ray rayWS, ref Vector2 hitSP)
Parameters
metricesIRenderMatricesThe render metrices.
rayWSRayThe ray in world space.
hitSPVector2The hit point on screen space. Pass in the hit point on viewport region directly.
Do not scale with DpiScale factor.
HitTestContext(IRenderMatrices?, ref Vector2)
Initializes a new instance of the HitTestContext class. This calculates ray in world space automatically from metrices and hit point.
public HitTestContext(IRenderMatrices? metrices, ref Vector2 hitSP)
Parameters
metricesIRenderMatricesThe render metrices.
hitSPVector2Screen hit point. Pass in the hit point on viewport region directly.
Do not scale with DpiScale factor.
Properties
HitPointSP
Gets or sets the hit point on screen space. This is the hit point on viewport region without DpiScaled coordinate.
public Vector2 HitPointSP { get; set; }
Property Value
- Vector2
The screen hit point.
RayWS
Gets or sets the ray in world space.
public Ray RayWS { get; set; }
Property Value
- Ray
The ray.
RenderMatrices
Gets or sets the render matrices. This is only needed for line/point hit test.
public IRenderMatrices? RenderMatrices { get; set; }
Property Value
- IRenderMatrices
The render matrices.