Commit Graph

21 Commits

Author SHA1 Message Date
Alexandru Popovici 4aef572a44 Multi Viewer (#1518)
* Fixed an issue with HDRIs not generating proper PMREMs over multiple viewer instances

* WIP on makign the world tree multiple instanced

* The WorldTree is no longer static. Each viewer has it's own instance and it hands it over to whoever needs it.

* Fixed an issue with filtering and the new non-static tree. Also removed the 'root' key from the NodeData structure since it's not needed

* Added an guard when building batches for situations where all render views have invalid geometries. This generally means there is somethign wrong with the stream itself

* multi-viewer css fixes

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2023-04-21 13:12:15 +03:00
AlexandruPopovici f187510467 Merged 2023-03-08 14:34:37 +02:00
AlexandruPopovici 06fc06adf5 Implemented hosted revit instances not stacking their host's transformation 2023-03-02 17:00:34 +02:00
AlexandruPopovici cc2a68f6ea RevitInstances now always stack transforms 2023-03-01 11:52:39 +02:00
Alexandru Popovici 6b7dbc5d70 Reduced Viewer Memory Footprint (#1406)
* The ObjectLoader and ViewerObjectsLoaders are disposed upon loading complete.

* Added viewer parameter for keeping or discarding original geometry data. Defaults to discarding it. WIP on mesh and point cloud implementation for actual discarding it

* Geometry data from raw nodes is now disposed after building their reder views

* Removed raw geometry data from points and lines

* Removed the float64 array which was persisted pointlessly by the section plane outlines feature. Also fixed a bug for this feature regarding resizing the point buffer and RTE

* Implemented BVHs in local space, relative to world origin. This cuts down on it's redundant memory footprint by half

* Implemented SpeckleMeshBVH which completely hides the RTE-related transformations that we're making to reduce memory footprint.

* Added some clarifications to the SpeckleMeshBVH class
2023-02-28 13:07:33 +02:00
AlexandruPopovici b231204d24 WIP on instances transformation 2023-02-27 11:10:18 +02:00
AlexandruPopovici 0c5303e8e7 Implemented instance and revit instance conversion. First draft 2023-02-24 16:59:41 +02:00
Alexandru Popovici 1c78607942 Alex/#1347 Async Loading and Load cancelling (#1367)
* Implemented async walk for the world tree. Implemented asyn render tree building and async batch building. Implemented progressive loading

* WIP tree walk async that actually works using a generator

* Async walking now properly works and can be interrupted

* Properly working async walk

* Added loadObjectAsync function in the API which should be used if stream loading needs to be cancelled and for 'progressive' loading. Added a priority argument to the loadObjectAsync and to walkAsync functions which makes the async-iness so to speak configurable.

* Refactored the sync and async subtree batch building to remove duplicate code. Changed some logs for better clarity

* Fixed an issue with point clouds and material creation
2023-02-17 13:45:22 +02:00
Kristaps Fabians Geikins 7aec9bf29d fix(frontend): viewer dragging not working in some cases (#1357) 2023-02-02 16:34:46 +02:00
Alexandru Popovici de2bce89a5 Alex/verbosity and mouse event (#1275)
* Added a verbose flag in the viewer params. Default is false and it's equivalent to the ERROR level

* Piggybacked the original pointer event into the SelectionEvent
2023-01-02 16:23:52 +02:00
Alexandru Popovici a0a33a9bc1 Removed a lot of redundacy from the filtering manager's 'populateGenericState' function. There's still a lot left, but I think a more general solution is required for further speedups (#1133) 2022-10-21 15:37:29 +03:00
AlexandruPopovici af342b3e3e #827. Finished with multiple streams loading/unloading in the same seesion. Things seem to work correctly, and also there's almost no memory leaking at all upon loading/unloading 2022-08-03 16:58:39 +03:00
AlexandruPopovici 33fc450377 #827 Fixed an issue with block transformation and displayValues. 2022-07-29 12:27:10 +03:00
AlexandruPopovici fdc550a38a #827 Implemented gradient based filtering using ramp texture and per vertex ramp texture index. Implemented filtering by volume in the sandbox, using the gradient filter 2022-07-20 23:59:11 +03:00
AlexandruPopovici dbd3763a5a #827 Added the possibility to visually display the scene's batches as well as to select any object by holding the ctrl key and it will isolate it's entire batch, not just the object. These will be useful for debbuging 2022-07-18 23:43:08 +03:00
AlexandruPopovici 923e835c54 #811 Added the the unload functionality, so we can load/unload stuff in the sandbox. It's currently a bit leaky but we'll fix that. Also we currentyl don;t support multiple paralel streams to be loaded in. I first want to make sure things work properly for 1 stream before having multiple at the same time 2022-06-24 14:20:27 +03:00
AlexandruPopovici d29d2d464c #811 Started working on a debug API for filtering inside the viewer. This API will be used by the upcoming FilteringManager to do the visual work 2022-06-24 00:41:24 +03:00
AlexandruPopovici f73384e66f #811 Integrated double-click to zoom, and zoom extents with the new viewer. Currently I'm using old existing code just for the sake of less regression, but will revisit it in the future 2022-06-21 15:47:24 +03:00
AlexandruPopovici 11a429f9ca #783 Implemented Point and PointCloud speckle type support for batching and everything else. 2022-06-20 16:39:51 +03:00
AlexandruPopovici c7a2390bf3 #783 Implemented multi selection via multiple draw range with automatic fill of groups. Implemented selection of multiple objects when clicking something in the world, if that object is part of a whole and it needs to be selected together with others. It's not perfect yet, I;ve seen some bad selections, but will fix that soon 2022-06-17 17:28:39 +03:00
AlexandruPopovici d508eb6d5b #783. Implemented separate materal draw ranges for the line batches. Added the Batch common interface and separate the MeshBatch from the LineBatch, both implementing the Batch interface. Selection now works properly for both meshes and lines 2022-06-16 19:40:32 +03:00