Commit cf55d9f2 authored by Roman Tolchenov's avatar Roman Tolchenov
Browse files

Apply clang format patch. Re #12827

parent 81c5b9af
......@@ -89,8 +89,8 @@ createSphere(double radius,
const std::string &id = "sp-1");
/** Create a cuboid shape for your pixels */
Mantid::Geometry::IObject_sptr createCuboid(double x_side_length,
double y_side_length = -1.0,
double z_side_length = -1.0);
double y_side_length = -1.0,
double z_side_length = -1.0);
/**
* Create a component assembly at the origin made up of 4 cylindrical detectors
*/
......
......@@ -60,8 +60,8 @@ std::string cappedCylinderXML(double radius, double height,
* Create a capped cylinder object
*/
IObject_sptr createCappedCylinder(double radius, double height,
const V3D &baseCentre, const V3D &axis,
const std::string &id) {
const V3D &baseCentre, const V3D &axis,
const std::string &id) {
return ShapeFactory().createShape(
cappedCylinderXML(radius, height, baseCentre, axis, id));
}
......@@ -85,7 +85,7 @@ std::string sphereXML(double radius, const V3D &centre, const std::string &id) {
* Create a sphere object
*/
IObject_sptr createSphere(double radius, const V3D &centre,
const std::string &id) {
const std::string &id) {
ShapeFactory shapeMaker;
return shapeMaker.createShape(sphereXML(radius, centre, id));
}
......@@ -93,7 +93,7 @@ IObject_sptr createSphere(double radius, const V3D &centre,
//----------------------------------------------------------------------------------------------
/** Create a cuboid shape for your pixels */
IObject_sptr createCuboid(double x_side_length, double y_side_length,
double z_side_length) {
double z_side_length) {
double szX = x_side_length;
double szY = (y_side_length == -1.0 ? szX : y_side_length);
double szZ = (z_side_length == -1.0 ? szX : z_side_length);
......@@ -149,7 +149,7 @@ ObjComponent *createSingleObjectComponent() {
* r2
*/
IObject_sptr createHollowShell(double innerRadius, double outerRadius,
const V3D &centre) {
const V3D &centre) {
std::string wholeXML = sphereXML(innerRadius, centre, "inner") + "\n" +
sphereXML(outerRadius, centre, "outer") + "\n" +
"<algebra val=\"(outer (# inner))\" />";
......@@ -307,8 +307,7 @@ Instrument_sptr createTestInstrumentCylindrical(
testInst->markAsSource(source);
// Define a sample as a simple sphere
auto sampleSphere =
createSphere(0.001, V3D(0.0, 0.0, 0.0), "sample-shape");
auto sampleSphere = createSphere(0.001, V3D(0.0, 0.0, 0.0), "sample-shape");
ObjComponent *sample =
new ObjComponent("sample", sampleSphere, testInst.get());
testInst->setPos(samplePos);
......@@ -479,8 +478,7 @@ Instrument_sptr createTestInstrumentRectangular(int num_banks, int pixels,
testInst->markAsSource(source);
// Define a sample as a simple sphere
auto sampleSphere =
createSphere(0.001, V3D(0.0, 0.0, 0.0), "sample-shape");
auto sampleSphere = createSphere(0.001, V3D(0.0, 0.0, 0.0), "sample-shape");
ObjComponent *sample =
new ObjComponent("sample", sampleSphere, testInst.get());
testInst->setPos(0.0, 0.0, 0.0);
......@@ -549,8 +547,7 @@ Instrument_sptr createTestInstrumentRectangular2(int num_banks, int pixels,
testInst->markAsSource(source);
// Define a sample as a simple sphere
auto sampleSphere =
createSphere(0.001, V3D(0.0, 0.0, 0.0), "sample-shape");
auto sampleSphere = createSphere(0.001, V3D(0.0, 0.0, 0.0), "sample-shape");
ObjComponent *sample =
new ObjComponent("sample", sampleSphere, testInst.get());
testInst->setPos(0.0, 0.0, 0.0);
......
......@@ -200,8 +200,7 @@ void CreateSampleShapeDialog::update3DView() {
// (infcyl_1:(infcyl_2:infcyl_3))))\" />\n";
Mantid::Geometry::ShapeFactory sFactory;
auto shape_sptr =
sFactory.createShape(shapexml);
auto shape_sptr = sFactory.createShape(shapexml);
// std::cerr << "\n--------- XML String -----------\n" << shapexml <<
// "\n---------------------\n";
if (shape_sptr == boost::shared_ptr<Mantid::Geometry::CSGObject>())
......
......@@ -50,7 +50,7 @@ void MantidGLWidget::setDisplayObject(
m_z_rot = 0.0;
auto boundingBox = m_display_object->getBoundingBox();
double bbox[6] = {boundingBox.xMax(), boundingBox.yMax(), boundingBox.zMax(),
double bbox[6] = {boundingBox.xMax(), boundingBox.yMax(), boundingBox.zMax(),
boundingBox.xMin(), boundingBox.yMin(), boundingBox.zMin()};
// Calculate the widths and save for resize events
......
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