11#ifndef EBGEOMETRY_TRANSFORM_HPP
12#define EBGEOMETRY_TRANSFORM_HPP
34[[nodiscard]] std::shared_ptr<ImplicitFunction<T>>
45[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
57[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
68[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
79[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
90[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
101[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
113[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
126[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
137[[
nodiscard]] std::shared_ptr<ImplicitFunction<T>>
147 static_assert(std::is_floating_point_v<T>,
"ComplementIF requires a floating-point T");
216 static_assert(std::is_floating_point_v<T>,
"TranslateIF requires a floating-point T");
291 static_assert(std::is_floating_point_v<T>,
"RotateIF requires a floating-point T");
319 const size_t a_axis)
noexcept;
384 static_assert(std::is_floating_point_v<T>,
"OffsetIF requires a floating-point T");
459 static_assert(std::is_floating_point_v<T>,
"ScaleIF requires a floating-point T");
534 static_assert(std::is_floating_point_v<T>,
"AnnularIF requires a floating-point T");
613 static_assert(std::is_floating_point_v<T>,
"BlurIF requires a floating-point T");
699 static_assert(std::is_floating_point_v<T>,
"MollifyIF requires a floating-point T");
769 std::shared_ptr<ImplicitFunction<T>> m_mollifier =
nullptr;
787 static_assert(std::is_floating_point_v<T>,
"ElongateIF requires a floating-point T");
847 std::shared_ptr<const ImplicitFunction<T>> m_implicitFunction =
nullptr;
862 static_assert(std::is_floating_point_v<T>,
"ReflectIF requires a floating-point T");
922 std::shared_ptr<const ImplicitFunction<T>> m_implicitFunction =
nullptr;
932#include "EBGeometry_TransformImplem.hpp"
Abstract base class for representing an implicit function.
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Annular implicit function. Creates a shell out of the implicit function.
Definition EBGeometry_Transform.hpp:533
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
~AnnularIF() override=default
Destructor.
T m_delta
Shell thickness.
Definition EBGeometry_Transform.hpp:599
AnnularIF()=delete
Disallowed weak construction.
std::shared_ptr< const ImplicitFunction< T > > m_implicitFunction
Original implicit function.
Definition EBGeometry_Transform.hpp:594
AnnularIF & operator=(const AnnularIF &a_other) noexcept=default
Copy assignment operator.
AnnularIF(const AnnularIF &a_other) noexcept=default
Copy constructor.
AnnularIF & operator=(AnnularIF &&a_other) noexcept=default
Move assignment operator.
AnnularIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_delta) noexcept
Full constructor.
AnnularIF(AnnularIF &&a_other) noexcept=default
Move constructor.
Blurred/interpolated implicit function — can be used for smoothing.
Definition EBGeometry_Transform.hpp:612
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
BlurIF(const BlurIF &a_other) noexcept=default
Copy constructor.
T m_blurDistance
Blur distance.
Definition EBGeometry_Transform.hpp:681
BlurIF()=delete
Disallowed weak construction.
BlurIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_blurDistance, const T a_alpha=0.5) noexcept
Full constructor.
BlurIF(BlurIF &&a_other) noexcept=default
Move constructor.
T m_alpha
Alpha factor.
Definition EBGeometry_Transform.hpp:686
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
Original implicit function.
Definition EBGeometry_Transform.hpp:676
Complemented implicit function.
Definition EBGeometry_Transform.hpp:146
ComplementIF & operator=(ComplementIF &&a_other) noexcept=default
Move assignment operator.
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
ComplementIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction) noexcept
Full constructor.
ComplementIF(ComplementIF &&a_other) noexcept=default
Move constructor.
~ComplementIF() override=default
Destructor (does nothing)
ComplementIF()=delete
No weak construction for this one.
ComplementIF & operator=(const ComplementIF &a_other) noexcept=default
Copy assignment operator.
ComplementIF(const ComplementIF &a_other) noexcept=default
Copy constructor.
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
Implicit function.
Definition EBGeometry_Transform.hpp:206
Implicit function which is an elongation of another implicit function along each axis.
Definition EBGeometry_Transform.hpp:786
ElongateIF(ElongateIF &&a_other) noexcept=default
Move constructor.
ElongateIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_elongation) noexcept
Full constructor.
ElongateIF & operator=(const ElongateIF &a_other) noexcept=default
Copy assignment operator.
Vec3T< T > m_elongation
Elongation.
Definition EBGeometry_Transform.hpp:852
ElongateIF & operator=(ElongateIF &&a_other) noexcept=default
Move assignment operator.
ElongateIF(const ElongateIF &a_other) noexcept=default
Copy constructor.
ElongateIF()=delete
Disallowed weak construction.
~ElongateIF() override=default
Destructor.
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
Abstract representation of an implicit function (not necessarily a signed distance function).
Definition EBGeometry_ImplicitFunction.hpp:32
Mollified implicit function.
Definition EBGeometry_Transform.hpp:698
MollifyIF & operator=(MollifyIF &&a_other) noexcept=default
Move assignment operator.
MollifyIF & operator=(const MollifyIF &a_other)=default
Copy assignment operator.
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
MollifyIF(MollifyIF &&a_other) noexcept=default
Move constructor.
MollifyIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const std::shared_ptr< ImplicitFunction< T > > &a_mollifier, const T a_maxValue, const size_t a_numPoints) noexcept
Full constructor.
std::vector< std::pair< Vec3T< T >, T > > m_sampledMollifier
Mollifier Weights.
Definition EBGeometry_Transform.hpp:774
~MollifyIF() override=default
Destructor.
MollifyIF()=delete
Disallowed weak construction.
MollifyIF(const MollifyIF &a_other)=default
Copy constructor.
Offset implicit function. Offsets (grows or shrinks) the implicit function by a constant.
Definition EBGeometry_Transform.hpp:383
~OffsetIF() override=default
Destructor.
OffsetIF()=delete
Disallowed weak construction.
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
Underlying implicit function.
Definition EBGeometry_Transform.hpp:444
OffsetIF(OffsetIF &&a_other) noexcept=default
Move constructor.
OffsetIF & operator=(const OffsetIF &a_other) noexcept=default
Copy assignment operator.
T m_offset
Offset value.
Definition EBGeometry_Transform.hpp:449
OffsetIF & operator=(OffsetIF &&a_other) noexcept=default
Move assignment operator.
OffsetIF(const OffsetIF &a_other) noexcept=default
Copy constructor.
T value(const Vec3T< T > &a_point) const noexcept override
Value function with offset applied.
OffsetIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_offset) noexcept
Full constructor. Subtracts a_offset from the wrapped function value.
Implicit function which is a reflection of another implicit function.
Definition EBGeometry_Transform.hpp:861
ReflectIF & operator=(const ReflectIF &a_other) noexcept=default
Copy assignment operator.
ReflectIF(ReflectIF &&a_other) noexcept=default
Move constructor.
ReflectIF()=delete
Disallowed weak construction.
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
Vec3T< T > m_reflectParams
Reflection parameters.
Definition EBGeometry_Transform.hpp:927
ReflectIF & operator=(ReflectIF &&a_other) noexcept=default
Move assignment operator.
ReflectIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const size_t &a_reflectPlane) noexcept
Full constructor. Reflects across the specified plane.
~ReflectIF() override=default
Destructor.
ReflectIF(const ReflectIF &a_other) noexcept=default
Copy constructor.
Rotated implicit function. Rotates an implicit function about an axis.
Definition EBGeometry_Transform.hpp:290
T m_angle
Angle to rotate.
Definition EBGeometry_Transform.hpp:364
T m_cosAngle
Parameter in rotation matrix. Stored for efficiency.
Definition EBGeometry_Transform.hpp:369
RotateIF(RotateIF &&a_other) noexcept=default
Move constructor.
RotateIF(const RotateIF &a_other) noexcept=default
Copy constructor.
T value(const Vec3T< T > &a_point) const noexcept override
Value function with rotation applied to the query point.
RotateIF & operator=(RotateIF &&a_other) noexcept=default
Move assignment operator.
size_t m_axis
Axis to rotate about.
Definition EBGeometry_Transform.hpp:359
~RotateIF() override=default
Destructor.
RotateIF()=delete
No weak construction.
T m_sinAngle
Parameter in rotation matrix. Stored for efficiency.
Definition EBGeometry_Transform.hpp:374
RotateIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_angle, const size_t a_axis) noexcept
Full constructor. Rotates the wrapped implicit function by a_angle degrees about a_axis.
RotateIF & operator=(const RotateIF &a_other) noexcept=default
Copy assignment operator.
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
Underlying implicit function.
Definition EBGeometry_Transform.hpp:354
Uniformly scaled implicit function.
Definition EBGeometry_Transform.hpp:458
ScaleIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_scale) noexcept
Full constructor.
ScaleIF & operator=(const ScaleIF &a_other) noexcept=default
Copy assignment operator.
ScaleIF(ScaleIF &&a_other) noexcept=default
Move constructor.
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
Original implicit function.
Definition EBGeometry_Transform.hpp:519
ScaleIF()=delete
Disallowed weak construction.
ScaleIF & operator=(ScaleIF &&a_other) noexcept=default
Move assignment operator.
T m_scale
Scaling factor.
Definition EBGeometry_Transform.hpp:524
~ScaleIF() override=default
Destructor.
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
ScaleIF(const ScaleIF &a_other) noexcept=default
Copy constructor.
Translated implicit function.
Definition EBGeometry_Transform.hpp:215
TranslateIF(const TranslateIF &a_other) noexcept=default
Copy constructor.
~TranslateIF() override=default
Destructor (does nothing)
Vec3T< T > m_shift
Input point translate.
Definition EBGeometry_Transform.hpp:281
std::shared_ptr< ImplicitFunction< T > > m_implicitFunction
Underlying implicit function.
Definition EBGeometry_Transform.hpp:276
TranslateIF()=delete
No weak construction for this one.
T value(const Vec3T< T > &a_point) const noexcept override
Value function.
TranslateIF & operator=(const TranslateIF &a_other) noexcept=default
Copy assignment operator.
TranslateIF(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_shift) noexcept
Full constructor.
TranslateIF(TranslateIF &&a_other) noexcept=default
Move constructor.
TranslateIF & operator=(TranslateIF &&a_other) noexcept=default
Move assignment operator.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31
std::shared_ptr< ImplicitFunction< T > > Rotate(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_angle, const size_t a_axis)
Convenience function for rotating an implicit function.
std::shared_ptr< ImplicitFunction< T > > Offset(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_offset)
Convenience function for offsetting an implicit function.
std::shared_ptr< ImplicitFunction< T > > Translate(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_shift)
Convenience function for translating an implicit function.
std::shared_ptr< ImplicitFunction< T > > Blur(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_blurDistance)
Convenience function for blurring an implicit function.
std::shared_ptr< ImplicitFunction< T > > Complement(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction)
Convenience function for taking the complement of an implicit function.
std::shared_ptr< ImplicitFunction< T > > Scale(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_scale)
Convenience function for scaling an implicit function.
std::shared_ptr< ImplicitFunction< T > > Elongate(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const Vec3T< T > &a_elongation)
Convenience function for elongating (stretching) an implicit function.
std::shared_ptr< ImplicitFunction< T > > Annular(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_delta)
Convenience function for creating a shell out of an implicit function.
std::shared_ptr< ImplicitFunction< T > > Reflect(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const size_t &a_reflectPlane)
Convenience function for reflecting an implicit function.
std::shared_ptr< ImplicitFunction< T > > Mollify(const std::shared_ptr< ImplicitFunction< T > > &a_implicitFunction, const T a_dist, const size_t a_mollifierSamples=2)
Convenience function for mollification with an input sphere.