Mantid
Loading...
Searching...
No Matches
RenderingHelpersThrowing.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
8#include <stdexcept>
9#include <string>
10
11namespace {
12void throwNoOpenGLError(const std::string &function) {
13 throw std::runtime_error(function + ": Rendering not supported in a build without OpenGL. Rebuild "
14 "with ENABLE_OPENGL to enable support.");
15}
16
17} // namespace
18
19namespace Mantid {
20namespace Geometry {
21namespace RenderingHelpers {
22void renderIObjComponent(const IObjComponent &) { throwNoOpenGLError("renderIObjComponent"); }
23
24void renderTriangulated(detail::GeometryTriangulator &) { throwNoOpenGLError("renderTriangulated"); }
25
26void renderShape(const detail::ShapeInfo &) { throwNoOpenGLError("renderShape"); }
27
28} // namespace RenderingHelpers
29} // namespace Geometry
30} // namespace Mantid
MANTID_GEOMETRY_DLL void renderIObjComponent(const IObjComponent &objComp)
Render IObjComponent.
MANTID_GEOMETRY_DLL void renderTriangulated(detail::GeometryTriangulator &triangulator)
Render Traingulated Surface.
MANTID_GEOMETRY_DLL void renderShape(const detail::ShapeInfo &shapeInfo)
Renders a sphere, cuboid, hexahedron, cone or cylinder.
Helper class which provides the Collimation Length for SANS instruments.