BIMsurfer icon indicating copy to clipboard operation
BIMsurfer copied to clipboard

Multiple section planes

Open TitouanGisle opened this issue 4 years ago • 2 comments

Hi all !

I was wondering if there was a way to set multiple section planes with the currently available functions ? And in the same vein, is there a way to display the current section plane ? Change its colour or some such ?

If not, could you give me a clue as to how I would go about to add it ?

Thanks in advance !

TitouanGisle avatar Mar 30 '20 08:03 TitouanGisle

The section plane is TBH a bit work in progress. Your questions are reasonable, but it's uncertain whether we are able to work on them in the near future. Here are some pointers:

I believe the colour is hardcoded here https://github.com/opensourceBIM/BIMsurfer/blob/master/viewer/wsquad.js#L54

Multiple planes is not possible in the current structure, but not impossible to add. The plane is stored as a plane equation in vec4 https://github.com/opensourceBIM/BIMsurfer/blob/master/viewer/viewer.js#L96. Making multiple of there (or a uniform array in the shader) is certainly all possible.

The dark gray cap is rendered using a World-Space quadrangle (wsquad) https://github.com/opensourceBIM/BIMsurfer/blob/master/viewer/viewer.js#L549. With some adaptations you can use something similar to draw the outline of that plane using GL_LINES I think.

aothms avatar Mar 30 '20 09:03 aothms

All right, thanks a lot for your answer ! I'm going to try all this !

TitouanGisle avatar Mar 30 '20 09:03 TitouanGisle