Skip to content

Commit

Permalink
Remove offset pose
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jun 5, 2020
1 parent 6155000 commit 49da62c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,16 @@ An {{XRAnchor}} may have an associated <dfn for=XRAnchor>tracked entity</dfn>, w

An {{XRAnchor}} may have an associated <dfn for=XRAnchor>static origin</dfn>, which is a position and orientation in world space. An {{XRAnchor}} returned to the user MUST either have a [=XRAnchor/tracked entity=] or an [=XRAnchor/static origin=].

Each {{XRAnchor}} has an associated <dfn for=XRAnchor>offset pose</dfn>, which is an {{XRRigidTransform}}.

Each {{XRAnchor}} has an associated <dfn for=XRAnchor>session</dfn>.

Each {{XRSpace}} obtained from {{XRAnchor/anchorSpace}} has an <dfn for=XRSpace>associated anchor</dfn> that is the {{XRAnchor}} that created it. The [=XRSpace/native origin=] of an {{XRSpace}} with an [=associated anchor=] is the [=XRAnchor/native origin=] of the [=associated anchor=].

Each {{XRAnchor}} has a <dfn for=XRAnchor>native origin</dfn> defined as follows:

- If the {{XRAnchor}} has a [=XRAnchor/tracked entity=] defined, it is the [=native entity/entity origin=] of the [=XRAnchor/tracked entity=], offset by [=offset pose=]. In other words it is the [=multiply transforms|multiplication=] of [=offset pose=] and the [=native entity/entity origin=] of the [=native entity=].
- If the {{XRAnchor}} has a [=XRAnchor/tracked entity=] defined, it is the [=native entity/entity origin=] of the [=XRAnchor/tracked entity=].

- If the {{XRAnchor}} has a [=XRAnchor/static origin=] defined, it is the [=multiply transforms|multiplication=] of [=offset pose=] and the [=static origin=].
- If the {{XRAnchor}} has a [=XRAnchor/static origin=] defined, it is the [=static origin=].

<div class="algorithm" data-algorithm="create-anchor-object">
In order to <dfn>create new anchor object</dfn> from |session|, the user agent MUST run the following steps:
Expand Down Expand Up @@ -213,8 +212,9 @@ The {{XRFrame/createAnchor(pose, space)}} method, when invoked on an {{XRFrame}}
1. Let |session| be |frame|'s [=XRFrame/session=].
1. Add [=update anchors=] algorithm to |session|’s [=XRSession/list of frame updates=] if it is not already present there.
1. Let |effective origin| be |space|'s [=XRSpace/effective origin=].
1. Let |offset origin| be the [=multiply transforms|multiplication=] of |pose| and the current value of |effective origin|.
1. [=Create new anchor object=] |anchor| using |session|.
1. Set |anchor|'s [=static origin=] to the current value of |effective origin|.
1. Set |anchor|'s [=static origin=] to |effective origin|.
1. Set |anchor|'s [=offset pose=] to |pose|.
1. Add |anchor| to |session|'s [=XRSession/set of tracked anchors=].
1. Add a mapping from |anchor| to |promise| to |session|'s [=XRSession/map of new anchors=].
Expand Down

0 comments on commit 49da62c

Please sign in to comment.