Class AdjusterFixed
Component to handle frozen world adjustments for fixed (stationary) objects.
Namespace: Microsoft.MixedReality.WorldLocking.Tools
Assembly: cs.temp.dll.dll
Syntax
public class AdjusterFixed : AdjusterBase
Remarks
For dynamic objects, use AdjusterMoving.
This component is appropriate for inheriting from, to let it take care of lifetime management and book-keeping, then just override HandleAdjustLocation(Pose) and/or HandleAdjustState(AttachmentPointStateType) with actions more suitable for your application.
Properties
AttachmentPoint
The attachment point which this component wraps.
Declaration
protected IAttachmentPoint AttachmentPoint { get; }
Property Value
Type | Description |
---|---|
IAttachmentPoint |
Manager
The attachment point manager interface which this component subscribes to.
Declaration
protected IAttachmentPointManager Manager { get; }
Property Value
Type | Description |
---|---|
IAttachmentPointManager |
Methods
HandleAdjustLocation(Pose)
Handle a pose adjustment due to a refit operation.
Declaration
protected virtual void HandleAdjustLocation(Pose adjustment)
Parameters
Type | Name | Description |
---|---|---|
Pose | adjustment | The pose adjustment to apply/ |
Remarks
This simple implementation folds the adjustment into the current pose.
HandleAdjustState(AttachmentPointStateType)
Handle a change in associated fragment state.
Declaration
protected virtual void HandleAdjustState(AttachmentPointStateType state)
Parameters
Type | Name | Description |
---|---|---|
AttachmentPointStateType | state | The new state. |
Remarks
The only state under which the visual location can be regarded as reliable is the Normal state. This simple implementation disables the object tree when its location is unreliable, and enables it when its location is reliable. Actual appropriate behavior is highly application dependent. Some questions to ask:
- Is there a more appropriate way to hide the object (e.g. move it far away)?
- Should the update pause, or just stop rendering? (Disabling pauses update and render).
- Is it better to hide the object, or to display it in alternate form?
- Etc.
UpdatePosition()
For infrequent moves under script control, UpdatePosition notifies the system that the object has relocated. It should be called after any scripted movement of the object (but not after movement triggered by WLT, such as in HandleAdjustLocation(Pose)).
Declaration
public void UpdatePosition()