xc
Rect2d3dCooSys.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 //Rect2d3dCooSys.h
22 //Two-dimensional rectangular coordinate system in a three-dimensional space.
23 
24 #ifndef RECT2D_COO_SYS_H
25 #define RECT2D_COO_SYS_H
26 
27 #include "Xd3dCooSys.h"
28 
29 class Vector2d;
30 class Pos2d;
31 
33 //
37  {
38  public:
39  typedef Vector2d VLocal; //Vector dimension in local coordinates.
40  typedef Pos2d PLocal; //Point dimension in local coordinates.
41 
42  Rect2d3dCooSys(void)
43  : Xd3dCooSys(2) {}
44  Rect2d3dCooSys(const VGlobal &v);
45  Rect2d3dCooSys(const VGlobal &v1,const VGlobal &v2);
46  Rect2d3dCooSys(const PGlobal &p1,const PGlobal &p2, const PGlobal &p3);
47 
48  virtual CooSys *Copia(void) const
49  { return new Rect2d3dCooSys(*this); }
50  virtual Xd3dCooSys *CopiaXd3d(void) const
51  { return new Rect2d3dCooSys(*this); }
52 
53  //Access to members.
54  VGlobal getIVector(void) const;
55  VGlobal getJVector(void) const;
56  VGlobal getKVector(void) const;
57 
58  VGlobal getGlobalCoordinates(const VLocal &v) const;
59  VLocal getLocalCoordinates(const VGlobal &v) const;
60 
61  virtual ~Rect2d3dCooSys(void)
62  {}
63  };
64 
65 #endif
Posición en dos dimensiones.
Definition: Pos2d.h:41
Two-dimensional rectangular coordinate system definde in a three-dimensional space.
Definition: Rect2d3dCooSys.h:36
Base class for coordinate systems defined in a three-dimensional space.
Definition: Xd3dCooSys.h:37
VGlobal getKVector(void) const
Return the unary vector K in global coordinates.
Definition: Rect2d3dCooSys.cc:57
VGlobal getJVector(void) const
Return the unary vector J in global coordinates.
Definition: Rect2d3dCooSys.cc:53
VGlobal getIVector(void) const
Return the unary vector I in global coordinates.
Definition: Rect2d3dCooSys.cc:49
Vector en dos dimensiones.
Definition: Vector2d.h:40
VLocal getLocalCoordinates(const VGlobal &v) const
Return the local coordinates of the vector.
Definition: Rect2d3dCooSys.cc:69
VGlobal getGlobalCoordinates(const VLocal &v) const
Return the global coordinates of the vector.
Definition: Rect2d3dCooSys.cc:63
Posición en tres dimensiones.
Definition: Pos3d.h:44
Coordinate systems base class.
Definition: CooSys.h:38
Vector en tres dimensiones.
Definition: Vector3d.h:39