Esempio n. 1
0
		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));
		}
Esempio n. 2
0
        void AddShape(T obj)
        {
            std::shared_ptr<Shape> shapePtr(new T(obj));

            _Shapes.push_back(shapePtr);
        }