Class Fragment
Fragment class is a container for attachment points in the same WorldLocking Fragment. It manages their update and adjustment, including merging in the attachment points from another fragment.
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core
Assembly: cs.temp.dll.dll
Syntax
public class Fragment
Constructors
Fragment(FragmentId)
Declaration
public Fragment(FragmentId fragmentId)
Parameters
Type | Name | Description |
---|---|---|
FragmentId | fragmentId |
Properties
FragmentId
Declaration
public FragmentId FragmentId { get; }
Property Value
Type | Description |
---|---|
FragmentId |
State
Declaration
public AttachmentPointStateType State { get; }
Property Value
Type | Description |
---|---|
AttachmentPointStateType |
Methods
AbsorbOtherFragment(Fragment)
Absorb the contents of another fragment, emptying it.
Declaration
public void AbsorbOtherFragment(Fragment other)
Parameters
Type | Name | Description |
---|---|---|
Fragment | other | The fragment to lose all its contents to this. |
AbsorbOtherFragment(Fragment, Pose)
Absorb the contents of another fragment, emptying it, and applying an adjustment transform.
Declaration
public void AbsorbOtherFragment(Fragment other, Pose adjustment)
Parameters
Type | Name | Description |
---|---|---|
Fragment | other | The fragment to lose all its contents to this. |
Pose | adjustment | Pose adjustment to apply to contents of other on transition. |
AddAttachmentPoint(AttachmentPoint)
Add an existing attachment point to this fragment.
Declaration
public void AddAttachmentPoint(AttachmentPoint attachPoint)
Parameters
Type | Name | Description |
---|---|---|
AttachmentPoint | attachPoint |
Remarks
The attachment point might currently belong to another fragment, if it is being moved from the other to this. Since this is only used internally, it operates directly on an AttachmentPoint rather than an interface to avoid an unnecessary downcast.
AdjustAll(IPlugin)
Run through all attachment points, get their adjustments from the plugin and apply them.
Declaration
public void AdjustAll(IPlugin plugin)
Parameters
Type | Name | Description |
---|---|---|
IPlugin | plugin |
Remarks
This must be called between plugin.Refreeze() and plugin.RefreezeFinish().
ReleaseAll()
Release all resources for this fragment.
Declaration
public void ReleaseAll()
ReleaseAttachmentPoint(IAttachmentPoint)
Notify system attachment point is no longer needed. See ReleaseAttachmentPoint(IAttachmentPoint)
Declaration
public void ReleaseAttachmentPoint(IAttachmentPoint attachmentPoint)
Parameters
Type | Name | Description |
---|---|---|
IAttachmentPoint | attachmentPoint |
UpdateState(AttachmentPointStateType)
Set the state of the contents of this fragment.
Declaration
public void UpdateState(AttachmentPointStateType attachmentState)
Parameters
Type | Name | Description |
---|---|---|
AttachmentPointStateType | attachmentState | New state |