22 const Point & p1 = line_segment.
end();
23 const Point d = p1 - p0;
27 const Real b = 2.0 * (f * d);
33 const Real discriminant = b * b - 4.0 * a * c;
34 if (discriminant < 0.0)
38 const Real inv_denom = 1.0 / (2.0 * a);
39 const Real t1 = (-b - sqrt_disc) * inv_denom;
40 const Real t2 = (-b + sqrt_disc) * inv_denom;
42 return (t1 >= 0.0 && t1 <= 1.0) || (t2 >= 0.0 && t2 <= 1.0);
const Point & end() const
Ending of the line segment.
Ball primitive: a circle in 2D or a sphere in 3D.
The LineSegment class is used by the LineMaterialSamplerBase class and for some ray tracing stuff...
const Point & start() const
Beginning of the line segment.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
Ball computeBoundingBall() const override
return the ball itself
bool intersect(const LineSegment &line_segment) const override
Check if a line segment intersects this ball.