Chemical Data Processing Library C++ API - Version 1.3.0
TriangleMesh3DFunctions.hpp
Go to the documentation of this file.
1 /*
2  * TriangleMesh3DFunctions.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_VIS_TRIANGLEMESH3DFUNCTIONS_HPP
30 #define CDPL_VIS_TRIANGLEMESH3DFUNCTIONS_HPP
31 
32 #include <cstddef>
33 
34 #include "CDPL/Vis/APIPrefix.hpp"
35 #include "CDPL/Math/Matrix.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Vis
42  {
43 
44  class TriangleMesh3D;
45 
50 
54  CDPL_VIS_API std::size_t removeVertexDuplicates(TriangleMesh3D& mesh, bool check_vn = true, double tol = 0.0);
55 
59  CDPL_VIS_API void calcVertexFromFaceNormals(TriangleMesh3D& mesh, bool weight_face_size = false);
60 
64  CDPL_VIS_API void translate(TriangleMesh3D& mesh, double trans_x, double trans_y, double trans_z,
65  std::size_t vtx_offs = 0, std::size_t vtx_count = 0);
66 
70  CDPL_VIS_API void scale(TriangleMesh3D& mesh, double scale_x, double scale_y, double scale_z,
71  std::size_t vtx_offs = 0, std::size_t vtx_count = 0);
72 
76  CDPL_VIS_API void rotateX(TriangleMesh3D& mesh, double angle,
77  std::size_t vtx_offs = 0, std::size_t vtx_count = 0);
78 
82  CDPL_VIS_API void rotateY(TriangleMesh3D& mesh, double angle,
83  std::size_t vtx_offs = 0, std::size_t vtx_count = 0);
84 
88  CDPL_VIS_API void rotateZ(TriangleMesh3D& mesh, double angle,
89  std::size_t vtx_offs = 0, std::size_t vtx_count = 0);
90 
95  std::size_t vtx_offs = 0, std::size_t vtx_count = 0);
96 
97  } // namespace Vis
98 } // namespace CDPL
99 
100 #endif // CDPL_VIS_TRIANGLEMESH3DFUNCTIONS_HPP
Definition of matrix data types.
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Data structure for describing the geometric shape of 3D objects by means of a triangle mesh.
Definition: TriangleMesh3D.hpp:50
CDPL_VIS_API void rotateX(TriangleMesh3D &mesh, double angle, std::size_t vtx_offs=0, std::size_t vtx_count=0)
CDPL_VIS_API void calcVertexFromFaceNormals(TriangleMesh3D &mesh, bool weight_face_size=false)
CDPL_VIS_API void rotateY(TriangleMesh3D &mesh, double angle, std::size_t vtx_offs=0, std::size_t vtx_count=0)
CDPL_VIS_API void scale(TriangleMesh3D &mesh, double scale_x, double scale_y, double scale_z, std::size_t vtx_offs=0, std::size_t vtx_count=0)
CDPL_VIS_API void rotateZ(TriangleMesh3D &mesh, double angle, std::size_t vtx_offs=0, std::size_t vtx_count=0)
CDPL_VIS_API void translate(TriangleMesh3D &mesh, double trans_x, double trans_y, double trans_z, std::size_t vtx_offs=0, std::size_t vtx_count=0)
CDPL_VIS_API void subdivideSpherical(TriangleMesh3D &mesh)
CDPL_VIS_API std::size_t removeVertexDuplicates(TriangleMesh3D &mesh, bool check_vn=true, double tol=0.0)
CDPL_VIS_API void transform(TriangleMesh3D &mesh, const Math::Matrix4D &mtx, std::size_t vtx_offs=0, std::size_t vtx_count=0)
The namespace of the Chemical Data Processing Library.