Space Engineers
Protected Member Functions | Protected Attributes | List of all members
Sandbox.Engine.Voxels.MyCsgShapeBase Class Referenceabstract

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...

Inheritance diagram for Sandbox.Engine.Voxels.MyCsgShapeBase:
Sandbox.Engine.Voxels.MyCsgBox Sandbox.Engine.Voxels.MyCsgCapsule Sandbox.Engine.Voxels.MyCsgSimpleSphere Sandbox.Engine.Voxels.MyCsgSphere Sandbox.Engine.Voxels.MyCsgTorus

Protected Member Functions

 MyCsgShapeBase ()
 

Protected Attributes

bool m_enableModulation
 
float m_detailSize
 

Detailed Description

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.

Constructor & Destructor Documentation

Sandbox.Engine.Voxels.MyCsgShapeBase.MyCsgShapeBase ( )
inlineprotected

Definition at line 28 of file MyCsgShapeBase.cs.

Member Data Documentation

float Sandbox.Engine.Voxels.MyCsgShapeBase.m_detailSize
protected

Definition at line 26 of file MyCsgShapeBase.cs.

bool Sandbox.Engine.Voxels.MyCsgShapeBase.m_enableModulation
protected

Definition at line 25 of file MyCsgShapeBase.cs.


The documentation for this class was generated from the following file: