Loading...
Searching...
No Matches
transform3d.h
Go to the documentation of this file.
/**********************************************************************
transform3d.h - Handle 3D transformations in space groups.
Copyright (C) 2007 by Jean Bréfort
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_TRANSFORM_3D_H
#define OB_TRANSFORM_3D_H
#include <openbabel/math/matrix3x3.h>
#include <list>
#include <string>
namespace OpenBabel
{
class OBAPI transform3d: private matrix3x3, private vector3
{
public:
transform3d(void): matrix3x3(), vector3()
{
}
transform3d(const matrix3x3 &m, const vector3 &v): matrix3x3(m), vector3(v)
{
Normalize();
}
transform3d(double s): matrix3x3(s), vector3()
{
}
transform3d(vector3 row1,vector3 row2,vector3 row3,vector3 translation):
matrix3x3(row1, row2, row3), vector3(translation)
{
Normalize();
}
transform3d(double d[3][3], double t[3]): matrix3x3(d), vector3(t)
{
Normalize();
}
vector3 operator *(const vector3 &) const;
transform3d operator *(const transform3d &) const;
std::string DescribeAsString() const;
std::string DescribeAsValues() const;
void Normalize();
};
typedef std::list<transform3d*>::const_iterator transform3dIterator;
}
#endif // OB_TRANSFORM_3D_H
OpenBabel::matrix3x3::matrix3x3
matrix3x3(void)
Constructs the zero-matrix.
Definition matrix3x3.h:51
OpenBabel::transform3d
Handle 3D transformations, such as space group definitions.
Definition transform3d.h:36
OpenBabel::transform3d::transform3d
transform3d(void)
Definition transform3d.h:38
OpenBabel::transform3d::transform3d
transform3d(double s)
Definition transform3d.h:47
OpenBabel::transform3d::transform3d
transform3d(vector3 row1, vector3 row2, vector3 row3, vector3 translation)
Constructs a matrix from row vectors.
Definition transform3d.h:52
OpenBabel::transform3d::transform3d
transform3d(double d[3][3], double t[3])
Constructs a matrix from a 3x3-array of doubles.
Definition transform3d.h:60
OpenBabel::transform3d::transform3d
transform3d(const matrix3x3 &m, const vector3 &v)
Definition transform3d.h:42
OpenBabel::transform3d::Normalize
void Normalize()
Definition transform3d.cpp:127
OpenBabel::vector3
Represents a vector in 3-dimensional real space.
Definition vector3.h:45
OpenBabel::vector3::vector3
vector3(const double inX=0.0, const double inY=0.0, const double inZ=0.0)
Constructor.
Definition vector3.h:51
matrix3x3.h
Handle 3D Rotation matrix.
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
OpenBabel::transform3dIterator
std::list< transform3d * >::const_iterator transform3dIterator
Definition transform3d.h:75