Skip to content
Snippets Groups Projects
Commit 35906b5c authored by Johannes Junggeburth's avatar Johannes Junggeburth :dog2:
Browse files

GeoTranslate3D add constructor from Vector3D

parent 8d9b0295
No related branches found
No related tags found
1 merge request!395GeoTranslate3D add constructor from Vector3D
Pipeline #9855938 passed
......@@ -7,8 +7,7 @@
#include "GeoModelKernel/GeoFullPhysVol.h"
#include "GeoModelKernel/GeoPhysVol.h"
PVLink cloneVolume(const PVLink& volume,
bool allowShared) {
PVLink cloneVolume(const PVLink& volume, bool allowShared) {
PVLink newVolume{volume};
if (!allowShared || hasFullPhysVolInTree(volume)) {
if (typeid(*volume) == typeid(GeoPhysVol)) {
......@@ -27,8 +26,6 @@ PVLink cloneVolume(const PVLink& volume,
newVolume->add(const_cast<GeoGraphNode*>(node));
}
}
}
return newVolume;
}
......@@ -70,9 +70,12 @@ namespace GeoTrf {
class Translate3D : public Transform3D {
public:
Translate3D(const GeoTrf::Vector3D& v):
Translate3D{v.x(),v.y(),v.z()}{}
Translate3D(double x, double y, double z)
: Transform3D(Translation3D(x,y,z))
{}
: Transform3D(Translation3D(x,y,z)){}
virtual ~Translate3D() = default;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment