xc
Square2d.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //Square2d.h
22 
23 #ifndef SQUARE2D_H
24 #define SQUARE2D_H
25 
26 #include "Quadrilateral2d.h"
27 
28 
30 //
32 class Square2d : public Quadrilateral2d
33  {
34  public:
35  Square2d(const GEOM_FT &l= 1.0)
36  : Quadrilateral2d(Pos2d(0,0),Pos2d(l,0),Pos2d(l,l),Pos2d(0,l)) {}
37  Square2d(const Pos2d &o,const GEOM_FT &l= 1.0);
38  //Square2d(const Ref2d &ref,const GEOM_FT &l= 1.0): PolygonalSurface(ref), lado(l) {}
39  ~Square2d(void) {}
40 
41  virtual GeomObj *getCopy(void) const
42  { return new Square2d(*this); }
43  };
44 
45 #endif
46 
47 
48 
49 
50 
51 
Quadrilateral2d(void)
Default constructor.
Definition: Quadrilateral2d.cc:38
Posición en dos dimensiones.
Definition: Pos2d.h:41
Square in a two-dimensional space.
Definition: Square2d.h:32
virtual GeomObj * getCopy(void) const
Constructor virtual.
Definition: Square2d.h:41
Quadrilateral on a bi-dimensional space.
Definition: Quadrilateral2d.h:44
Clase base para las entidades geométricas.
Definition: GeomObj.h:40