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 setEnd(const Point &p1)
Sets the end of the line segment.
const Point & end() const
Ending of the line segment.
Ball primitive: a circle in 2D or a sphere in 3D.
void dataLoad(std::istream &stream, LineSegment &l, void *context)
Real length() const
Length of segment.
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff...
void to_json(nlohmann::json &json, const LineSegment &l)
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...
Point normal() const
normal vector of the line segment
void setStart(const Point &p0)
Sets the beginning of the line segment.
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.
void dataStore(std::ostream &stream, LineSegment &l, void *context)
Ball computeBoundingBall() const override
Compute a bounding ball for this line segment.
const Point & start() const
Beginning of the line segment.
bool contains_point(const Point &p) const
Determines whether a point is in a line segment or not.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for geometry primitives.
~LineSegment() override=default