Class SpacePinOrientable
A component derived from SpacePin which differs only in that, rather than using an explicit rotation passed in, an implicit rotation is calculated based on the relative positions of all active SpacePinOrientables.
Implements
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core
Assembly: cs.temp.dll.dll
Syntax
public class SpacePinOrientable : SpacePin, IOrientable
Remarks
The implementation of IOrientable allows it to provide an input position and receive an output rotation from the managing IOrienter.
Properties
FragmentId
The fragment this belongs to. Public property to satisfy IOrientable interface.
Declaration
public FragmentId FragmentId { get; }
Property Value
Type | Description |
---|---|
FragmentId |
Remarks
Only elements within the same fragment are allowed to interact with each other, because by definition the relationship between coordinates of elements of differing fragments are undefined.
LockedPosition
Declaration
public Vector3 LockedPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
LockedRotation
Declaration
public Quaternion LockedRotation { get; }
Property Value
Type | Description |
---|---|
Quaternion |
ModelPosition
Declaration
public Vector3 ModelPosition { get; }
Property Value
Type | Description |
---|---|
Vector3 |
ModelRotation
Declaration
public Quaternion ModelRotation { get; }
Property Value
Type | Description |
---|---|
Quaternion |
Orienter
Input dependency of the managing Orienter which will arbitrate individual rotations.
Declaration
public IOrienter Orienter { get; set; }
Property Value
Type | Description |
---|---|
IOrienter |
Remarks
Access to the orienter is strictly by interface IOrienter. The type of the orienter member is Orienter to allow it to be set explicitly in the Inspector (see notes in Orienter), but any object implementing IOrienter can be used by explicit setting through SetOrienter(IOrienter).
Methods
OnLocationUpdate(Pose)
Callback for refit operations.
Declaration
protected override void OnLocationUpdate(Pose adjustment)
Parameters
Type | Name | Description |
---|---|---|
Pose | adjustment | Adjustment transform to apply. |
Overrides
Remarks
Note that the FragmentId may change here.
PushRotation(IAlignmentManager, Quaternion)
Accept the rotation as computed by the IOrienter.
Declaration
public void PushRotation(IAlignmentManager mgr, Quaternion lockedRotation)
Parameters
Type | Name | Description |
---|---|---|
IAlignmentManager | mgr | The alignment manager which needs to receive the updated Pose. |
Quaternion | lockedRotation | The new world locked rotation to adopt. |
Reset()
Reset and unregister from the IOrienter.
Declaration
public override void Reset()
Overrides
RestoreOnLoad()
If base restore on load succeeds, register with orienter for further manipulation.
Declaration
protected override void RestoreOnLoad()
Overrides
SetFrozenPosition(Vector3)
Set the position in frozen space. Rotation not needed since it is computed based on relative positions.
Declaration
public void SetFrozenPosition(Vector3 frozenPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | frozenPosition | Position in frozen space. |
SetLockedPose(Pose)
Override of base SetLockedPose to allow insertion of the computation of rotation.
Declaration
public override void SetLockedPose(Pose lockedPose)
Parameters
Type | Name | Description |
---|---|---|
Pose | lockedPose | The new pose in world locked space. |
Overrides
Remarks
Note that base class implementation is not invoked here, but rather this override performs the same steps but with additional computations (for the rotation) interleaved.
SetLockedPosition(Vector3)
Set the position in world locked space. Rotation not needed since it is computed based on relative positions.
Declaration
public void SetLockedPosition(Vector3 lockedPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | lockedPosition | Position in locked space. |
SetOrienter(IOrienter)
Explicitly set the managing IOrienter, overriding any setting from the Inspector.
Declaration
public void SetOrienter(IOrienter iorienter)
Parameters
Type | Name | Description |
---|---|---|
IOrienter | iorienter |
Remarks
The Orienter is nominally a completely internal artifact. The public setter is to allow construction from script.
SetSpongyPosition(Vector3)
Set the position in spongy space. Rotation not needed since it is computed based on relative positions.
Declaration
public void SetSpongyPosition(Vector3 spongyPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | spongyPosition | Position in spongyt space. |
Start()
Adopt the Inspector set Orienter as the interface iorienter.
Declaration
protected override void Start()