123456789101112131415161718192021222324252627282930313233 |
- /*
- * 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 <physics/body.h>
- 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 */
|