11 #ifndef CUBBYFLOW_SPHERE_HPP 12 #define CUBBYFLOW_SPHERE_HPP 32 bool _isNormalFlipped =
false);
37 bool _isNormalFlipped =
false);
67 [[nodiscard]]
double ClosestDistanceLocal(
70 [[nodiscard]]
bool IntersectsLocal(
106 Builder& WithRadius(
double _radius);
112 std::shared_ptr<Sphere<N>> MakeShared()
const;
116 using Base::m_isNormalFlipped;
117 using Base::m_transform;
120 double m_radius = 0.0;
std::shared_ptr< Sphere3 > Sphere3Ptr
Shared pointer for the Sphere3 type.
Definition: Sphere.hpp:92
Class for N-D ray.
Definition: Ray.hpp:25
std::shared_ptr< Sphere2 > Sphere2Ptr
Shared pointer for the Sphere2 type.
Definition: Sphere.hpp:89
Sphere(const Transform< N > &_transform=Transform< N >{}, bool _isNormalFlipped=false)
Constructs a sphere with center at the origin and radius of 1.
static Builder GetBuilder()
Returns builder fox Sphere.
double radius
Radius of the sphere.
Definition: Sphere.hpp:61
~Sphere() override=default
Default virtual destructor.
Front-end to create Sphere objects step by step.
Definition: Sphere.hpp:98
Definition: Matrix.hpp:27
Definition: pybind11Utils.hpp:20
Abstract base class for N-D surface.
Definition: Surface.hpp:38
Struct that represents ray-surface intersection point.
Definition: Surface.hpp:25
N-D sphere geometry.
Definition: Sphere.hpp:25
Vector< double, N > center
Center of the sphere.
Definition: Sphere.hpp:58
Base class for N-D surface builder.
Definition: Surface.hpp:153
Sphere & operator=(const Sphere &other)
Copy assignment operator.