7 #include "imstkNeedle.h" 14 m_punctures[id] = data;
17 std::shared_ptr<Puncture>
20 auto iter = m_punctures.find(
id);
21 if (iter == m_punctures.end())
23 m_punctures[id] = std::make_shared<Puncture>();
25 return m_punctures[id];
31 auto iter = m_punctures.find(
id);
32 if (iter == m_punctures.end())
34 m_punctures[id] = std::make_shared<Puncture>();
36 m_punctures[id]->state = state;
42 return getPuncture(
id)->state;
48 for (
auto puncture : m_punctures)
50 if (puncture.second->state == Puncture::State::INSERTED)
void setPuncture(const PunctureId &id, std::shared_ptr< Puncture > data)
Get/Set puncture data.
void setState(const PunctureId &id, const Puncture::State state)
Get/set puncture state. This can be done through data too but this supports the allocation of new pun...
std::tuple< int, int, int > PunctureId
Punctures are identified via three ints. The needle id, the puncturable id, and a local id that allow...
bool getInserted() const
Get if inserted at all.