12345678910111213141516171819202122232425262728 |
- /*
- * 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
- 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;
- };
- #endif /* PHYSICENGINE_SHAPE_H */
|