Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : class LineSegment; 13 : class Ball; 14 : 15 : /** 16 : * Base class for geometry primitives. 17 : */ 18 : class GeometryBase 19 : { 20 : public: 21 2197 : virtual ~GeometryBase() = default; 22 : 23 : /** 24 : * Check if a line segment intersects this geometry. 25 : */ 26 : virtual bool intersect(const LineSegment & line_segment) const = 0; 27 : 28 : /** 29 : * Compute a bounding ball for this geometry. 30 : * Sphere in 3D, circle in 2D. The ball should fully contain the geometry. 31 : */ 32 : virtual Ball computeBoundingBall() const = 0; 33 : };