/* * 2D Physic Engine * shape.h: * Based on pikuma.com Learn Game Physics Engine Programming course. * Copyright (c) 2022 986-Studio. All rights reserved. * * Created by Manoƫl Trapier on 18/07/2022. */ #ifndef PHYSICENGINE_SHAPE_H #define PHYSICENGINE_SHAPE_H #include class body; enum shapeType { SHAPE_CIRCLE, SHAPE_BOX, SHAPE_POLYGON, }; struct shape { virtual ~shape() = default; virtual shapeType getType() const = 0; virtual double getMomentOfInertial() const = 0; virtual shape *clone() const = 0; virtual void draw(const body &bod) = 0; }; #endif /* PHYSICENGINE_SHAPE_H */