https://mooseframework.inl.gov
Classes | Namespaces | Functions
LineSegment.h File Reference

Go to the source code of this file.

Classes

class  LineSegment
 The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff. More...
 

Namespaces

 libMesh
 The following methods are specializations for using the libMesh::Parallel::packed_range_* routines for std::strings.
 

Functions

void dataStore (std::ostream &stream, LineSegment &l, void *context)
 
void dataLoad (std::istream &stream, LineSegment &l, void *context)
 
void to_json (nlohmann::json &json, const LineSegment &l)
 

Function Documentation

◆ dataLoad()

void dataLoad ( std::istream &  stream,
LineSegment l,
void context 
)

Definition at line 246 of file LineSegment.C.

247 {
248  Point p0;
249  dataLoad(stream, p0, context);
250  Point p1;
251  dataLoad(stream, p1, context);
252  l.set(p0, p1);
253 }
void set(const Point &p0, const Point &p1)
Sets the points on the line segment.
Definition: LineSegment.C:232
void dataLoad(std::istream &stream, LineSegment &l, void *context)
Definition: LineSegment.C:246

◆ dataStore()

void dataStore ( std::ostream &  stream,
LineSegment l,
void context 
)

Definition at line 239 of file LineSegment.C.

240 {
241  dataStore(stream, l.start(), context);
242  dataStore(stream, l.end(), context);
243 }
const Point & end() const
Ending of the line segment.
Definition: LineSegment.h:67
void dataStore(std::ostream &stream, LineSegment &l, void *context)
Definition: LineSegment.C:239
const Point & start() const
Beginning of the line segment.
Definition: LineSegment.h:62

◆ to_json()

void to_json ( nlohmann::json &  json,
const LineSegment l 
)

Definition at line 256 of file LineSegment.C.

257 {
258  to_json(json["start"], l.start());
259  to_json(json["end"], l.end());
260 }
const Point & end() const
Ending of the line segment.
Definition: LineSegment.h:67
void to_json(nlohmann::json &json, const LineSegment &l)
Definition: LineSegment.C:256
const Point & start() const
Beginning of the line segment.
Definition: LineSegment.h:62