hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Hypersphere Class Reference

Represents hypersphere in any dimensionality. More...

#include <Surface_geom.hpp>

Inheritance diagram for hexed::Hypersphere:
hexed::Surface_geom

Public Member Functions

 Hypersphere (Mat<> center, double radius)
 
Nearest_point< dynnearest_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.
 

Detailed Description

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.

Member Function Documentation

◆ intersections()

std::vector< double > hexed::Hypersphere::intersections ( Mat<> point0,
Mat<> point1 )
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.

◆ nearest_point()

Nearest_point< dyn > hexed::Hypersphere::nearest_point ( Mat<> point,
double max_distance = huge,
double distance_guess = huge )
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.

Parameters
pointThe point you want to find the nearest point to.
max_distanceOnly consider points within max_distance of point.
distance_guessIf 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.


The documentation for this class was generated from the following files: