public float3 Min(CustomBrushPrimitive <DefaultCustomBrushType> primitive) { if (primitive.type == DefaultCustomBrushType.BOX) { return(new BoxSDF(BASE_SIZE).Min()); } else if (primitive.type == DefaultCustomBrushType.SPHERE) { return(new SphereSDF(BASE_SIZE).Min()); } return(0); }
public ISdf GetRenderSdf(CustomBrushPrimitive <DefaultCustomBrushType> primitive) { if (primitive.type == DefaultCustomBrushType.BOX) { return(new BoxSDF(BASE_SIZE)); } else if (primitive.type == DefaultCustomBrushType.SPHERE) { return(new SphereSDF(BASE_SIZE)); } return(null); }
public float Eval(CustomBrushPrimitive <DefaultCustomBrushType> primitive, float3 pos) { if (primitive.type == DefaultCustomBrushType.BOX) { return(new BoxSDF(BASE_SIZE).Eval(pos)); } else if (primitive.type == DefaultCustomBrushType.SPHERE) { return(new SphereSDF(BASE_SIZE).Eval(pos)); } return(0.0f); }