Commit 400df480 authored by Karl Palmen's avatar Karl Palmen
Browse files

Rename Geometry::Object class to Geometry::CSGObject re #12827



The files are yet to be renamed

Signed-off-by: default avatarKarl Palmen <karl.palmen@stfc.ac.uk>
parent a2d24486
......@@ -107,7 +107,7 @@ private:
using ComponentCreationHelper::createCappedCylinder;
using ComponentCreationHelper::createTestInstrumentCylindrical;
using Mantid::Geometry::ObjComponent;
using Mantid::Geometry::Object;
using Mantid::Geometry::CSGObject;
using Mantid::Kernel::Material;
using Mantid::Kernel::V3D;
using Mantid::PhysicalConstants::getNeutronAtom;
......@@ -156,7 +156,7 @@ private:
MatrixWorkspace_sptr createTestWorkspaceWithNoSampleShape() {
using ComponentCreationHelper::createTestInstrumentCylindrical;
using Mantid::Geometry::ObjComponent;
using Mantid::Geometry::Object;
using Mantid::Geometry::CSGObject;
using Mantid::Kernel::V3D;
using WorkspaceCreationHelper::create2DWorkspaceBinned;
......
......@@ -359,7 +359,7 @@ void AnvredCorrection::retrieveBaseProperties() {
NeutronAtom neutron(static_cast<uint16_t>(EMPTY_DBL()),
static_cast<uint16_t>(0), 0.0, 0.0, m_smu, 0.0, m_smu,
m_amu);
Object shape = m_inputWS->sample().getShape(); // copy
CSGObject shape = m_inputWS->sample().getShape(); // copy
shape.setMaterial(Material("SetInAnvredCorrection", neutron, 1.0));
m_inputWS->mutableSample().setShape(shape);
}
......
......@@ -168,7 +168,7 @@ void LoadHKL::exec() {
mrun.addProperty<double>("Radius", radius, true);
NeutronAtom neutron(static_cast<uint16_t>(EMPTY_DBL()),
static_cast<uint16_t>(0), 0.0, 0.0, smu, 0.0, smu, amu);
Object shape = ws->sample().getShape(); // copy
CSGObject shape = ws->sample().getShape(); // copy
shape.setMaterial(Material("SetInLoadHKL", neutron, 1.0));
ws->mutableSample().setShape(shape);
......
......@@ -258,7 +258,7 @@ void SaveHKL::exec() {
NeutronAtom neutron(static_cast<uint16_t>(EMPTY_DBL()),
static_cast<uint16_t>(0), 0.0, 0.0, m_smu, 0.0, m_smu,
m_amu);
Object shape = peaksW->sample().getShape(); // copy
CSGObject shape = peaksW->sample().getShape(); // copy
shape.setMaterial(Material("SetInSaveHKL", neutron, 1.0));
peaksW->mutableSample().setShape(shape);
}
......
......@@ -42,7 +42,7 @@ public:
double amu = 0.011;
NeutronAtom neutron(static_cast<uint16_t>(EMPTY_DBL()),
static_cast<uint16_t>(0), 0.0, 0.0, smu, 0.0, smu, amu);
Object sampleShape;
CSGObject sampleShape;
sampleShape.setMaterial(Material("SetInAnvredCorrection", neutron, 1.0));
ws->mutableSample().setShape(sampleShape);
......
......@@ -40,7 +40,7 @@ public:
double amu = 0.011;
NeutronAtom neutron(static_cast<uint16_t>(EMPTY_DBL()),
static_cast<uint16_t>(0), 0.0, 0.0, smu, 0.0, smu, amu);
Object sampleShape;
CSGObject sampleShape;
sampleShape.setMaterial(Material("SetInSaveHKLTest", neutron, 1.0));
ws->mutableSample().setShape(sampleShape);
......
......@@ -49,7 +49,7 @@ public:
double amu = 0.011;
NeutronAtom neutron(static_cast<uint16_t>(EMPTY_DBL()),
static_cast<uint16_t>(0), 0.0, 0.0, smu, 0.0, smu, amu);
Object sampleShape;
CSGObject sampleShape;
sampleShape.setMaterial(Material("SetInSaveHKLTest", neutron, 1.0));
ws->mutableSample().setShape(sampleShape);
......
......@@ -14,7 +14,7 @@ class ISpectrum;
}
namespace Geometry {
class Object;
class CSGObject;
}
namespace CurveFitting {
......@@ -138,7 +138,7 @@ private:
Kernel::V3D m_beamDir; // Directional vector for beam
double m_srcR2; // beam penumbra radius (m)
double m_halfSampleHeight, m_halfSampleWidth, m_halfSampleThick; // (m)
Geometry::Object const *m_sampleShape; // sample shape
Geometry::CSGObject const *m_sampleShape; // sample shape
SampleComptonProperties *m_sampleProps; // description of sample properties
double m_detHeight, m_detWidth, m_detThick; // (m)
double m_tmin, m_tmax, m_delt; // min, max & dt TOF value
......
......@@ -30,7 +30,7 @@ class MatrixWorkspace;
namespace Geometry {
class CompAssembly;
class Component;
class Object;
class CSGObject;
class ObjComponent;
class Instrument;
}
......
......@@ -24,7 +24,7 @@ class V3D;
namespace Geometry {
class CompAssembly;
class Component;
class Object;
class CSGObject;
class ObjComponent;
class Instrument;
}
......
......@@ -33,7 +33,7 @@ void DefineGaugeVolume::exec() {
// Get the XML definition
const std::string shapeXML = getProperty("ShapeXML");
// Try creating the shape to make sure the input's valid
boost::shared_ptr<Geometry::Object> shape_sptr =
boost::shared_ptr<Geometry::CSGObject> shape_sptr =
Geometry::ShapeFactory().createShape(shapeXML);
if (!shape_sptr->hasValidShape()) {
g_log.error("Invalid shape definition provided. Gauge Volume NOT added to "
......
......@@ -403,7 +403,7 @@ Geometry::Object_sptr LoadNXSPE::createCuboid(double dx, double dy, double dz) {
// A sphere
std::string ObjSphere = "-41";
Geometry::Object_sptr retVal = boost::make_shared<Geometry::Object>();
Geometry::Object_sptr retVal = boost::make_shared<Geometry::CSGObject>();
retVal->setObject(41, ObjSphere);
retVal->populate(SphSurMap);
......
......@@ -100,7 +100,7 @@ public:
Mantid::API::AnalysisDataService::Instance().retrieve(
"TestWorkspace"));
const Mantid::Geometry::Object &sample = ws->sample().getShape();
const Mantid::Geometry::CSGObject &sample = ws->sample().getShape();
Mantid::Kernel::V3D point(x, y, z);
if (inside) {
......
......@@ -554,7 +554,7 @@ private:
return props;
}
double getSphereRadius(const Mantid::Geometry::Object &shape) {
double getSphereRadius(const Mantid::Geometry::CSGObject &shape) {
using Mantid::Geometry::SurfPoint;
using Mantid::Geometry::Sphere;
auto topRule = shape.topRule();
......
......@@ -219,7 +219,7 @@ public:
}
void testSampleValidator() {
using Mantid::Geometry::Object;
using Mantid::Geometry::CSGObject;
using Mantid::Kernel::Material;
using Mantid::PhysicalConstants::NeutronAtom;
// These should be separate tests when they are refactored out
......@@ -243,7 +243,7 @@ public:
TS_ASSERT_EQUALS(
sampleVal->isValid(ws),
"The sample is missing the following properties: material");
auto noShape = boost::make_shared<Object>();
auto noShape = boost::make_shared<CSGObject>();
noShape->setMaterial(Material("V", NeutronAtom(), 0.072));
ws->mutableSample().setShape(*noShape);
TS_ASSERT_EQUALS(sampleVal->isValid(ws), "");
......
......@@ -12,7 +12,7 @@ class Material;
namespace Geometry {
class Track;
class Object;
class CSGObject;
class GeometryHandler;
/** Object Component class, this class brings together the physical attributes
......@@ -95,7 +95,7 @@ public:
virtual void initDraw() const = 0;
/// Returns the shape of the Object
virtual const boost::shared_ptr<const Object> shape() const = 0;
virtual const boost::shared_ptr<const CSGObject> shape() const = 0;
/// Returns the material of the Object
virtual const Kernel::Material material() const = 0;
......
......@@ -62,7 +62,7 @@ createVirtualInstrument(Kernel::V3D sourcePos, Kernel::V3D samplePos,
const std::vector<Kernel::V3D> &vecdetpos,
const std::vector<detid_t> &vecdetid);
MANTID_GEOMETRY_DLL boost::shared_ptr<Object>
MANTID_GEOMETRY_DLL boost::shared_ptr<CSGObject>
createSphere(double radius, const Kernel::V3D &centre, const std::string &id);
MANTID_GEOMETRY_DLL std::string
......
......@@ -16,7 +16,7 @@ class V3D;
namespace Geometry {
class BoundingBox;
class IComponent;
class Object;
class CSGObject;
}
namespace Beamline {
......@@ -61,7 +61,7 @@ private:
m_compIDToIndex;
/// Shapes for each component
boost::shared_ptr<std::vector<boost::shared_ptr<const Geometry::Object>>>
boost::shared_ptr<std::vector<boost::shared_ptr<const Geometry::CSGObject>>>
m_shapes;
BoundingBox componentBoundingBox(const size_t index,
......@@ -74,7 +74,7 @@ public:
componentIds,
boost::shared_ptr<const std::unordered_map<Geometry::IComponent *,
size_t>> componentIdToIndexMap,
boost::shared_ptr<std::vector<boost::shared_ptr<const Geometry::Object>>>
boost::shared_ptr<std::vector<boost::shared_ptr<const Geometry::CSGObject>>>
shapes);
ComponentInfo(const ComponentInfo &other);
~ComponentInfo();
......@@ -108,7 +108,7 @@ public:
return m_componentIds->operator[](componentIndex);
}
bool hasShape(const size_t componentIndex) const;
const Geometry::Object &shape(const size_t componentIndex) const;
const Geometry::CSGObject &shape(const size_t componentIndex) const;
double solidAngle(const size_t componentIndex,
const Kernel::V3D &observer) const;
BoundingBox boundingBox(const size_t componentIndex,
......
......@@ -35,7 +35,7 @@ namespace Geometry {
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class MANTID_GEOMETRY_DLL Container final : public Object {
class MANTID_GEOMETRY_DLL Container final : public CSGObject {
public:
typedef std::unordered_map<std::string, double> ShapeArgs;
......
......@@ -50,7 +50,7 @@ public:
std::string type() const override { return "DetectorComponent"; }
Detector(const std::string &name, int id, IComponent *parent);
Detector(const std::string &name, int id, boost::shared_ptr<Object> shape,
Detector(const std::string &name, int id, boost::shared_ptr<CSGObject> shape,
IComponent *parent);
// functions inherited from IObjectComponent
Component *clone() const override { return new Detector(*this); }
......
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