xc
Revolution3d.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 //Revolution3d.h
22 //Revolution in a three-dimensional space.
23 
24 #ifndef REVOLUTION3D_H
25 #define REVOLUTION3D_H
26 
27 #include "utility/geom/d1/Line3d.h"
28 #include "Trf3d.h"
29 
30 class Pos3dArray;
31 class Pos3dArray3d;
32 
33 
35 //
37 class Revolution3d: public Trf3d
38  {
39  Line3d axis; //Revolution axis.
40  GEOM_FT theta;
41  size_t ndiv; //number of divisions.
42  public:
43  Revolution3d(const Line3d &e,const GEOM_FT &th= 0.0,const size_t &nd= 1);
44  Pos3dArray Aplica0d(const Pos3d &p) const;
45  Pos3dArray Aplica1d(const Pos3dArray &m) const;
46  Pos3dArray3d Aplica2d(const Pos3dArray &m) const;
47  Pos3dArray operator()(const Pos3d &) const;
48  Pos3dArray operator()(const Pos3dArray &) const;
49  };
50 
51 #endif
Array of positions in a three-dimensional space.
Definition: Pos3dArray.h:38
Pos3dArray Aplica0d(const Pos3d &p) const
Return the point row that results from apply the revolution to the argument.
Definition: Revolution3d.cc:35
Pos3dArray Aplica1d(const Pos3dArray &m) const
Return the point matrix that results from apply the revolution to the argument.
Definition: Revolution3d.cc:52
Revolution transformation.
Definition: Revolution3d.h:37
Revolution3d(const Line3d &e, const GEOM_FT &th=0.0, const size_t &nd=1)
Constructor.
Definition: Revolution3d.cc:29
Position array in a three-dimensional space.
Definition: Pos3dArray3d.h:37
Posición en tres dimensiones.
Definition: Pos3d.h:44
Line in a three-dimensional space.
Definition: Line3d.h:62
Pos3dArray3d Aplica2d(const Pos3dArray &m) const
Return the point matrix that results from apply the revolution to the bi-dimensional matrix passed as...
Definition: Revolution3d.cc:100
Three-dimensional transformation.
Definition: Trf3d.h:39