std::shared_ptr<PShape> shapeAs(size_t index) const { if (isEmpty()) { throw std::out_of_range("P2Body::shapeAs() P2Body is empty."); } return std::dynamic_pointer_cast<PShape>(shapePtr(index)); }
void AddShape(T obj) { std::shared_ptr<Shape> shapePtr(new T(obj)); _Shapes.push_back(shapePtr); }