scenerygraphics / scenery

Flexible VR Visualisation for Volumetric and Geometric Data on the Java VM, powered by Kotlin and Vulkan.
https://scenery.graphics
GNU Lesser General Public License v3.0
130 stars 32 forks source link

Cylinder returning OrientedBoundingBox with NaN's #308

Closed kephale closed 3 years ago

kephale commented 4 years ago

I'm using this method (https://github.com/scenerygraphics/sciview/blob/master/src/main/java/sc/iview/SciView.java#L646) on neuron traces from SNT. All cylinders are created the same way except their lengths. Here is some example output: in debug I inspected these cylinders and their attributes are totally normal. It isn't clear to me what the issue is with these BBs.

...
GSBB: ( 8.488E+1  1.223E+2 -2.500E-1) ( 8.488E+1  1.223E+2 -2.500E-1) sphere
GSBB: (NaN NaN NaN) (NaN NaN NaN) cylinder
GSBB: ( 8.488E+1  1.223E+2 -2.500E-1) ( 8.488E+1  1.223E+2 -2.500E-1) sphere
GSBB: (NaN NaN NaN) (NaN NaN NaN) cylinder
GSBB: ( 8.488E+1  1.223E+2 -2.500E-1) ( 8.488E+1  1.223E+2 -2.500E-1) sphere
GSBB: ( 8.512E+1  1.223E+2 -2.486E-1) ( 8.512E+1  1.223E+2 -2.486E-1) cylinder
GSBB: ( 8.388E+1  1.223E+2 -2.500E-1) ( 8.388E+1  1.223E+2 -2.500E-1) sphere
GSBB: ( 8.412E+1  1.223E+2 -2.486E-1) ( 8.412E+1  1.223E+2 -2.486E-1) cylinder
GSBB: ( 8.288E+1  1.223E+2 -2.500E-1) ( 8.288E+1  1.223E+2 -2.500E-1) sphere
GSBB: ( 8.312E+1  1.223E+2 -2.486E-1) ( 8.312E+1  1.223E+2 -2.486E-1) cylinder
...

Note: this only happens for some Cylinder's not all

skalarproduktraum commented 4 years ago

Can't reproduce this issue, I even tried creating cylinders with zero radius, length, or segments. Could you check if the cylinders you create there are somehow weird?

skalarproduktraum commented 3 years ago

Closing because couldn't be reproduced. Please reopen if it occurs again.