Comments (4)
Is there anything preventing you to store plane objects into a map now? Plane objects don’t carry an ID, but there is no reason why the application couldn’t add it:
let map = …; // map to store the planes
let plane = …; // plane obtained from some xrFrame.worldInformation
plane.id = getNextId(); // function that creates UUID or something
map.set(plane.id, plane);
This is possible because we guarantee that plane in frame N is represented by the same plane object in frame N+1, so the application won’t lose additional properties that it added to plane objects.
from real-world-geometry.
Unpacking a bit.
Plane objects don't carry an ID
Do you mean ARCore plane objects, or the design you posted here? Your design proposal is just that, a proposal, so plane objects could carry an id; the point of my post was to suggest that. Why would we force every app to include code like that if they don't need to, if it's obviously useful?
This is possible because we guarantee that plane in frame N is represented by the same plane object in frame N+1, so the application won’t lose additional properties that it added to plane objects.
I don't recall seeing this in the proposal, and it seems like a pretty significant guarantee. It may very well be that we want to make that guarantee, but it's not obvious we do.
Is it typically the case that objects returned from native APIs have such a guarantee, and that these objects can have data added to them?
from real-world-geometry.
Do you mean ARCore plane objects, or the design you posted here?
Both (ARCore does not expose plane ID, although the address it returns is unique).
Why would we force every app to include code like that if they don't need to, if it's obviously useful?
My understanding is that it is not really useful due to the guarantee about maintaining the identity of the plane objects. Exposing IDs might be useful to introduce a way to decorate plane objects with additional data (by inserting the additional data to a map keyed with plane ID), but this is not needed if we just allow attaching objects to them (ex. plane.context = {... object with everything you might want to store with a plane ...}
. I don’t really see another use for an ID, but I might be missing something here. Added benefit is that the application does not need to maintain the “plane ID to something” map.
Is it typically the case that objects returned from native APIs have such a guarantee, and that these objects can have data added to them?
I don’t think JavaScript cares about where the object came from, apps can add properties to it at runtime. As for other examples that already give this guarantee, anything that is annotated as [SameObject]
has that guarantee - one example is XRSession
’s renderState
(https://immersive-web.github.io/webxr/#xrsession-interface).
from real-world-geometry.
Closing stale issue - I'm leaning towards omitting placing IDs since the objects we're returning can be updated in place (so triple-equals comparison will work when checking if object we got in rAF1 is the same as the one in rAF2).
from real-world-geometry.
Related Issues (20)
- API for planes and meshes HOT 25
- Create proposal for near/world mesh HOT 1
- Plane detection should be enabled during session creating HOT 3
- Plane detection should be promise based HOT 2
- [meshing] provide support to pause meshing during a session
- [meshing] Determine the region that should provide a mesh HOT 2
- [meshing] determine how to deliver the mesh to the author
- [meshing] Type of the indexbuffer HOT 1
- [meshing] How should we request normals? HOT 11
- No information on requiredFeatures or optionalFeatures HOT 1
- Please enumerate considered alternatives in Explainers HOT 1
- detectedPlanes throws exception, detection of feature availability is not graceful HOT 1
- Detecting user's physical environment impact on plane detection
- Top view map of SLAM
- Need a function to get all existing persisted anchor handles HOT 3
- Add support for 3D geometry HOT 10
- Providing a clear signal for when we should call initiateRoomCapture HOT 3
- Semantic Labels HOT 1
- X21 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from real-world-geometry.