Interface ICurveInteractionDataProvider
Abstracts the interaction data required to render a curve from an origin to an endpoint.
Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public interface ICurveInteractionDataProvider
Properties
curveOrigin
The transform used to determine the origin of the curve.
Declaration
Transform curveOrigin { get; }
Property Value
Type | Description |
---|---|
Transform |
See Also
hasValidSelect
Indicates if the data provider has a valid selection.
Declaration
bool hasValidSelect { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
isActive
Indicates if the data provider is active. If false, the data in the other fields may be stale.
Declaration
bool isActive { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
lastSamplePoint
Sample point at the last index of samplePoints.
Declaration
Vector3 lastSamplePoint { get; }
Property Value
Type | Description |
---|---|
Vector3 |
See Also
samplePoints
The curve sample points used to determine interaction results.
Declaration
NativeArray<Vector3> samplePoints { get; }
Property Value
Type | Description |
---|---|
NativeArray<Vector3> |
See Also
Methods
TryGetCurveEndNormal(out Vector3, bool)
Attempts to determine the normal at the endpoint of the curve. This method will transform the captured local direction of the normal on select if tracking a snapped attach point.
Declaration
EndPointType TryGetCurveEndNormal(out Vector3 endNormal, bool snapToSelectedAttachIfAvailable = false)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | endNormal | Output parameter that will hold the normal vector at the curve's endpoint. |
bool | snapToSelectedAttachIfAvailable | If true, the method will attempt to snap to the selected attach point, if it's available. |
Returns
Type | Description |
---|---|
EndPointType | Returns an EndPointType indicating the type of the endpoint where the normal was determined. |
See Also
TryGetCurveEndPoint(out Vector3, bool, bool)
Attempts to determine the end point of the curve. The end point can be set to either an attach point or the end of a raycast hit.
Declaration
EndPointType TryGetCurveEndPoint(out Vector3 endPoint, bool snapToSelectedAttachIfAvailable = false, bool snapToSnapVolumeIfAvailable = false)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | endPoint | Output parameter that will hold the end point vector. |
bool | snapToSelectedAttachIfAvailable | If set to true, the method will try to snap to the selected attach point, if available. |
bool | snapToSnapVolumeIfAvailable | If set to true, the method will try to snap to the nearest snap volume, if available. |
Returns
Type | Description |
---|---|
EndPointType | Returns an EndPointType indicating the type of the end point determined. |