A circle (2 dimensions)  
 More...
#include <sdf_shape_2D.h>
  
  | 
        
          | madness::SDFCircle::SDFCircle | ( | const double | radius, |  
          |  |  | const coord_2d & | center |  
          |  | ) |  |  |  | inline | 
 
SDF for a sphere. 
- Parameters
- 
  
    | radius | The radius of the sphere |  | center | The center of the sphere |  
 
 
 
Computes the gradient of the SDF. 
- Parameters
- 
  
    | pt | Point at which to compute the gradient |  
 
- Returns
- the gradient 
References madness::g, and sqrt().
 
 
  
  | 
        
          | double madness::SDFCircle::sdf | ( | const coord_2d & | pt | ) | const |  | inline | 
 
Computes the normal distance. 
This SDF is exact, and easy to show.
- Parameters
- 
  
    | pt | Point at which to compute the distance from the surface |  
 
- Returns
- The signed distance from the surface 
References radius, and sqrt().
 
 
  
  | 
        
          | const coord_2d madness::SDFCircle::center |  | protected | 
 
 
  
  | 
        
          | const double madness::SDFCircle::radius |  | protected | 
 
Radius of circle. 
Referenced by sdf().
 
 
The documentation for this class was generated from the following file: