ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
TriangleMesh.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <ecvMesh.h>
11 
12 #include <list>
13 #include <type_traits>
14 #include <unordered_map>
15 
24 
25 namespace cloudViewer {
26 namespace t {
27 namespace geometry {
28 
29 class LineSet;
30 class PointCloud;
31 
98 class TriangleMesh : public Geometry, public DrawableGeometry {
99 public:
103  TriangleMesh(const core::Device &device = core::Device("CPU:0"));
104 
113  TriangleMesh(const core::Tensor &vertex_positions,
114  const core::Tensor &triangle_indices);
115 
116  virtual ~TriangleMesh() override {}
117 
118 public:
120  std::string ToString() const;
121 
127  TriangleMesh To(const core::Device &device, bool copy = false) const;
128 
130  TriangleMesh Clone() const { return To(GetDevice(), /*copy=*/true); }
131 
133  const TensorMap &GetVertexAttr() const { return vertex_attr_; }
134 
137 
142  core::Tensor &GetVertexAttr(const std::string &key) {
143  return vertex_attr_.at(key);
144  }
145 
148  core::Tensor &GetVertexPositions() { return GetVertexAttr("positions"); }
149 
152  core::Tensor &GetVertexColors() { return GetVertexAttr("colors"); }
153 
156  core::Tensor &GetVertexNormals() { return GetVertexAttr("normals"); }
157 
159  const TensorMap &GetTriangleAttr() const { return triangle_attr_; }
160 
163 
168  core::Tensor &GetTriangleAttr(const std::string &key) {
169  return triangle_attr_.at(key);
170  }
171 
175 
179 
183 
187  const core::Tensor &GetVertexAttr(const std::string &key) const {
188  return vertex_attr_.at(key);
189  }
190 
195  void RemoveVertexAttr(const std::string &key) { vertex_attr_.Erase(key); }
196 
200  return GetVertexAttr("positions");
201  }
202 
205  const core::Tensor &GetVertexColors() const {
206  return GetVertexAttr("colors");
207  }
208 
212  return GetVertexAttr("normals");
213  }
214 
219  const core::Tensor &GetTriangleAttr(const std::string &key) const {
220  return triangle_attr_.at(key);
221  }
222 
227  void RemoveTriangleAttr(const std::string &key) {
228  triangle_attr_.Erase(key);
229  }
230 
234  return GetTriangleAttr("indices");
235  }
236 
240  return GetTriangleAttr("normals");
241  }
242 
246  return GetTriangleAttr("colors");
247  }
248 
254  void SetVertexAttr(const std::string &key, const core::Tensor &value) {
256  vertex_attr_[key] = value;
257  }
258 
261  void SetVertexPositions(const core::Tensor &value) {
263  SetVertexAttr("positions", value);
264  }
265 
268  void SetVertexColors(const core::Tensor &value) {
270  SetVertexAttr("colors", value);
271  }
272 
275  void SetVertexNormals(const core::Tensor &value) {
277  SetVertexAttr("normals", value);
278  }
279 
285  void SetTriangleAttr(const std::string &key, const core::Tensor &value) {
287  triangle_attr_[key] = value;
288  }
289 
291  void SetTriangleIndices(const core::Tensor &value) {
293  SetTriangleAttr("indices", value);
294  }
295 
298  void SetTriangleNormals(const core::Tensor &value) {
300  SetTriangleAttr("normals", value);
301  }
302 
305  void SetTriangleColors(const core::Tensor &value) {
307  SetTriangleAttr("colors", value);
308  }
309 
314  bool HasVertexAttr(const std::string &key) const {
315  return vertex_attr_.Contains(key) &&
316  GetVertexAttr(key).GetLength() > 0 &&
317  GetVertexAttr(key).GetLength() ==
319  }
320 
323  bool HasVertexPositions() const { return HasVertexAttr("positions"); }
324 
330  bool HasVertexColors() const { return HasVertexAttr("colors"); }
331 
337  bool HasVertexNormals() const { return HasVertexAttr("normals"); }
338 
343  bool HasTriangleAttr(const std::string &key) const {
344  return triangle_attr_.Contains(key) &&
345  GetTriangleAttr(key).GetLength() > 0 &&
346  GetTriangleAttr(key).GetLength() ==
348  }
349 
353  bool HasTriangleIndices() const { return HasTriangleAttr("indices"); }
354 
360  bool HasTriangleNormals() const { return HasTriangleAttr("normals"); }
361 
367  bool HasTriangleColors() const { return HasTriangleAttr("colors"); }
368 
379  static TriangleMesh CreateBox(
380  double width = 1.0,
381  double height = 1.0,
382  double depth = 1.0,
383  core::Dtype float_dtype = core::Float32,
384  core::Dtype int_dtype = core::Int64,
385  const core::Device &device = core::Device("CPU:0"));
386 
400  static TriangleMesh CreateSphere(
401  double radius = 1.0,
402  int resolution = 20,
403  core::Dtype float_dtype = core::Float32,
404  core::Dtype int_dtype = core::Int64,
405  const core::Device &device = core::Device("CPU:0"));
406 
417  double radius = 1.0,
418  core::Dtype float_dtype = core::Float32,
419  core::Dtype int_dtype = core::Int64,
420  const core::Device &device = core::Device("CPU:0"));
421 
432  double radius = 1.0,
433  core::Dtype float_dtype = core::Float32,
434  core::Dtype int_dtype = core::Int64,
435  const core::Device &device = core::Device("CPU:0"));
436 
447  double radius = 1.0,
448  core::Dtype float_dtype = core::Float32,
449  core::Dtype int_dtype = core::Int64,
450  const core::Device &device = core::Device("CPU:0"));
451 
465  double radius = 1.0,
466  double height = 2.0,
467  int resolution = 20,
468  int split = 4,
469  core::Dtype float_dtype = core::Float32,
470  core::Dtype int_dtype = core::Int64,
471  const core::Device &device = core::Device("CPU:0"));
472 
485  static TriangleMesh CreateCone(
486  double radius = 1.0,
487  double height = 2.0,
488  int resolution = 20,
489  int split = 1,
490  core::Dtype float_dtype = core::Float32,
491  core::Dtype int_dtype = core::Int64,
492  const core::Device &device = core::Device("CPU:0"));
493 
507  static TriangleMesh CreateTorus(
508  double torus_radius = 1.0,
509  double tube_radius = 0.5,
510  int radial_resolution = 30,
511  int tubular_resolution = 20,
512  core::Dtype float_dtype = core::Float32,
513  core::Dtype int_dtype = core::Int64,
514  const core::Device &device = core::Device("CPU:0"));
515 
533  static TriangleMesh CreateArrow(
534  double cylinder_radius = 1.0,
535  double cone_radius = 1.5,
536  double cylinder_height = 5.0,
537  double cone_height = 4.0,
538  int resolution = 20,
539  int cylinder_split = 4,
540  int cone_split = 1,
541  core::Dtype float_dtype = core::Float32,
542  core::Dtype int_dtype = core::Int64,
543  const core::Device &device = core::Device("CPU:0"));
544 
554  double size = 1.0,
555  const Eigen::Vector3d &origin = Eigen::Vector3d(0.0, 0.0, 0.0),
556  core::Dtype float_dtype = core::Float32,
557  core::Dtype int_dtype = core::Int64,
558  const core::Device &device = core::Device("CPU:0"));
559 
575  static TriangleMesh CreateMobius(
576  int length_split = 70,
577  int width_split = 15,
578  int twists = 1,
579  double radius = 1,
580  double flatness = 1,
581  double width = 1,
582  double scale = 1,
583  core::Dtype float_dtype = core::Float32,
584  core::Dtype int_dtype = core::Int64,
585  const core::Device &device = core::Device("CPU:0"));
586 
596  static TriangleMesh CreateText(
597  const std::string &text,
598  double depth = 0.0,
599  core::Dtype float_dtype = core::Float32,
600  core::Dtype int_dtype = core::Int64,
601  const core::Device &device = core::Device("CPU:0"));
602 
613  const core::Tensor &volume,
614  const std::vector<double> contour_values = {0.0},
615  const core::Device &device = core::Device("CPU:0"));
616 
617 public:
619  TriangleMesh &Clear() override {
620  vertex_attr_.clear();
621  triangle_attr_.clear();
622  return *this;
623  }
624 
626  bool IsEmpty() const override { return !HasVertexPositions(); }
627 
628  core::Tensor GetMinBound() const { return GetVertexPositions().Min({0}); }
629 
630  core::Tensor GetMaxBound() const { return GetVertexPositions().Max({0}); }
631 
632  core::Tensor GetCenter() const { return GetVertexPositions().Mean({0}); }
633 
653  TriangleMesh &Transform(const core::Tensor &transformation);
654 
659  TriangleMesh &Translate(const core::Tensor &translation,
660  bool relative = true);
661 
667  TriangleMesh &Scale(double scale, const core::Tensor &center);
668 
675  TriangleMesh &Rotate(const core::Tensor &R, const core::Tensor &center);
676 
679 
682  TriangleMesh &ComputeTriangleNormals(bool normalized = true);
683 
686  TriangleMesh &ComputeVertexNormals(bool normalized = true);
687 
690  double GetSurfaceArea() const;
691 
696 
707  const core::Tensor &normal) const;
708 
718  const core::Tensor &normal,
719  const std::vector<double> contour_values = {0.0}) const;
720 
721  core::Device GetDevice() const override { return device_; }
722 
732  const ccMesh &mesh_legacy,
733  core::Dtype float_dtype = core::Float32,
734  core::Dtype int_dtype = core::Int64,
735  const core::Device &device = core::Device("CPU:0"));
736 
738  ccMesh ToLegacy() const;
739 
755  static std::unordered_map<std::string, geometry::TriangleMesh>
758  &model,
759  core::Dtype float_dtype = core::Float32,
760  core::Dtype int_dtype = core::Int64,
761  const core::Device &device = core::Device("CPU:0"));
762 
777  TriangleMesh ComputeConvexHull(bool joggle_inputs = false) const;
778 
792  TriangleMesh SimplifyQuadricDecimation(double target_reduction,
793  bool preserve_volume = true) const;
794 
807  double tolerance = 1e-6) const;
808 
820  double tolerance = 1e-6) const;
821 
833  double tolerance = 1e-6) const;
834 
837 
840 
849  TriangleMesh FillHoles(double hole_size = 1e6) const;
850 
881  std::tuple<float, int, int> ComputeUVAtlas(size_t size = 512,
882  float gutter = 1.0f,
883  float max_stretch = 1.f / 6,
884  int parallel_partitions = 1,
885  int nthreads = 0);
886 
912  std::unordered_map<std::string, core::Tensor> BakeVertexAttrTextures(
913  int size,
914  const std::unordered_set<std::string> &vertex_attr = {},
915  double margin = 2.,
916  double fill = 0.,
917  bool update_material = true);
918 
943  std::unordered_map<std::string, core::Tensor> BakeTriangleAttrTextures(
944  int size,
945  const std::unordered_set<std::string> &triangle_attr = {},
946  double margin = 2.,
947  double fill = 0.,
948  bool update_material = true);
949 
958  TriangleMesh ExtrudeRotation(double angle,
959  const core::Tensor &axis,
960  int resolution = 16,
961  double translation = 0.0,
962  bool capping = true) const;
963 
970  double scale = 1.0,
971  bool capping = true) const;
972 
978  int PCAPartition(int max_faces);
979 
985  TriangleMesh SelectFacesByMask(const core::Tensor &mask) const;
986 
998  TriangleMesh SelectByIndex(const core::Tensor &indices,
999  bool copy_attributes = true) const;
1000 
1004 
1024  Image ProjectImagesToAlbedo(
1025  const std::vector<Image> &images,
1026  const std::vector<core::Tensor> &intrinsic_matrices,
1027  const std::vector<core::Tensor> &extrinsic_matrices,
1028  int tex_size = 1024,
1029  bool update_material = true);
1030 
1037 
1043  core::Tensor GetNonManifoldEdges(bool allow_boundary_edges = true) const;
1044 
1054  PointCloud SamplePointsUniformly(size_t number_of_points,
1055  bool use_triangle_normal = false);
1056 
1070 
1085 
1094  const TriangleMesh &mesh2,
1095  std::vector<Metric> metrics = {Metric::ChamferDistance},
1096  MetricParameters params = MetricParameters()) const;
1097 
1098 protected:
1102 };
1103 
1104 } // namespace geometry
1105 } // namespace t
1106 } // namespace cloudViewer
double normal[3]
int width
int size
int height
cmdLineReadable * params[]
#define AssertTensorDevice(tensor,...)
Definition: TensorCheck.h:45
#define AssertTensorShape(tensor,...)
Definition: TensorCheck.h:61
bool copy
Definition: VtkUtils.cpp:74
Triangular mesh.
Definition: ecvMesh.h:35
int64_t GetLength() const
Definition: Tensor.h:1125
Tensor Max(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1275
Tensor Min(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1268
Tensor Mean(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1247
A bounding box that is aligned along the coordinate axes and defined by the min_bound and max_bound.
Mix-in class for geometry types that can be visualized.
The base geometry class.
Definition: Geometry.h:23
A LineSet contains points and lines joining them and optionally attributes on the points and lines.
Definition: LineSet.h:85
A bounding box oriented along an arbitrary frame of reference.
std::size_t Erase(const std::string key)
Erase elements for the TensorMap by key value, if the key exists. If the key does not exists,...
Definition: TensorMap.h:92
bool Contains(const std::string &key) const
Definition: TensorMap.h:187
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:98
static TriangleMesh CreateBox(double width=1.0, double height=1.0, double depth=1.0, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
TriangleMesh SimplifyQuadricDecimation(double target_reduction, bool preserve_volume=true) const
TriangleMesh(const core::Device &device=core::Device("CPU:0"))
TriangleMesh & Translate(const core::Tensor &translation, bool relative=true)
Translates the VertexPositions of the TriangleMesh.
core::Tensor ComputeMetrics(const TriangleMesh &mesh2, std::vector< Metric > metrics={Metric::ChamferDistance}, MetricParameters params=MetricParameters()) const
void SetTriangleNormals(const core::Tensor &value)
Definition: TriangleMesh.h:298
const core::Tensor & GetTriangleIndices() const
Definition: TriangleMesh.h:233
TriangleMesh BooleanIntersection(const TriangleMesh &mesh, double tolerance=1e-6) const
static TriangleMesh CreateIsosurfaces(const core::Tensor &volume, const std::vector< double > contour_values={0.0}, const core::Device &device=core::Device("CPU:0"))
double GetSurfaceArea() const
Function that computes the surface area of the mesh, i.e. the sum of the individual triangle surfaces...
const core::Tensor & GetVertexPositions() const
Definition: TriangleMesh.h:199
static TriangleMesh CreateCylinder(double radius=1.0, double height=2.0, int resolution=20, int split=4, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
static TriangleMesh CreateTetrahedron(double radius=1.0, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
TriangleMesh & Clear() override
Clear all data in the trianglemesh.
Definition: TriangleMesh.h:619
core::Tensor & GetVertexAttr(const std::string &key)
Definition: TriangleMesh.h:142
static geometry::TriangleMesh FromLegacy(const ccMesh &mesh_legacy, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
TriangleMesh SelectFacesByMask(const core::Tensor &mask) const
TensorMap & GetVertexAttr()
Getter for vertex_attr_ TensorMap.
Definition: TriangleMesh.h:136
TriangleMesh Clone() const
Returns copy of the triangle mesh on the same device.
Definition: TriangleMesh.h:130
const TensorMap & GetVertexAttr() const
Getter for vertex_attr_ TensorMap. Used in Pybind.
Definition: TriangleMesh.h:133
const core::Tensor & GetTriangleColors() const
Definition: TriangleMesh.h:245
static TriangleMesh CreateIcosahedron(double radius=1.0, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
static TriangleMesh CreateText(const std::string &text, double depth=0.0, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
Image ProjectImagesToAlbedo(const std::vector< Image > &images, const std::vector< core::Tensor > &intrinsic_matrices, const std::vector< core::Tensor > &extrinsic_matrices, int tex_size=1024, bool update_material=true)
static std::unordered_map< std::string, geometry::TriangleMesh > FromTriangleMeshModel(const cloudViewer::visualization::rendering::TriangleMeshModel &model, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
std::unordered_map< std::string, core::Tensor > BakeTriangleAttrTextures(int size, const std::unordered_set< std::string > &triangle_attr={}, double margin=2., double fill=0., bool update_material=true)
const core::Tensor & GetVertexAttr(const std::string &key) const
Definition: TriangleMesh.h:187
std::string ToString() const
Text description.
static TriangleMesh CreateArrow(double cylinder_radius=1.0, double cone_radius=1.5, double cylinder_height=5.0, double cone_height=4.0, int resolution=20, int cylinder_split=4, int cone_split=1, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
TriangleMesh ClipPlane(const core::Tensor &point, const core::Tensor &normal) const
Clip mesh with a plane. This method clips the triangle mesh with the specified plane....
TensorMap & GetTriangleAttr()
Getter for triangle_attr_ TensorMap.
Definition: TriangleMesh.h:162
static TriangleMesh CreateMobius(int length_split=70, int width_split=15, int twists=1, double radius=1, double flatness=1, double width=1, double scale=1, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
const core::Tensor & GetVertexNormals() const
Definition: TriangleMesh.h:211
void RemoveTriangleAttr(const std::string &key)
Definition: TriangleMesh.h:227
TriangleMesh ExtrudeRotation(double angle, const core::Tensor &axis, int resolution=16, double translation=0.0, bool capping=true) const
AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const
Create an axis-aligned bounding box from vertex attribute "positions".
core::Device GetDevice() const override
Returns the device of the geometry.
Definition: TriangleMesh.h:721
std::unordered_map< std::string, core::Tensor > BakeVertexAttrTextures(int size, const std::unordered_set< std::string > &vertex_attr={}, double margin=2., double fill=0., bool update_material=true)
void SetVertexPositions(const core::Tensor &value)
Definition: TriangleMesh.h:261
const core::Tensor & GetVertexColors() const
Definition: TriangleMesh.h:205
TriangleMesh To(const core::Device &device, bool copy=false) const
core::Tensor GetNonManifoldEdges(bool allow_boundary_edges=true) const
TriangleMesh & NormalizeNormals()
Normalize both triangle normals and vertex normals to length 1.
core::Tensor & GetTriangleAttr(const std::string &key)
Definition: TriangleMesh.h:168
void SetTriangleIndices(const core::Tensor &value)
Set the value of the "indices" attribute in triangle_attr_.
Definition: TriangleMesh.h:291
TriangleMesh BooleanUnion(const TriangleMesh &mesh, double tolerance=1e-6) const
PointCloud SamplePointsUniformly(size_t number_of_points, bool use_triangle_normal=false)
static TriangleMesh CreateCoordinateFrame(double size=1.0, const Eigen::Vector3d &origin=Eigen::Vector3d(0.0, 0.0, 0.0), core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
static TriangleMesh CreateCone(double radius=1.0, double height=2.0, int resolution=20, int split=1, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
const core::Tensor & GetTriangleNormals() const
Definition: TriangleMesh.h:239
ccMesh ToLegacy() const
Convert to a legacy CloudViewer TriangleMesh.
static TriangleMesh CreateTorus(double torus_radius=1.0, double tube_radius=0.5, int radial_resolution=30, int tubular_resolution=20, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
void SetVertexNormals(const core::Tensor &value)
Definition: TriangleMesh.h:275
TriangleMesh & Scale(double scale, const core::Tensor &center)
Scales the VertexPositions of the TriangleMesh.
TriangleMesh FillHoles(double hole_size=1e6) const
bool HasVertexAttr(const std::string &key) const
Definition: TriangleMesh.h:314
TriangleMesh & Rotate(const core::Tensor &R, const core::Tensor &center)
Rotates the VertexPositions, VertexNormals and TriangleNormals (if exists).
TriangleMesh & ComputeTriangleAreas()
Function to compute triangle areas and save it as a triangle attribute "areas". Prints a warning,...
void RemoveVertexAttr(const std::string &key)
Definition: TriangleMesh.h:195
TriangleMesh ExtrudeLinear(const core::Tensor &vector, double scale=1.0, bool capping=true) const
TriangleMesh BooleanDifference(const TriangleMesh &mesh, double tolerance=1e-6) const
static TriangleMesh CreateOctahedron(double radius=1.0, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
std::tuple< float, int, int > ComputeUVAtlas(size_t size=512, float gutter=1.0f, float max_stretch=1.f/6, int parallel_partitions=1, int nthreads=0)
bool HasTriangleAttr(const std::string &key) const
Definition: TriangleMesh.h:343
LineSet SlicePlane(const core::Tensor &point, const core::Tensor &normal, const std::vector< double > contour_values={0.0}) const
Extract contour slices given a plane. This method extracts slices as LineSet from the mesh at specifi...
TriangleMesh ComputeConvexHull(bool joggle_inputs=false) const
TriangleMesh & ComputeVertexNormals(bool normalized=true)
Function to compute vertex normals, usually called before rendering.
const core::Tensor & GetTriangleAttr(const std::string &key) const
Definition: TriangleMesh.h:219
void SetVertexAttr(const std::string &key, const core::Tensor &value)
Definition: TriangleMesh.h:254
void SetVertexColors(const core::Tensor &value)
Definition: TriangleMesh.h:268
void SetTriangleColors(const core::Tensor &value)
Definition: TriangleMesh.h:305
TriangleMesh SelectByIndex(const core::Tensor &indices, bool copy_attributes=true) const
bool IsEmpty() const override
Returns !HasVertexPositions(), triangles are ignored.
Definition: TriangleMesh.h:626
void SetTriangleAttr(const std::string &key, const core::Tensor &value)
Definition: TriangleMesh.h:285
static TriangleMesh CreateSphere(double radius=1.0, int resolution=20, core::Dtype float_dtype=core::Float32, core::Dtype int_dtype=core::Int64, const core::Device &device=core::Device("CPU:0"))
TriangleMesh & Transform(const core::Tensor &transformation)
Transforms the VertexPositions, VertexNormals and TriangleNormals (if exist) of the TriangleMesh.
const TensorMap & GetTriangleAttr() const
Getter for triangle_attr_ TensorMap. Used in Pybind.
Definition: TriangleMesh.h:159
TriangleMesh & ComputeTriangleNormals(bool normalized=true)
Function to compute triangle normals, usually called before rendering.
OrientedBoundingBox GetOrientedBoundingBox() const
Create an oriented bounding box from vertex attribute "positions".
const Dtype Int64
Definition: Dtype.cpp:47
const Dtype Float32
Definition: Dtype.cpp:42
::ccPointCloud PointCloud
Definition: PointCloud.h:19
@ ChamferDistance
Chamfer Distance.
constexpr nullopt_t nullopt
Definition: Optional.h:136
Generic file read and write utility for python interface.
Definition: lsd.c:149