bschwind / opencascade-rs

Rust bindings to the OpenCascade CAD Kernel
GNU Lesser General Public License v2.1
118 stars 22 forks source link

RFC: viewer: draw XYZ axes #103

Open strohel opened 1 year ago

strohel commented 1 year ago

This is extremely naive implementation, but firing it just to get going. It seems to work, but I cannot rotate or zoom in the viewer (that's a privilege that only Mac users have at the moment).

Once finalized, fixes #62.

Screenshot_20230723_181803

bschwind commented 1 year ago

I found an interesting approach to drawing an infinite grid, with anti-aliasing and fade-out (sometimes called fog):

https://asliceofrendering.com/scene%20helper/2020/01/05/InfiniteGrid/

We don't need anti-aliasing as we're using smaa-rs, but it might be interesting to borrow some techniques from there, especially the infinite part.

bschwind commented 1 year ago

Probably not an issue with your code, but there are rendering artifacts when in perspective mode. This also happens when scaling the model.

Ideally, we wouldn't scale the lines and model when zooming the camera, and that "hack" will go away once @skywhale adds his camera movement code.

Screen Shot 2023-07-24 at 11 24 25 PM