Commit a4cf3fea authored by mantid-builder's avatar mantid-builder Committed by Karl Palmen
Browse files

clang-format PR21581 9565c247

parent cf73c608
......@@ -36,7 +36,7 @@ class vtkGeometryCacheWriter;
\date Dec 2017
\author Karl Palmen
Mesh Object of Triangles assumed to form one or more
Mesh Object of Triangles assumed to form one or more
non-intersecting closed surfaces enclosing separate volumes.
Copyright © 2017-2018 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
......@@ -64,7 +64,7 @@ class MANTID_GEOMETRY_DLL MeshObject : public IObject {
public:
/// Main constructor
MeshObject(const std::vector<size_t> &faces,
const std::vector<Mantid::Kernel::V3D> &vertices);
const std::vector<Mantid::Kernel::V3D> &vertices);
/// Copy constructor
MeshObject(const MeshObject &);
......
......@@ -26,9 +26,9 @@ MeshObject::MeshObject() {} // Should never be called
MeshObject::MeshObject(const std::vector<size_t> &faces,
const std::vector<V3D> &vertices)
: m_boundingBox(), m_object_number(0),
m_id(), m_material(), m_triangles(faces), m_vertices(vertices) {
m_handler = boost::make_shared<CacheGeometryHandler>(this);
: m_boundingBox(), m_object_number(0), m_id(), m_material(),
m_triangles(faces), m_vertices(vertices) {
m_handler = boost::make_shared<CacheGeometryHandler>(this);
}
/**
......@@ -704,9 +704,9 @@ void MeshObject::GetObjectGeom(int &type, std::vector<Kernel::V3D> &vectors,
/** Getter for the shape xml
@return the shape xml.
*/
std::string MeshObject::getShapeXML() const {
std::string MeshObject::getShapeXML() const {
throw std::runtime_error("getShapeXML not available for MeshObject");
}
}
} // NAMESPACE Geometry
} // NAMESPACE Mantid
......@@ -51,8 +51,7 @@ public:
GCC_DIAG_ON_SUGGEST_OVERRIDE
};
boost::shared_ptr<MeshObject> createCube(const double size,
const V3D &centre) {
boost::shared_ptr<MeshObject> createCube(const double size, const V3D &centre) {
/**
* Create cube of side length size with specified centre,
* parellel to axes and non-negative vertex coordinates.
......@@ -114,7 +113,7 @@ boost::shared_ptr<MeshObject> createCube(const double size,
triangles.push_back(2);
boost::shared_ptr<MeshObject> retVal =
boost::shared_ptr<MeshObject>(new MeshObject(triangles, vertices));
boost::shared_ptr<MeshObject>(new MeshObject(triangles, vertices));
return retVal;
}
......@@ -177,7 +176,7 @@ boost::shared_ptr<MeshObject> createOctahedron() {
triangles.push_back(5);
boost::shared_ptr<MeshObject> retVal =
boost::shared_ptr<MeshObject>(new MeshObject(triangles, vertices));
boost::shared_ptr<MeshObject>(new MeshObject(triangles, vertices));
return retVal;
}
......@@ -266,10 +265,9 @@ boost::shared_ptr<MeshObject> createLShape() {
triangles.push_back(6);
boost::shared_ptr<MeshObject> retVal =
boost::shared_ptr<MeshObject>(new MeshObject(triangles, vertices));
boost::shared_ptr<MeshObject>(new MeshObject(triangles, vertices));
return retVal;
}
}
class MeshObjectTest : public CxxTest::TestSuite {
......@@ -357,7 +355,7 @@ public:
TS_ASSERT(boost::dynamic_pointer_cast<CacheGeometryHandler>(
original.getGeometryHandler()));
auto lhs = createOctahedron();
auto lhs = createOctahedron();
*lhs = original; // assign
// The copy should be a primitive object with a GluGeometryHandler
objType = -1;
......@@ -1012,7 +1010,6 @@ public:
TS_ASSERT_DELTA(geom_obj->solidAngle(V3D(0.5, 0.5, -0.5)), M_PI * 2.0 / 3.0,
satol);
}
};
// -----------------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment