|
Mantid
|
Handles rendering of all object Geometry. More...
#include <GeometryHandler.h>
Public Member Functions | |
| bool | canTriangulate () const |
| std::shared_ptr< GeometryHandler > | clone () const |
| GeometryHandler (const GeometryHandler &handler) | |
| GeometryHandler (const MeshObject &obj) | |
| GeometryHandler (const MeshObject2D &obj) | |
| GeometryHandler (const std::shared_ptr< CSGObject > &obj) | |
| Constructor. More... | |
| GeometryHandler (CSGObject *obj) | |
| Constructor. More... | |
| GeometryHandler (IObjComponent *comp) | |
| Constructor. More... | |
| void | GetObjectGeom (detail::ShapeInfo::GeometryShape &type, std::vector< Kernel::V3D > &vector, double &innerRadius, double &radius, double &height) const |
| return the actual type and points of one of the "standard" objects, cuboid/cone/cyl/sphere More... | |
| const std::vector< uint32_t > & | getTriangleFaces () const |
| Extract the Faces of the triangles. More... | |
| const std::vector< double > & | getTriangleVertices () const |
| Extract the vertices of the triangles. More... | |
| bool | hasShapeInfo () const |
| void | initialize () const |
| Prepare/Initialize Object/ObjComponent to be rendered. More... | |
| size_t | numberOfPoints () const |
| get the number of points or vertices More... | |
| size_t | numberOfTriangles () const |
| get the number of triangles More... | |
| GeometryHandler & | operator= (const MeshObject &obj) |
| GeometryHandler & | operator= (const MeshObject2D &obj) |
| GeometryHandler & | operator= (GeometryHandler handler) |
| void | render () const |
| Render Object or ObjComponent. More... | |
| void | setGeometryCache (size_t nPts, size_t nFaces, std::vector< double > &&pts, std::vector< uint32_t > &&faces) |
| Sets the geometry cache using the triangulation information provided. More... | |
| void | setShapeInfo (detail::ShapeInfo &&shapeInfo) |
| const detail::ShapeInfo & | shapeInfo () const |
| ~GeometryHandler () | |
| Destructor. More... | |
Protected Attributes | |
| CSGObject * | m_csgObj = nullptr |
| Object that uses this geometry handler. More... | |
| IObjComponent * | m_objComp = nullptr |
| ObjComponent that uses this geometry handler. More... | |
| std::shared_ptr< detail::ShapeInfo > | m_shapeInfo |
| std::unique_ptr< detail::GeometryTriangulator > | m_triangulator |
Static Private Attributes | |
| static Kernel::Logger & | PLog |
| The official logger. More... | |
Handles rendering of all object Geometry.
Handles the rendering of all geometry types in Mantid.
Definition at line 57 of file GeometryHandler.h.
| Mantid::Geometry::GeometryHandler::GeometryHandler | ( | IObjComponent * | comp | ) |
Constructor.
Definition at line 19 of file GeometryHandler.cpp.
| Mantid::Geometry::GeometryHandler::GeometryHandler | ( | const std::shared_ptr< CSGObject > & | obj | ) |
Constructor.
Definition at line 21 of file GeometryHandler.cpp.
| Mantid::Geometry::GeometryHandler::GeometryHandler | ( | CSGObject * | obj | ) |
Constructor.
Definition at line 24 of file GeometryHandler.cpp.
| Mantid::Geometry::GeometryHandler::GeometryHandler | ( | const MeshObject & | obj | ) |
Definition at line 27 of file GeometryHandler.cpp.
References obj.
| Mantid::Geometry::GeometryHandler::GeometryHandler | ( | const MeshObject2D & | obj | ) |
Definition at line 34 of file GeometryHandler.cpp.
References obj.
| Mantid::Geometry::GeometryHandler::GeometryHandler | ( | const GeometryHandler & | handler | ) |
Definition at line 41 of file GeometryHandler.cpp.
References m_csgObj, m_objComp, m_shapeInfo, and m_triangulator.
|
default |
Destructor.
|
inline |
Definition at line 80 of file GeometryHandler.h.
Referenced by getTriangleFaces(), getTriangleVertices(), numberOfPoints(), numberOfTriangles(), render(), and setGeometryCache().
| std::shared_ptr< GeometryHandler > Mantid::Geometry::GeometryHandler::clone | ( | ) | const |
Definition at line 64 of file GeometryHandler.cpp.
| void Mantid::Geometry::GeometryHandler::GetObjectGeom | ( | detail::ShapeInfo::GeometryShape & | type, |
| std::vector< Kernel::V3D > & | vector, | ||
| double & | innerRadius, | ||
| double & | radius, | ||
| double & | height | ||
| ) | const |
return the actual type and points of one of the "standard" objects, cuboid/cone/cyl/sphere
Definition at line 114 of file GeometryHandler.cpp.
References height, innerRadius, m_shapeInfo, Mantid::Geometry::detail::ShapeInfo::NOSHAPE, and radius.
| const std::vector< uint32_t > & Mantid::Geometry::GeometryHandler::getTriangleFaces | ( | ) | const |
Extract the Faces of the triangles.
Definition at line 100 of file GeometryHandler.cpp.
References canTriangulate(), and m_triangulator.
| const std::vector< double > & Mantid::Geometry::GeometryHandler::getTriangleVertices | ( | ) | const |
Extract the vertices of the triangles.
Definition at line 93 of file GeometryHandler.cpp.
References canTriangulate(), and m_triangulator.
|
inline |
Definition at line 86 of file GeometryHandler.h.
| void Mantid::Geometry::GeometryHandler::initialize | ( | ) | const |
Prepare/Initialize Object/ObjComponent to be rendered.
Definition at line 75 of file GeometryHandler.cpp.
References m_csgObj, render(), and Mantid::Geometry::CSGObject::updateGeometryHandler().
Referenced by Mantid::Geometry::GridDetector::initDraw(), Mantid::Geometry::ObjComponent::initDraw(), and Mantid::Geometry::StructuredDetector::initDraw().
| size_t Mantid::Geometry::GeometryHandler::numberOfPoints | ( | ) | const |
get the number of points or vertices
Definition at line 87 of file GeometryHandler.cpp.
References canTriangulate(), and m_triangulator.
| size_t Mantid::Geometry::GeometryHandler::numberOfTriangles | ( | ) | const |
get the number of triangles
Definition at line 81 of file GeometryHandler.cpp.
References canTriangulate(), and m_triangulator.
| GeometryHandler & Mantid::Geometry::GeometryHandler::operator= | ( | const MeshObject & | obj | ) |
Definition at line 29 of file GeometryHandler.cpp.
References m_triangulator, Mantid::Geometry::detail::makeRenderingMesh(), and obj.
| GeometryHandler & Mantid::Geometry::GeometryHandler::operator= | ( | const MeshObject2D & | obj | ) |
Definition at line 36 of file GeometryHandler.cpp.
References m_triangulator, Mantid::Geometry::detail::makeRenderingMesh(), and obj.
| GeometryHandler & Mantid::Geometry::GeometryHandler::operator= | ( | GeometryHandler | handler | ) |
Definition at line 53 of file GeometryHandler.cpp.
References m_csgObj, m_objComp, m_shapeInfo, and m_triangulator.
| void Mantid::Geometry::GeometryHandler::render | ( | ) | const |
Render Object or ObjComponent.
Definition at line 66 of file GeometryHandler.cpp.
References canTriangulate(), m_objComp, m_shapeInfo, m_triangulator, Mantid::Geometry::RenderingHelpers::renderIObjComponent(), Mantid::Geometry::RenderingHelpers::renderShape(), and Mantid::Geometry::RenderingHelpers::renderTriangulated().
Referenced by Mantid::Geometry::GridDetector::draw(), Mantid::Geometry::ObjComponent::draw(), Mantid::Geometry::StructuredDetector::draw(), and initialize().
| void Mantid::Geometry::GeometryHandler::setGeometryCache | ( | size_t | nPts, |
| size_t | nFaces, | ||
| std::vector< double > && | pts, | ||
| std::vector< uint32_t > && | faces | ||
| ) |
Sets the geometry cache using the triangulation information provided.
Definition at line 107 of file GeometryHandler.cpp.
References canTriangulate(), and m_triangulator.
| void Mantid::Geometry::GeometryHandler::setShapeInfo | ( | detail::ShapeInfo && | shapeInfo | ) |
Definition at line 121 of file GeometryHandler.cpp.
References m_shapeInfo, m_triangulator, and shapeInfo().
|
inline |
Definition at line 87 of file GeometryHandler.h.
Referenced by setShapeInfo().
|
protected |
Object that uses this geometry handler.
Definition at line 65 of file GeometryHandler.h.
Referenced by GeometryHandler(), initialize(), and operator=().
|
protected |
ObjComponent that uses this geometry handler.
Definition at line 64 of file GeometryHandler.h.
Referenced by GeometryHandler(), operator=(), and render().
|
protected |
Definition at line 62 of file GeometryHandler.h.
Referenced by GeometryHandler(), GetObjectGeom(), operator=(), render(), and setShapeInfo().
|
protected |
Definition at line 63 of file GeometryHandler.h.
Referenced by GeometryHandler(), getTriangleFaces(), getTriangleVertices(), numberOfPoints(), numberOfTriangles(), operator=(), render(), setGeometryCache(), and setShapeInfo().
|
staticprivate |
The official logger.
Definition at line 59 of file GeometryHandler.h.