Commit d351d924 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla

ENH: Simplity API for geometry mapper construction

Add a constructor that takes master and slave geometry
parent 902218af
......@@ -135,6 +135,17 @@ protected:
///
GeometryMap(Type type) : m_type(type), m_isActive(true) {}
///
/// \brief Protected constructor
///
GeometryMap(std::shared_ptr<Geometry> master,
std::shared_ptr<Geometry> slave,
Type type) : m_type(type), m_isActive(true)
{
this->setMaster(master);
this->setSlave(slave);
}
Type m_type; ///> type of the map
bool m_isActive; ///> true if the map us active at runtime
......
......@@ -43,6 +43,14 @@ public:
m_rigidTransform(RigidTransform3d::Identity())
{}
///
/// \brief Constructor
///
IsometricMap(std::shared_ptr<Geometry> master, std::shared_ptr<Geometry> slave) :
GeometryMap(GeometryMap::Type::Isometric),
m_rigidTransform(RigidTransform3d::Identity())
{}
///
/// \brief Destructor
///
......
......@@ -44,6 +44,16 @@ public:
///
OneToOneMap() : GeometryMap(GeometryMap::Type::OneToOne){}
///
/// \brief Constructor
///
OneToOneMap(std::shared_ptr<Geometry> master,
std::shared_ptr<Geometry> slave) : GeometryMap(GeometryMap::Type::OneToOne)
{
this->setMaster(master);
this->setSlave(slave);
}
///
/// \brief Default destructor
///
......
......@@ -44,6 +44,16 @@ public:
///
TetraTriangleMap() : GeometryMap(GeometryMap::Type::TetraTriangle){}
///
/// \brief Constructor
///
TetraTriangleMap(std::shared_ptr<Geometry> master,
std::shared_ptr<Geometry> slave) : GeometryMap(GeometryMap::Type::TetraTriangle)
{
this->setMaster(master);
this->setSlave(slave);
}
///
/// \brief Destructor
///
......
Markdown is supported
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