Interface IAttachmentPointManager
Interface for application creation and manipulation of attachment points. In particular, the creation and release of attachment points must be conducted through the IAttachmentPointManager.
Namespace: Microsoft.MixedReality.WorldLocking.Core
Assembly: cs.temp.dll.dll
Syntax
public interface IAttachmentPointManager
Remarks
Obtain access to the attachment point manager through the WorldLockingManager.
Methods
CreateAttachmentPoint(Vector3, IAttachmentPoint, AdjustLocationDelegate, AdjustStateDelegate)
Create and register a new attachment point.
Declaration
IAttachmentPoint CreateAttachmentPoint(Vector3 frozenPosition, IAttachmentPoint context, AdjustLocationDelegate locationHandler, AdjustStateDelegate stateHandler)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | frozenPosition | The position in the frozen space at which to start the attachment point |
IAttachmentPoint | context | The optional context into which to create the attachment point (may be null) |
AdjustLocationDelegate | locationHandler | Delegate to handle Frozen World engine system adjustments to position |
AdjustStateDelegate | stateHandler | Delegate to handle Frozen World engine connectivity changes |
Returns
Type | Description |
---|---|
IAttachmentPoint | The new attachment point interface. |
Remarks
The attachment point itself is a fairly opaque handle. Its effects are propagated to the client via the two handlers associated with it. The context interface is optional. It should be given if the new attachment point is conceptually spawned from an existing attachment point (or its target object). If null, then conceptually the new attachment point was spawned from the current camera. The attachment point itself is a fairly opaque handle. The actual adjustments are made via notifications through the two delegates passed into the creation. The locationHandler is strictly to notify of adjustments when refitting (Merge or Refreeze). The stateHandler notifies whether this attachment point is "connected" with the current fragment. Both handlers are optional and may be null.
MoveAttachmentPoint(IAttachmentPoint, Vector3)
Move (as opposed to Teleport) means that the object is meant to have traversed frozen space from its old position to the given new position on some continuous path.
Declaration
void MoveAttachmentPoint(IAttachmentPoint attachPointIface, Vector3 newFrozenPosition)
Parameters
Type | Name | Description |
---|---|---|
IAttachmentPoint | attachPointIface | |
Vector3 | newFrozenPosition | The new position in frozen space |
Remarks
Not to be used for automatic (i.e. FrozenWorld Engine instigated) moves. Use this for continuous movement through space. For discontinuous movement (i.e. teleportation), use TeleportAttachmentPoint(IAttachmentPoint, Vector3, IAttachmentPoint)
ReleaseAttachmentPoint(IAttachmentPoint)
Release an attachment point for disposal. The attachment point is no longer valid after this call. This also un-registers the handlers (if any) given when it was created.
Declaration
void ReleaseAttachmentPoint(IAttachmentPoint attachPointIface)
Parameters
Type | Name | Description |
---|---|---|
IAttachmentPoint | attachPointIface | The attachment point to release. |
Remarks
In the unlikely circumstance that another attachment point has been spawned from this one but has not yet been processed (is still in the pending queue), that relationship is broken on release of this one, and when the other attachment point is finally processed, it will be as if it was created with a null context.
TeleportAttachmentPoint(IAttachmentPoint, Vector3, IAttachmentPoint)
Teleport (as opposed to Move) means that the object is meant to have disappeared at its old position and instantaneously reappeared at its new position in frozen space without traversing the space in between.
Declaration
void TeleportAttachmentPoint(IAttachmentPoint attachPointIface, Vector3 newFrozenPosition, IAttachmentPoint context)
Parameters
Type | Name | Description |
---|---|---|
IAttachmentPoint | attachPointIface | The attachment point to teleport |
Vector3 | newFrozenPosition | The position to teleport to. |
IAttachmentPoint | context | The optional context. |
Remarks
Use this for discontinuous movement through space (i.e. teleportation). For continuous movement, use MoveAttachmentPoint(IAttachmentPoint, Vector3). This is equivalent to releasing the attachment point (ReleaseAttachmentPoint(IAttachmentPoint)) and creating it (CreateAttachmentPoint(Vector3, IAttachmentPoint, AdjustLocationDelegate, AdjustStateDelegate)) at the new location in the given context, except that using Teleport allows the reference to the existing attachment point to remains valid.