EBGeometry  1.0
Classes | Functions
EBGeometry_AnalyticDistanceFunctions.hpp File Reference

Declaration of various analytic distance functions. More...

#include <algorithm>
#include <random>
#include "EBGeometry_BoundingVolumes.hpp"
#include "EBGeometry_SignedDistanceFunction.hpp"
#include "EBGeometry_NamespaceHeader.hpp"
#include "EBGeometry_NamespaceFooter.hpp"
Include dependency graph for EBGeometry_AnalyticDistanceFunctions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PlaneSDF< T >
 Signed distance function for a plane. More...
 
class  SphereSDF< T >
 Signed distance field for sphere. More...
 
class  BoxSDF< T >
 Signed distance field for an axis-aligned box. More...
 
class  TorusSDF< T >
 Signed distance field for a torus. More...
 
class  CylinderSDF< T >
 Signed distance field for a cylinder. More...
 
class  InfiniteCylinderSDF< T >
 Inifinitely long cylinder class. Oriented along the y-axis. More...
 
class  CapsuleSDF< T >
 Capsulate/pill SDF. Basically a cylinder with spherical endcaps, oriented along the specified axis. More...
 
class  InfiniteConeSDF< T >
 Signed distance field for an infinite cone. Oriented along +z. More...
 
class  ConeSDF< T >
 Signed distance field for an finite cone. Oriented along +z. More...
 
class  RoundedBoxSDF< T >
 Box of arbitrary dimensions centered at the origin, with rounded corners. More...
 
class  PerlinSDF< T >
 Ken Perlins gradient noise function. More...
 

Functions

template<class T >
constexpr const T clamp (const T &v, const T &lo, const T &hi)
 Clamp function. Returns lo if v < lo and hi if v > hi. Otherwise returns v. More...
 
template<class T >
constexpr const Vec3T< T > clamp (const Vec3T< T > &v, const Vec3T< T > &lo, const Vec3T< T > &hi)
 Clamp function. Returns lo if v < lo and hi if v > hi. Otherwise returns v. More...
 

Detailed Description

Declaration of various analytic distance functions.

This file contains various analytic signed distance fields. Some of these also include member function for fetching parameters, and users are free to add such functions also to other shapes.

Author
Robert Marskar

Function Documentation

◆ clamp() [1/2]

template<class T >
constexpr const T clamp ( const T &  v,
const T &  lo,
const T &  hi 
)
constexpr

Clamp function. Returns lo if v < lo and hi if v > hi. Otherwise returns v.

Parameters
[in]vValue to be clamped.
[in]loLower clamping value.
[in]hiHigher clamping value.

◆ clamp() [2/2]

template<class T >
constexpr const Vec3T<T> clamp ( const Vec3T< T > &  v,
const Vec3T< T > &  lo,
const Vec3T< T > &  hi 
)
constexpr

Clamp function. Returns lo if v < lo and hi if v > hi. Otherwise returns v.

Parameters
[in]vValue to be clamped.
[in]loLower clamping value.
[in]hiHigher clamping value.