Go to the documentation of this file.
7 #ifndef INCLUDE_JET_CUSTOM_IMPLICIT_SURFACE3_H_
8 #define INCLUDE_JET_CUSTOM_IMPLICIT_SURFACE3_H_
33 double resolution = 1e-3,
34 double rayMarchingResolution = 1e-6,
35 unsigned int maxNumOfIterations = 5,
46 std::function<double(
const Vector3D&)> _func;
48 double _resolution = 1e-3;
49 double _rayMarchingResolution = 1e-6;
50 unsigned int _maxNumOfIterations = 5;
54 bool intersectsLocal(
const Ray3D& ray)
const override;
60 double signedDistanceLocal(
const Vector3D& otherPoint)
const override;
63 const Ray3D& ray)
const override;
79 const std::function<
double(
const Vector3D&)>& func);
102 std::function<double(
const Vector3D&)> _func;
104 double _resolution = 1e-3;
105 double _rayMarchingResolution = 1e-6;
106 unsigned int _maxNumOfIterations = 5;
111 #endif // INCLUDE_JET_CUSTOM_IMPLICIT_SURFACE3_H_
static Builder builder()
Returns builder for CustomImplicitSurface3.
3-D axis-aligned bounding box class.
Definition: bounding_box3.h:41
Abstract base class for 3-D implicit surface.
Definition: implicit_surface3.h:15
Base class for 3-D surface builder.
Definition: surface3.h:115
Custom 3-D implicit surface using arbitrary function.
Definition: custom_implicit_surface3.h:16
bool isNormalFlipped
Flips normal when calling Surface3::closestNormal(...).
Definition: surface3.h:33
Definition: advection_solver2.h:18
BoundingBox3< double > BoundingBox3D
Double-type 3-D BoundingBox.
Definition: bounding_box3.h:127
Builder & withDomain(const BoundingBox3D &domain)
Returns builder with domain.
Transform3 transform
Local-to-world transform.
Definition: surface3.h:30
Builder & withSignedDistanceFunction(const std::function< double(const Vector3D &)> &func)
Returns builder with custom signed-distance function.
Class for 2-D ray.
Definition: ray3.h:21
virtual ~CustomImplicitSurface3()
Destructor.
CustomImplicitSurface3(const std::function< double(const Vector3D &)> &func, const BoundingBox3D &domain=BoundingBox3D(), double resolution=1e-3, double rayMarchingResolution=1e-6, unsigned int maxNumOfIterations=5, const Transform3 &transform=Transform3(), bool isNormalFlipped=false)
Struct that represents ray-surface intersection point.
Definition: surface3.h:19
CustomImplicitSurface3Ptr makeShared() const
Builds shared pointer of CustomImplicitSurface3 instance.
3-D vector class.
Definition: vector3.h:25
Front-end to create CustomImplicitSurface3 objects step by step.
Definition: custom_implicit_surface3.h:75
CustomImplicitSurface3 build() const
Builds CustomImplicitSurface3.
Builder & withRayMarchingResolution(double rayMarchingResolution)
Builder & withMaxNumberOfIterations(unsigned int numIter)
Builder & withResolution(double resolution)
Returns builder with finite differencing resolution.
std::shared_ptr< CustomImplicitSurface3 > CustomImplicitSurface3Ptr
Shared pointer type for the CustomImplicitSurface3.
Definition: custom_implicit_surface3.h:69