xc
Xd2dCooSys.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 //CooSys.h
22 //Coordinate system (abstract).
23 
24 #ifndef XD2D_COO_SYS_H
25 #define XD2D_COO_SYS_H
26 
27 #include "CooSys.h"
28 
29 class Vector2d;
30 class Pos2d;
31 class Dir2d;
32 
33 
35 //
38 class Xd2dCooSys: public CooSys
39  {
40  public:
41  typedef Vector2d VGlobal;
42  typedef Dir2d DGlobal;
43  typedef Pos2d PGlobal;
44  protected:
45  Xd2dCooSys(const size_t &);
46  Xd2dCooSys(const size_t &,const VGlobal &);
47  Xd2dCooSys(const size_t &,const PGlobal &,const PGlobal &);
48 
49  void putRow(const size_t &axis,const VGlobal &v);
50  void XAxisVector(const VGlobal &vX);
51 
52  public:
53  virtual VGlobal getAxisVDir(const size_t &axis) const;
54  //Return el direction vector del axis que se pasa como parámetro.
55  virtual DGlobal getAxisDir(const size_t &axis) const;
56  //Return the dirección of the axis que se pasa como parámetro.
57 
58  VGlobal getGlobalCoordinates(const FT_matrix &v) const;
59  FT_matrix getLocalCoordinates(const VGlobal &v) const;
60  };
61 
62 #endif
Dirección en dos dimensiones.
Definition: Dir2d.h:36
Pos2d PGlobal
Point the 2D space.
Definition: Xd2dCooSys.h:43
Posición en dos dimensiones.
Definition: Pos2d.h:41
Dir2d DGlobal
Direction in the 2D space.
Definition: Xd2dCooSys.h:42
Vector en dos dimensiones.
Definition: Vector2d.h:40
void XAxisVector(const VGlobal &vX)
Hace que el vector básico 1 tenga la dirección y sentido del being passed as parameter.
Definition: Xd2dCooSys.cc:75
virtual VGlobal getAxisVDir(const size_t &axis) const
Return the direction vector of the axis being passed as parameter.
Definition: Xd2dCooSys.cc:50
FT_matrix getLocalCoordinates(const VGlobal &v) const
Return the local coordinates of the vector.
Definition: Xd2dCooSys.cc:68
Coordinate system of dimension X defined in a two-dimensional space.
Definition: Xd2dCooSys.h:38
Vector2d VGlobal
Vector in the 2D space.
Definition: Xd2dCooSys.h:41
Matrix which components are GEOM_FT numbers.
Definition: FT_matrix.h:40
Xd2dCooSys(const size_t &)
Define a coordinate system of dimension ne in a two-dimensional space.
Definition: Xd2dCooSys.cc:32
VGlobal getGlobalCoordinates(const FT_matrix &v) const
Return the global coordinates of the vector.
Definition: Xd2dCooSys.cc:59
Coordinate systems base class.
Definition: CooSys.h:38