-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add documentation about OpenXR spatial entities #11015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add documentation about OpenXR spatial entities #11015
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a few grammatical issues and typos so I wanted to make a review addressing some of them. I saw that it was also a commonality in this PR to omit commas after dependent clauses, so I left in 2 cases where I noticed it occurred, but I can go back and mark more where I noticed them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do a pass to improve sentence structure as well later
Thanks for the feedback everyone, just to let you all know, I'm planning on updating this PR after we're certain about the API on the implementation PR just to minimize having to go back and forth on those changes. Will be updating this PR soonish |
a5b0b4a
to
4edb00e
Compare
|
||
|
||
** | ||
Q : Should we be doing update queries here to get position changes for markers?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly a reminder to myself, I need to add this in. We now do this in the built-in logic as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still something you plan to add? Or, should this be removed at this point?
I think I covered all the comments, only some outstanding stuff around parameter naming which remains a problem. Also need to find some time to add update queries to the marker example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions for breaking up the sentences, can look at more cases later
e0bca81
to
73c533b
Compare
73c533b
to
b04e6b1
Compare
The source PR has since been merged, so this should be prioritized once the style changes are accounted for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it looks good now
3f59079
to
dcbf8f6
Compare
Not entirely sure why its not finding some things in the class definitions because those classes should be registered. Unless I'm overlooking a typo or mistake in the references? |
dcbf8f6
to
c2523fc
Compare
c2523fc
to
71ba12c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great!
Only have a bunch of minor notes about type-o's, making some bits a little clearer, and what-not
It has a very modular design. The core of the API defines how real world entities are structured, | ||
how they are found, and how information about them is stored and accessed. | ||
|
||
Various extensions are added on top that implement specific systems such as marker tracking, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Various extensions are added on top that implement specific systems such as marker tracking, | |
Various extensions are added on top that to implement specific systems such as marker tracking, |
* - Enable persistent anchors | ||
- Enables the ability to make spatial anchors persistent. This means that their location is stored | ||
and can be retrieved in subsequent sessions. | ||
* - Enabled built-in anchor detection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* - Enabled built-in anchor detection | |
* - Enable built-in anchor detection |
|
||
# See if this tracker should be managed by us and add it. | ||
func _add_tracker(tracker: OpenXRSpatialEntityTracker): | ||
var new_node : XRAnchor3D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we use the style without a space before the colon in the docs (but I'm not 100% sure about that):
var new_node : XRAnchor3D | |
var new_node: XRAnchor3D |
# A new tracker was added to our XRServer. | ||
func _on_tracker_added(tracker_name: StringName, type: int): | ||
if type == XRServer.TRACKER_ANCHOR: | ||
var tracker : XRTracker = XRServer.get_tracker(tracker_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var tracker : XRTracker = XRServer.get_tracker(tracker_name) | |
var tracker: XRTracker = XRServer.get_tracker(tracker_name) |
# A tracker was removed from our XRServer. | ||
func _on_tracker_removed(tracker_name: StringName, type: int): | ||
if type == XRServer.TRACKER_ANCHOR: | ||
var tracker : XRTracker = XRServer.get_tracker(tracker_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var tracker : XRTracker = XRServer.get_tracker(tracker_name) | |
var tracker: XRTracker = XRServer.get_tracker(tracker_name) |
It's up to your use case how best to link the marker data to the scene that needs to be loaded. | ||
An example would be to encode the name of the asset you wish to display in a QR code. | ||
|
||
**Maybe see if we can work out at least one example here, need access to hardware that supports this, should have that soon** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a TODO: are you still planning to add something here? Or, should this note just be removed?
For most purposes the core system, along with any vendor extensions, should be what most | ||
users would use as provided. | ||
|
||
For those who are implementing vendor extensions, or those for who the built-in logic doesn't |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those who are implementing vendor extensions, or those for who the built-in logic doesn't | |
For those who are implementing vendor extensions, or those for whom the built-in logic doesn't |
|
||
extends Node | ||
|
||
var spatial_context : RID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm going to stop pointing these out. They can all be grep'd for and there's also the possibility that the docs style doesn't mandate this anyway :-)
var spatial_context : RID | |
var spatial_context: RID |
are different between your discovery snapshot and your update snapshot, you have to take that you query | ||
different components into account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some words got jumbled in this text: "you have to take that you query different components into account"
|
||
|
||
** | ||
Q : Should we be doing update queries here to get position changes for markers?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still something you plan to add? Or, should this be removed at this point?
This PR adds documentation for the spatial entities implementation being added here: godotengine/godot#107391