18#include "libmesh/point.h"
90 const Point &
end()
const {
return _p1; }
107 void set(
const Point & p0,
const Point & p1);
120 bool closest_point(
const Point & p,
bool clamp_to_segment, Point & closest_p)
const;
void dataLoad(std::istream &stream, LineSegment &l, void *context)
void to_json(nlohmann::json &json, const LineSegment &l)
void dataStore(std::ostream &stream, LineSegment &l, void *context)
Ball primitive: a circle in 2D or a sphere in 3D.
Base class for geometry primitives.
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff.
Ball computeBoundingBall() const override
Compute a bounding ball for this line segment.
bool intersect(const LineSegment &l1, Point &intersect_p) const
Check if a line segment intersects another line segment, and if so, return the intersection point.
bool intersect(const libMesh::Plane &pl, Point &intersect_p) const
Check if a line segment intersects a plane, and if so, return the intersection point.
bool closest_normal_point(const Point &p, Point &closest_p) const
Finds the closest point on the Line determined by the Line Segments.
Real length() const
Length of segment.
bool contains_point(const Point &p) const
Determines whether a point is in a line segment or not.
const Point & end() const
Ending of the line segment.
void set(const Point &p0, const Point &p1)
Sets the points on the line segment.
void setStart(const Point &p0)
Sets the beginning of the line segment.
Point normal() const
normal vector of the line segment
void setEnd(const Point &p1)
Sets the end of the line segment.
~LineSegment() override=default
const Point & start() const
Beginning of the line segment.
Point closest_point(const Point &p) const
Returns the closest point on the LineSegment to the passed in point.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...