interface MAGES::Interaction::Runtime::ILineRenderable¶
Overview¶
An interface for objects that can be rendered as a line. More…
interface ILineRenderable { // methods bool TryGetLinePoints(out Vector3[] points); bool TryGetHitPoint( out Vector3 hitPosition, out Vector3 hitNormal, out int pointIndex ); bool TryGetReticle(out GameObject reticle); }; // direct descendants class HandInteractor; class SimpleUIInteractor;
Detailed Documentation¶
An interface for objects that can be rendered as a line.
Methods¶
bool TryGetLinePoints(out Vector3[] points)
Returns a list of the points that make up the line.
Parameters:
points |
An array of all the points defining the line. |
Returns:
true
if able to get at least 2 points (that make a line).
bool TryGetHitPoint( out Vector3 hitPosition, out Vector3 hitNormal, out int pointIndex )
Gets the hit point of the line.
Parameters:
hitPosition |
The position the line hits the object. |
hitNormal |
The normal at the hit position. |
pointIndex |
The point index in the line points at which the hit occurs. |
Returns:
true
if the line hits an object and the object can be interacted.
bool TryGetReticle(out GameObject reticle)
Gets the reticle for the line end.
Parameters:
reticle |
The reticle gameobject. Forward will be aligned with the normal of the hit point. |
Returns:
true
if the reticle exists.