Comments (4)
Yeah this isn't even implemented within the renderer (Renderer.js), yet it's still documented on the Scene.pick
method.
To mask which objects get picked, the best way, before picking, would be for application code to
1.save which scene objects are not pickable
2. iterate over the scene objects and set pickable
true
on those objects that you want to pick, and false
for others
3. do the pick
4. restore the state saved in (1)
The thing is, setting pickable
on all scene objects could be expensive for big models, if done continuously, on each pick, if continuously picking,
Therefore I think it's best to put that in the hands of the application code, which might set those pickable flags one time before doing many of picking operations, and then restore those pickable flags after all the picking is finished.
Then I would remove the includeEntities
parameter from Scene.pick()
documentation.
Does that make sense?
from xeokit-sdk.
1.save which scene objects are not pickable
What mean save scene? Iterate objecst and set pickable to false
/true
on load model, this is only one way?
from xeokit-sdk.
1.Record the IDs of all objects for which pickable
is false
2. Iterate over all objects and set pickable false on the ones you dont want to pick, and true on the ones you do want to pick
3. do the pick, or many picks
4. iterate over all objects, set pickable true, except for the ones whose IDs you recorded in (1), which you set false
Because xeokit relies on batching the objects in order to achieve performance rendering for large numbers of objects, we must enable/disable picking for the objects like this. It's a performance trade off we can't avoid.
(1-2) is setting up for masked picking, (4) is cleaning up after masked picking.
from xeokit-sdk.
Removed includeEntities
and excludeEntities
from documentation - they were not supposed to be there: 535130c
from xeokit-sdk.
Related Issues (20)
- Viewer param pickSurfacePrecisionEnabled
- Unexpected ray picking results HOT 2
- Load GLB file with Properties / Inspector HOT 4
- SnapPick don't work without canvasPos? HOT 1
- UI freeze on large model load HOT 1
- DistanceMeasurementsPlugin typescript definitions is not up to date HOT 1
- [FEATURE] Option to configure callback on XKTLoaderPlugin for option to pause/discontinue loading
- Remove zipping compression from XKT format HOT 2
- Document cacheBuster in XKTDefaultDataSource etc
- Is possible to read geometry from VBOGeometry shapes? HOT 3
- GLTF loader and meta objects structure HOT 6
- Cachebuster doesn't work with data urls
- gltfLoad model, I want to see all the information on the back,backfaces ,It doesn't work? HOT 1
- Some material is white HOT 3
- Control camera panning out of view. HOT 3
- Cannot remove treeView from DOM HOT 2
- Cannot remove AngleMeasurementPlugin 'pointer dot' when deactivating control HOT 5
- Screen recording breaks DistanceMeasurementsPlugin HOT 2
- Storey views plugin - createStoreyMap generates wrong images when dtxEnabled is set to true
- Trigger transform event for model position or rotation
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 xeokit-sdk.