Loading [MathJax]/extensions/TeX/AMSsymbols.js
Open3D (C++ API)  0.16.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
VtkUtils.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018-2021 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #include <vtkPolyData.h>
28 #include <vtkSmartPointer.h>
29 
34 
35 namespace open3d {
36 namespace t {
37 namespace geometry {
38 namespace vtkutils {
39 
42 int DtypeToVtkType(const core::Dtype& dtype);
43 
63 vtkSmartPointer<vtkPolyData> CreateVtkPolyDataFromGeometry(
64  const Geometry& geometry,
65  const std::unordered_set<std::string>& point_attr_include,
66  const std::unordered_set<std::string>& face_attr_include,
67  const std::unordered_set<std::string>& point_attr_exclude = {},
68  const std::unordered_set<std::string>& face_attr_exclude = {},
69  bool copy = false);
70 
79 TriangleMesh CreateTriangleMeshFromVtkPolyData(vtkPolyData* polydata,
80  bool copy = false);
81 
90 LineSet CreateLineSetFromVtkPolyData(vtkPolyData* polydata, bool copy = false);
91 
101 TriangleMesh ExtrudeRotationTriangleMesh(const Geometry& geometry,
102  double angle,
103  const core::Tensor& axis,
104  int resolution = 16,
105  double translation = 0.0,
106  bool capping = true);
107 
117 LineSet ExtrudeRotationLineSet(const PointCloud& pointcloud,
118  double angle,
119  const core::Tensor& axis,
120  int resolution = 16,
121  double translation = 0.0,
122  bool capping = true);
123 
130 TriangleMesh ExtrudeLinearTriangleMesh(const Geometry& geometry,
131  const core::Tensor& vector,
132  double scale,
133  bool capping);
134 
141 LineSet ExtrudeLinearLineSet(const PointCloud& pointcloud,
142  const core::Tensor& vector,
143  double scale,
144  bool capping);
145 
146 } // namespace vtkutils
147 } // namespace geometry
148 } // namespace t
149 } // namespace open3d
OPEN3D_LOCAL LineSet ExtrudeLinearLineSet(const PointCloud &pointcloud, const core::Tensor &vector, double scale, bool capping)
Definition: VtkUtils.cpp:551
vtkSmartPointer< vtkPolyData > CreateVtkPolyDataFromGeometry(const Geometry &geometry, const std::unordered_set< std::string > &point_attr_include, const std::unordered_set< std::string > &face_attr_include, const std::unordered_set< std::string > &point_attr_exclude, const std::unordered_set< std::string > &face_attr_exclude, bool copy)
Definition: VtkUtils.cpp:352
TriangleMesh CreateTriangleMeshFromVtkPolyData(vtkPolyData *polydata, bool copy)
Definition: VtkUtils.cpp:414
OPEN3D_LOCAL LineSet ExtrudeRotationLineSet(const PointCloud &pointcloud, const double angle, const core::Tensor &axis, int resolution, double translation, bool capping)
Definition: VtkUtils.cpp:504
OPEN3D_LOCAL TriangleMesh ExtrudeLinearTriangleMesh(const Geometry &geometry, const core::Tensor &vector, double scale, bool capping)
Definition: VtkUtils.cpp:543
OPEN3D_LOCAL TriangleMesh ExtrudeRotationTriangleMesh(const Geometry &geometry, const double angle, const core::Tensor &axis, int resolution, double translation, bool capping)
Definition: VtkUtils.cpp:493
Definition: PinholeCameraIntrinsic.cpp:35
OPEN3D_LOCAL LineSet CreateLineSetFromVtkPolyData(vtkPolyData *polydata, bool copy)
Definition: VtkUtils.cpp:438
bool copy
Definition: VtkUtils.cpp:89
int DtypeToVtkType(const core::Dtype &dtype)
Definition: VtkUtils.cpp:45