Represents hypersphere in any dimensionality. More...
#include <Surface_geom.hpp>
Public Member Functions | |
Hypersphere (Mat<> center, double radius) | |
Nearest_point< dyn > | nearest_point (Mat<> point, double max_distance=huge, double distance_guess=huge) override |
Computes the point on the surface which is nearest to point within max_distance . | |
std::vector< double > | intersections (Mat<> point0, Mat<> point1) override |
Computes the set of intersection points between a line and the surface. | |
Represents hypersphere in any dimensionality.
Can behave as an interval, cylinder, sphere, or higher-dimensional equivalent depending on the number of entries in the point vectors supplied as arguments. However, all points supplied must have the same dimensionality, or else behavior is undefined.
|
overridevirtual |
Computes the set of intersection points between a line and the surface.
The line is defined parametrically to be the set of points \( [\text{point0}] + t [\text{point1}] \) for all \( t \in \mathbb{R} \). Returns the (potentially empty) set of \( t \) values where the line intersects the surface.
Implements hexed::Surface_geom.
|
overridevirtual |
Computes the point on the surface which is nearest to point
within max_distance
.
If no point is found, returns an empty Nearest_point
.
point | The point you want to find the nearest point to. |
max_distance | Only consider points within max_distance of point . |
distance_guess | If you have some reason to suspect the nearest point is within a certain distance of the input point, you can pass it to this parameter as a hint to possibly improve performance. |
Implements hexed::Surface_geom.