Shape used in CSG operations in MyCompositeShapeProvider. It can provide signed distance from the surface of the shape as culling if this signed distance will not be within certain range of the surface given a query range. For simple implementation, see MyCsgBox.
More...
Shape used in CSG operations in MyCompositeShapeProvider. It can provide signed distance from the surface of the shape as culling if this signed distance will not be within certain range of the surface given a query range. For simple implementation, see MyCsgBox.
For information on signed distance of some simple shapes go to http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm . In general, signed distance is distance to the closest point on the surface of the shape, with sign depending on whether it is outside (positive) or inside (negative). You can think of it as a step parameter for raymarching which determines how far and in which direction (forward +, backward -) you can move before hitting surface along the normalized ray direction from sampled point, assuming the origin is outside the shape.
Definition at line 23 of file MyCsgShapeBase.cs.