#pragma once

#include "demo/scene.hpp"
#include "physics/collide.hpp"

namespace demo {

  struct collision : scene {
    physics::contact contacts[128];
    physics::collision_data collision_data;

    physics::rigid_body plane_body;
    physics::collision_plane plane;
    physics::rigid_body sphere_body;
    physics::collision_sphere sphere;

    collision()
      : collision_data(contacts, 128, 0.2, 0.9)
    {}

    mat4x4 init() override;

    void update() override;

    void draw_hud(ta_parameter_writer& writer);
    void draw(ta_parameter_writer& writer, const mat4x4& trans) override;
  };
}
