// // Created by jovian on 18/07/17. // #include "Visual.h" Visual::Visual(unsigned int imgId, const b2Vec2 &relPos, float angle, float scale) : m_imgId(imgId), m_relPos(relPos), m_angle(angle), m_scale(scale) {} unsigned int Visual::getImgId() const { return m_imgId; } const b2Vec2 &Visual::getPos() const { return m_relPos; } float Visual::getAngle() const { return m_angle; } float Visual::getScale() const { return m_scale; } void clearVisuals(std::vector &scope) { while (!scope.empty()) { if (scope.back() != nullptr) { delete scope.back(); scope.back() = nullptr; } scope.pop_back(); } }