What does radius2 exactly means ? In most setters it is set to squared distance from 0,0,0 point. In compute method, local variable named radius2 is used to represent radius squared. In classify(Sphere) method it is passed in place where radius should be used, not squared distance from origin… And classify(x,y,z,rad2) method is broken - square root should be taken from d before using it for checks.
I’m not touching this class at the moment - first I need to know what you really want for radius2 to represent and if any of other code relies on current specific behaviour.
