libsurf
Programmer's Documentation

nstcoordsys.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_NSTCOORDSYS_H
16 #define SURF_NSTCOORDSYS_H
17 
18 #include <genua/smatrix.h>
19 #include <genua/dmatrix.h>
20 
27 {
28  public:
29 
31  NstCoordSys() { xyz(0,0)=xyz(1,1)=xyz(2,2)=1.0; }
32 
34  void origin(const Vct3 & p) {org = p;}
35 
37  void axes(const Vct3 & ax, const Vct3 & ay, const Vct3 & az);
38 
40  void fromCord2r(const Vct3 & a, const Vct3 & b, const Vct3 & c);
41 
43  Vct3 toGlobal(const Vct3 & p) const {
44  return org + xyz * p;
45  }
46 
48  void toGlobal(uint i, Matrix & z) const;
49 
50  private:
51 
53  Vct3 org;
54 
56  Mtx33 xyz;
57 };
58 
59 #endif
Vct3 org
origin
Definition: nstcoordsys.h:53
NstCoordSys()
create default coordinate system
Definition: nstcoordsys.h:31
void fromCord2r(const Vct3 &a, const Vct3 &b, const Vct3 &c)
construct from CORD2R representation
Definition: nstcoordsys.cpp:30
Cartesian coordinate system (Nastran)
Definition: nstcoordsys.h:26
Mtx33 xyz
axis directions in columns
Definition: nstcoordsys.h:56
void origin(const Vct3 &p)
change origin
Definition: nstcoordsys.h:34
void axes(const Vct3 &ax, const Vct3 &ay, const Vct3 &az)
change axis directions
Definition: nstcoordsys.cpp:21
Vct3 toGlobal(const Vct3 &p) const
transform a point from local into global coordinates
Definition: nstcoordsys.h:43
Generated on Mon Jan 24 2022 03:03:16 for libsurf by   doxygen 1.8.5