Rebuild autotool system
[construo.git] / rect_collider.hxx
blobe0135a98eb91e3dc93657ab23adc9ec7340f7d58
1 // $Id: rect_collider.hxx,v 1.8 2003/07/26 11:18:47 grumbel Exp $
2 //
3 // Construo - A wire-frame construction gamee
4 // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef HEADER_CONSTRUO_RECT_COLLIDER_HXX
21 #define HEADER_CONSTRUO_RECT_COLLIDER_HXX
23 #include "collider.hxx"
25 /** */
26 class RectCollider : public Collider
28 private:
29 // FIXME: Use the Rect class here
30 float x1; /**< left border */
31 float y1; /**< top border */
32 float x2; /**< right border */
33 float y2; /**< bottom border */
35 public:
36 RectCollider (lisp_object_t* cursor);
37 RectCollider (float x1_, float y1_, float x2_, float y2_);
39 Collider* duplicate() const;
41 Vector2d get_pos();
42 void set_pos(const Vector2d&);
44 bool is_at (const Vector2d& pos);
45 void bounce ();
46 void draw (GraphicContext* gc);
47 void draw_highlight (GraphicContext* gc);
49 BoundingBox get_bounding_box() const;
51 lisp_object_t* serialize();
54 #endif
56 /* EOF */