Open3D (C++ API)  0.18.0+252c867
VtkUtils.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include <vtkPolyData.h>
9 #include <vtkSmartPointer.h>
10 
15 
16 namespace open3d {
17 namespace t {
18 namespace geometry {
19 namespace vtkutils {
20 
23 int DtypeToVtkType(const core::Dtype& dtype);
24 
43 vtkSmartPointer<vtkPolyData> CreateVtkPolyDataFromGeometry(
44  const Geometry& geometry,
45  const std::unordered_set<std::string>& point_attr_include,
46  const std::unordered_set<std::string>& face_attr_include,
47  const std::unordered_set<std::string>& point_attr_exclude = {},
48  const std::unordered_set<std::string>& face_attr_exclude = {},
49  bool copy = false);
50 
59 TriangleMesh CreateTriangleMeshFromVtkPolyData(vtkPolyData* polydata,
60  bool copy = false);
61 
70 LineSet CreateLineSetFromVtkPolyData(vtkPolyData* polydata, bool copy = false);
71 
81 TriangleMesh ExtrudeRotationTriangleMesh(const Geometry& geometry,
82  double angle,
83  const core::Tensor& axis,
84  int resolution = 16,
85  double translation = 0.0,
86  bool capping = true);
87 
97 LineSet ExtrudeRotationLineSet(const PointCloud& pointcloud,
98  double angle,
99  const core::Tensor& axis,
100  int resolution = 16,
101  double translation = 0.0,
102  bool capping = true);
103 
110 TriangleMesh ExtrudeLinearTriangleMesh(const Geometry& geometry,
111  const core::Tensor& vector,
112  double scale,
113  bool capping);
114 
121 LineSet ExtrudeLinearLineSet(const PointCloud& pointcloud,
122  const core::Tensor& vector,
123  double scale,
124  bool capping);
125 
142 TriangleMesh ComputeNormals(const TriangleMesh& mesh,
143  bool vertex_normals,
144  bool face_normals,
145  bool consistency,
146  bool auto_orient_normals,
147  bool splitting,
148  double feature_angle_deg = 30);
149 
150 } // namespace vtkutils
151 } // namespace geometry
152 } // namespace t
153 } // namespace open3d
bool copy
Definition: VtkUtils.cpp:73
OPEN3D_LOCAL LineSet CreateLineSetFromVtkPolyData(vtkPolyData *polydata, bool copy)
Definition: VtkUtils.cpp:442
int DtypeToVtkType(const core::Dtype &dtype)
Definition: VtkUtils.cpp:29
TriangleMesh CreateTriangleMeshFromVtkPolyData(vtkPolyData *polydata, bool copy)
Definition: VtkUtils.cpp:400
OPEN3D_LOCAL TriangleMesh ExtrudeLinearTriangleMesh(const Geometry &geometry, const core::Tensor &vector, double scale, bool capping)
Definition: VtkUtils.cpp:547
OPEN3D_LOCAL LineSet ExtrudeRotationLineSet(const PointCloud &pointcloud, const double angle, const core::Tensor &axis, int resolution, double translation, bool capping)
Definition: VtkUtils.cpp:508
OPEN3D_LOCAL LineSet ExtrudeLinearLineSet(const PointCloud &pointcloud, const core::Tensor &vector, double scale, bool capping)
Definition: VtkUtils.cpp:555
OPEN3D_LOCAL TriangleMesh ExtrudeRotationTriangleMesh(const Geometry &geometry, const double angle, const core::Tensor &axis, int resolution, double translation, bool capping)
Definition: VtkUtils.cpp:497
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:338
OPEN3D_LOCAL TriangleMesh ComputeNormals(const TriangleMesh &mesh, bool vertex_normals, bool face_normals, bool consistency, bool auto_orient_normals, bool splitting, double feature_angle_deg)
Definition: VtkUtils.cpp:563
Definition: PinholeCameraIntrinsic.cpp:16