The Gnome Chemistry Utils  0.14.0
transform3d.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  * Gnome Chemistry Utils
5  * transform3d.h - Handle 3D transformations in space groups.
6  *
7  * Copyright (C) 2007-2010 by Jean Bréfort
8  *
9  * This file was originally part of the Open Babel project.
10  * For more information, see <http://openbabel.sourceforge.net/>
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License as
14  * published by the Free Software Foundation; either version 3 of the
15  * License, or (at your option) any later version.
16 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  */
22 
23 #ifndef GCU_TRANSFORM_3D_H
24 #define GCU_TRANSFORM_3D_H
25 
26 #include "matrix.h"
27 #include "vector.h"
28 #include <list>
29 #include <string>
30 
31 namespace gcu
32 {
33 
42 class Transform3d: private Matrix, private Vector
43 {
44 public:
48  Transform3d ();
56  Transform3d (Matrix const &m, Vector const &v);
62  Transform3d (double s);
72  Transform3d (Vector row1, Vector row2, Vector row3, Vector translation);
80  Transform3d (double d[3][3], double t[3]);
81 
85  virtual ~Transform3d ();
86 
94  Vector operator* (Vector const &v) const;
95 
102  Transform3d operator* (Transform3d const &t) const;
103 
107  std::string DescribeAsString() const;
112  std::string DescribeAsValues() const;
113 
117  void Normalize();
118 };
119 
120 }
121 
122 #endif // GCU_TRANSFORM_3D_H
123