#ifndef Car_hpp
#define Car_hpp

#include <logic/Object.hpp>

struct Car : MeshObject {
  struct Wheel : CylinderMesh {
    Wheel();
  };
  struct Wheels : private Wheel {
    const double r;
    const Wheels& render(
      const double z,
      const double rad
    ) const;
    Wheels(
      const double r,
      const double dx,
      const double w = 1
    );
  };
private:
  const MeshObject& renderMesh() const override;
protected:
  const double getRy() const override;
  virtual const double getWheelR() const = 0;
  virtual const double getWheelsY() const = 0;
  virtual const Car& renderWheels() const = 0;
  virtual const Car& renderBody() const;
};

#endif
