예제 #1
0
 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);
 }
예제 #2
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);
 }
예제 #3
0
 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);
 }