skizzle/include/ball.hpp

34 lines
648 B
C++
Raw Normal View History

2016-03-08 22:28:50 +00:00
#ifndef __PTF_BALL_HPP__
#define __PTF_BALL_HPP__
2016-03-04 15:29:31 +00:00
#include <SFML/Graphics.hpp>
#include <iostream>
#include "engine_state.hpp"
#include "physics_object.hpp"
2016-03-04 15:29:31 +00:00
class Ball : public PhysicsObject {
2016-03-04 15:29:31 +00:00
protected:
2016-03-12 13:15:27 +00:00
sf::Texture texture;
sf::CircleShape shape;
/**
* Calcule les forces appliquées à l'objet
*/
virtual sf::Vector2f getForces(EngineState& state);
2016-03-04 15:29:31 +00:00
public:
Ball(float x, float y);
/**
* Dessine la balle dans la fenêtre donnée
*/
void draw(sf::RenderWindow& window);
2016-03-04 15:29:31 +00:00
/**
* Récupère la boîte englobante de l'objet
*/
std::unique_ptr<sf::FloatRect> getAABB();
2016-03-04 15:29:31 +00:00
};
#endif