Struct TargetIndicator
The contextual data that defines a tracked target in screen space.
Inherited Members
Namespace: TargetIndicators
Assembly: TargetIndicators.dll
Syntax
public struct TargetIndicator
Constructors
TargetIndicator(TargetIndicatorId, Transform, Pose, bool)
Constructs a TargetIndicator.
Declaration
public TargetIndicator(TargetIndicatorId id, Transform target, Pose screenPose, bool isOutsideBoundary)
Parameters
| Type | Name | Description |
|---|---|---|
| TargetIndicatorId | id | The ID that defines the indicator. |
| Transform | target | The target that is being tracked by the target indicator. |
| Pose | screenPose | The screen space coordinates and rotation of the target. |
| bool | isOutsideBoundary | The current state of the target's screen pose if it's outside the boundary. |
TargetIndicator(TargetIndicatorId, Transform, Vector3, Quaternion, bool)
Constructs a TargetIndicator.
Declaration
public TargetIndicator(TargetIndicatorId id, Transform target, Vector3 screenPoint, Quaternion rotation, bool isOutsideBoundary)
Parameters
| Type | Name | Description |
|---|---|---|
| TargetIndicatorId | id | The ID that defines the indicator. |
| Transform | target | The target that is being tracked by the target indicator. |
| Vector3 | screenPoint | The screen space coordinates of the target. |
| Quaternion | rotation | The screen space rotation of the target. |
| bool | isOutsideBoundary | The current state of the target's screen pose if it's outside the boundary. |
Properties
Default
Gets a default-initialized TargetIndicator. This may be different from the zero-initialized version
(for example, the pose is Pose.identity instead of zero initialized).
Declaration
public static TargetIndicator Default { get; }
Property Value
| Type | Description |
|---|---|
| TargetIndicator |
Id
The ID that defines the target indicator.
Declaration
public readonly TargetIndicatorId Id { get; }
Property Value
| Type | Description |
|---|---|
| TargetIndicatorId |
IsOutsideBoundary
True if the target's screen pose is outside the TargetIndicatorManager configured boundary.
Otherwise, false.
Declaration
public readonly bool IsOutsideBoundary { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ScreenPose
The screen space coordinates and rotation of the target.
ScreenPose.position.x corresponds to the horizontal
axis coordinate in pixels where 0 is the left end of the axis and UnityEngine.Screen.width is the right end of the axis.
ScreenPose.position.y corresponds to the vertical axis coordinate in pixels where 0 is the bottom end of the axis and
UnityEngine.Screen.height is the top end of the axis.
ScreenPose.position.z corresponds to the depth from the camera in world space in meters.
ScreenPose.rotation corresponds to the rotation in screen space relative to the right vector to rotate
the indicator to point at the target.
Declaration
public readonly Pose ScreenPose { get; }
Property Value
| Type | Description |
|---|---|
| Pose |
Target
The target that is being tracked by the target indicator.
Declaration
public readonly Transform Target { get; }
Property Value
| Type | Description |
|---|---|
| Transform |