Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

selection.hxx

Go to the documentation of this file.
00001 //  $Id: selection.hxx,v 1.4 2003/01/07 21:34:50 grumbel Exp $
00002 // 
00003 //  Construo - A wire-frame construction gamee
00004 //  Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
00005 //
00006 //  This program is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU General Public License
00008 //  as published by the Free Software Foundation; either version 2
00009 //  of the License, or (at your option) any later version.
00010 //
00011 //  This program is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //  GNU General Public License for more details.
00015 // 
00016 //  You should have received a copy of the GNU General Public License
00017 //  along with this program; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020 #ifndef HEADER_CONSTRUO_SELECTION_HXX
00021 #define HEADER_CONSTRUO_SELECTION_HXX
00022 
00023 #include <vector>
00024 #include "vector2d.hxx"
00025 
00026 class Particle;
00027 class World;
00028 
00030 class Selection
00031 {
00032 private:
00033   typedef std::vector<Particle*> SelectionLst;
00035   SelectionLst selection;
00036 
00040   World* world;
00041 
00042 public:
00043   Selection ();
00044 
00048   Vector2d get_center ();
00049 
00052   void select_particles (Vector2d p1, Vector2d p2);
00053 
00055   void scale (float factor);
00056 
00057   void flip();
00058 
00060   void set_velocity (const Vector2d vel);
00061 
00063   void duplicate ();
00064 
00066   void clear ();
00067   
00069   bool empty() const;
00070 
00072   void validate();
00073 
00074   void rotate(float rot_angle, Vector2d rotate_center);
00075 
00076   SelectionLst::size_type size() { return selection.size(); }
00077   SelectionLst::iterator begin() { return selection.begin(); };
00078   SelectionLst::iterator end()   { return selection.end(); };
00079 
00080   typedef SelectionLst::iterator iterator;
00081 private:
00082   Selection (const Selection&);
00083   Selection& operator= (const Selection&);
00084 };
00085 
00086 #endif
00087 
00088 /* EOF */

Generated on Thu Jul 24 10:24:31 2003 for Construo by doxygen1.3-rc3

Rabisu Mirror Service We provide mirrors to support Open source communities. Our mirror server is located in Istanbul/Turkey region.

Please do not hesitate to contact mirror@rabisu.com for new open source mirror submissions.