xc
Rect2d2dCooSys.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 //Rect2d2dCooSys.h
22 
23 #ifndef RECT_2D2D_COO_SYS_H
24 #define RECT_2D2D_COO_SYS_H
25 
26 #include "Xd2dCooSys.h"
27 
28 
30 //
34  {
35  public:
36  typedef Vector2d VLocal;
37  typedef Pos2d PLocal;
38 
39 
40  Rect2d2dCooSys(void);
41  Rect2d2dCooSys(const Pos2d &p1,const Pos2d &p2);
42  Rect2d2dCooSys(const VGlobal &vX);
43  virtual CooSys *Copia(void) const;
44 
45  //Acceso a miembros.
46  VGlobal getIVector(void) const;
47  VGlobal getJVector(void) const;
48  void PutI(const VGlobal &);
49  void PutJ(const VGlobal &);
50 
51  //Conversión vectores.
52  VGlobal getGlobalCoordinates(const VLocal &v) const;
53  VLocal getLocalCoordinates(const VGlobal &v) const;
54 
55  virtual ~Rect2d2dCooSys(void) {}
56  };
57 
58 #endif
VGlobal getJVector(void) const
Return the unary vector J in global coordinates.
Definition: Rect2d2dCooSys.cc:49
Rect2d2dCooSys(void)
Default constructor.
Definition: Rect2d2dCooSys.cc:33
Posición en dos dimensiones.
Definition: Pos2d.h:41
Vector2d VLocal
Dimension of the vector in local coordinates.
Definition: Rect2d2dCooSys.h:36
virtual CooSys * Copia(void) const
Constructor virtual.
Definition: Rect2d2dCooSys.cc:42
void PutJ(const VGlobal &)
Asigna el vector unitario I.
Definition: Rect2d2dCooSys.cc:61
Vector en dos dimensiones.
Definition: Vector2d.h:40
Pos2d PLocal
Dimension of the point in local coordinates.
Definition: Rect2d2dCooSys.h:37
VGlobal getIVector(void) const
Return the unary vector I in global coordinates.
Definition: Rect2d2dCooSys.cc:46
VGlobal getGlobalCoordinates(const VLocal &v) const
Return the global coordinates of the vector.
Definition: Rect2d2dCooSys.cc:72
Twp-dimensional rectangular coordinate system defined in a two-dimensional space. ...
Definition: Rect2d2dCooSys.h:33
Coordinate system of dimension X defined in a two-dimensional space.
Definition: Xd2dCooSys.h:38
void PutI(const VGlobal &)
Set the unary vector I.
Definition: Rect2d2dCooSys.cc:53
VLocal getLocalCoordinates(const VGlobal &v) const
Return the local coordinates of the vector.
Definition: Rect2d2dCooSys.cc:78
Coordinate systems base class.
Definition: CooSys.h:38