 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
28 if (
color.NumElements() == 0) {
33 color.GetDtype().ToString());
87 double* Tinv_ptr = Tinv.GetDataPtr<
double>();
90 Tinv_ptr[0 * 4 + 0] = T_ptr[0 * 4 + 0];
91 Tinv_ptr[0 * 4 + 1] = T_ptr[1 * 4 + 0];
92 Tinv_ptr[0 * 4 + 2] = T_ptr[2 * 4 + 0];
94 Tinv_ptr[1 * 4 + 0] = T_ptr[0 * 4 + 1];
95 Tinv_ptr[1 * 4 + 1] = T_ptr[1 * 4 + 1];
96 Tinv_ptr[1 * 4 + 2] = T_ptr[2 * 4 + 1];
98 Tinv_ptr[2 * 4 + 0] = T_ptr[0 * 4 + 2];
99 Tinv_ptr[2 * 4 + 1] = T_ptr[1 * 4 + 2];
100 Tinv_ptr[2 * 4 + 2] = T_ptr[2 * 4 + 2];
103 Tinv_ptr[0 * 4 + 3] = -(Tinv_ptr[0 * 4 + 0] * T_ptr[0 * 4 + 3] +
104 Tinv_ptr[0 * 4 + 1] * T_ptr[1 * 4 + 3] +
105 Tinv_ptr[0 * 4 + 2] * T_ptr[2 * 4 + 3]);
106 Tinv_ptr[1 * 4 + 3] = -(Tinv_ptr[1 * 4 + 0] * T_ptr[0 * 4 + 3] +
107 Tinv_ptr[1 * 4 + 1] * T_ptr[1 * 4 + 3] +
108 Tinv_ptr[1 * 4 + 2] * T_ptr[2 * 4 + 3]);
109 Tinv_ptr[2 * 4 + 3] = -(Tinv_ptr[2 * 4 + 0] * T_ptr[0 * 4 + 3] +
110 Tinv_ptr[2 * 4 + 1] * T_ptr[1 * 4 + 3] +
111 Tinv_ptr[2 * 4 + 2] * T_ptr[2 * 4 + 3]);
114 Tinv_ptr[3 * 4 + 0] = 0;
115 Tinv_ptr[3 * 4 + 1] = 0;
116 Tinv_ptr[3 * 4 + 2] = 0;
117 Tinv_ptr[3 * 4 + 3] = 1;
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
bool hasColors() const override
Returns whether colors are enabled or not.
Definition: ecvPointCloud.cpp:1689
Dtype GetDtype() const
Definition: Tensor.h:1164
static std::shared_ptr< ccMesh > 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)
Definition: TriangleMeshFactory.cpp:2766
std::vector< int > GetNonManifoldVertices() const
Definition: TriangleMeshFactory.cpp:921
constexpr double M_PI
Pi.
Definition: CVConst.h:19
ccMesh & RemoveNonManifoldEdges()
Function that removes all non-manifold edges, by successively deleting triangles with the smallest su...
Definition: TriangleMeshFactory.cpp:225
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"))
Definition: TriangleMeshFactory.cpp:135
bool IsBoundingBoxIntersecting(const ccMesh &other) const
Definition: TriangleMeshFactory.cpp:1020
Definition: MaterialConverter.h:18
const Dtype UInt16
Definition: Dtype.cpp:49
static Eigen::Vector2i GetOrderedEdge(int vidx0, int vidx1)
Helper function to get an edge with ordered vertex indices.
Definition: ecvMesh.h:1005
static Edge< T > GetOrderedEdge(T vidx0, T vidx1)
brief Helper function to get an edge with ordered vertex indices.
Definition: TriangleMesh.cpp:1672
std::tuple< std::vector< int >, std::vector< size_t >, std::vector< double > > ClusterConnectedTriangles() const
Function that clusters connected triangles, i.e., triangles that are connected via edges are assigned...
Definition: TriangleMeshFactory.cpp:1175
ccMesh & ComputeAdjacencyList()
Function to compute adjacency list, call before adjacency list is.
Definition: TriangleMeshFactory.cpp:1416
static double ComputeTriangleArea(const Eigen::Vector3d &p0, const Eigen::Vector3d &p1, const Eigen::Vector3d &p2)
Function that computes the area of a mesh triangle.
Definition: TriangleMeshFactory.cpp:1628
void normalize()
Sets vector norm to unity.
Definition: CVGeom.h:428
std::shared_ptr< ccPointCloud > SamplePointsPoissonDisk(size_t number_of_points, double init_factor=5, const std::shared_ptr< ccPointCloud > pcl_init=nullptr, bool use_triangle_normal=false, int seed=-1)
Definition: TriangleMeshFactory.cpp:1431
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)
Definition: SlabTraits.h:49
static std::shared_ptr< ccMesh > CreateIcosahedron(double radius=1.0, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:1959
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"))
Definition: TriangleMeshFactory.cpp:99
normal_z x
Definition: my_point_types.h:165
const ecvColor::Rgb & getPointColor(unsigned pointIndex) const override
Returns color corresponding to a given point.
Definition: ecvPointCloud.cpp:1535
static Eigen::Vector3d ToEigen(const Type col[3])
Definition: ecvColorTypes.h:72
void RemoveTrianglesByMask(const std::vector< bool > &triangle_mask)
This function removes the triangles that are masked in triangle_mask. Call RemoveUnreferencedVertices...
Definition: TriangleMeshFactory.cpp:1260
SizeVector GetShape() const
Definition: Tensor.h:1127
Type x
Definition: CVGeom.h:137
std::shared_ptr< ccPointCloud > SamplePointsUniformlyImpl(size_t number_of_points, std::vector< double > &triangle_areas, double surface_area, bool use_triangle_normal, int seed)
Definition: TriangleMeshFactory.cpp:1720
static std::shared_ptr< ccMesh > CreateCone(double radius=1.0, double height=2.0, int resolution=20, int split=1, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:2544
unsigned i2
Definition: GenericIndexedMesh.h:19
Eigen::Matrix< Index, 2, 1 > Vector2i
Definition: knncpp.h:29
Eigen::Vector3d getEigenNormal(size_t index) const
Definition: ecvPointCloud.cpp:1600
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"))
Definition: TriangleMeshFactory.cpp:111
Triangle described by the indexes of its 3 vertices.
Definition: GenericIndexedMesh.h:16
virtual unsigned size() const override
Returns the number of triangles.
Definition: ecvMesh.cpp:2143
double GetSurfaceArea() const
Definition: TriangleMeshFactory.cpp:1644
double normal[3]
Definition: FileIOFactory.cpp:53
void FilterSmoothLaplacianHelper(std::shared_ptr< ccMesh > &mesh, const std::vector< CCVector3 > &prev_vertices, const std::vector< CCVector3 > &prev_vertex_normals, const ColorsTableType &prev_vertex_colors, const std::vector< std::unordered_set< int >> &adjacency_list, double lambda, bool filter_vertex, bool filter_normal, bool filter_color) const
Definition: TriangleMeshFactory.cpp:645
static ccPointCloud * ToPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccPointCloud.
Definition: ecvHObjectCaster.cpp:54
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"))
Definition: TriangleMeshFactory.cpp:151
#define AssertTensorDevice(tensor,...)
Definition: TensorCheck.h:45
core::Tensor InverseTransformation(const core::Tensor &T)
TODO(wei): find a proper place for such functionalities.
Definition: Utility.h:77
void CheckBlockCoordinates(const core::Tensor &block_coords)
Definition: Utility.h:69
const CCVector3 & getPointNormal(unsigned pointIndex) const override
Returns normal corresponding to a given point.
Definition: ecvPointCloud.cpp:1555
@ POINT_CLOUD
Definition: CVTypes.h:104
bool IsContiguous() const
Definition: Tensor.h:1036
const CCVector3 * getPoint(unsigned index) const override
Definition: PointCloudTpl.h:143
ccMesh & ComputeVertexNormals(bool normalized=true)
Function to compute vertex normals, usually called before rendering.
Definition: TriangleMeshFactory.cpp:1388
virtual void setLocked(bool state)
Sets the "enabled" property.
Definition: ecvObject.h:117
ccMesh & RemoveDuplicatedVertices()
Function that removes duplicated verties, i.e., vertices that have identical coordinates.
Definition: TriangleMeshFactory.cpp:31
ccMesh & MergeCloseVertices(double eps)
Function that will merge close by vertices to a single one. The vertex position, normal and color wil...
Definition: TriangleMeshFactory.cpp:309
std::shared_ptr< ccMesh > FilterSharpen(int number_of_iterations, double strength, FilterScope scope=FilterScope::All) const
Function to sharpen triangle mesh.
Definition: TriangleMeshFactory.cpp:413
std::vector< Eigen::Vector2i > GetSelfIntersectingTriangles() const
Definition: TriangleMeshFactory.cpp:981
unsigned size() const override
Definition: PointCloudTpl.h:38
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
ccMesh & NormalizeNormals()
Definition: TriangleMeshFactory.cpp:1400
bool OrientTriangles()
Definition: TriangleMeshFactory.cpp:1166
bool resizeTheNormsTable()
Resizes the compressed normals array.
Definition: ecvPointCloud.cpp:1281
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"))
Definition: TriangleMeshFactory.cpp:86
bool resizeTheRGBTable(bool fillWithWhite=false)
Resizes the RGB colors array.
Definition: ecvPointCloud.cpp:1226
std::unordered_map< Eigen::Vector2i, double, cloudViewer::utility::hash_eigen< Eigen::Vector2i > > ComputeEdgeWeightsCot(const std::unordered_map< Eigen::Vector2i, std::vector< int >, cloudViewer::utility::hash_eigen< Eigen::Vector2i >> &edges_to_vertices, double min_weight=std::numeric_limits< double >::lowest()) const
Function that computes for each edge in the triangle mesh and passed as parameter edges_to_vertices t...
Definition: TriangleMeshFactory.cpp:1346
bool IsSelfIntersecting() const
Definition: TriangleMeshFactory.cpp:1016
bool IsOrientable() const
Definition: TriangleMeshFactory.cpp:1157
math::float4 color
Definition: LineSetBuffers.cpp:46
TriangleMesh CreateTriangleMeshFromVtkPolyData(vtkPolyData *polydata, bool copy)
Definition: VtkUtils.cpp:431
static std::shared_ptr< ccMesh > CreateOctahedron(double radius=1.0, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:1902
void swap(optional< T > &x, optional< T > &y) noexcept(noexcept(x.swap(y)))
Definition: Optional.h:890
ccMesh & RemoveDuplicatedTriangles()
Function that removes duplicated triangles, i.e., removes triangles that reference the same three ver...
Definition: TriangleMeshFactory.cpp:84
CCVector3 * getPointPtr(size_t index)
Definition: PointCloudTpl.h:146
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:98
double normals[3]
Definition: TriangleMeshIO.cpp:54
int width
Definition: FileIOFactory.cpp:142
std::unordered_map< Eigen::Vector2i, std::vector< int >, cloudViewer::utility::hash_eigen< Eigen::Vector2i > > GetEdgeToVerticesMap() const
Definition: TriangleMeshFactory.cpp:1610
Array of compressed 3D normals (single index)
Definition: ecvAdvancedTypes.h:21
void CheckExtrinsicTensor(const core::Tensor &extrinsic)
Definition: Utility.h:53
int size
Definition: FileIOFactory.cpp:130
bool IsEdgeManifold(bool allow_boundary_edges=true) const
Definition: TriangleMeshFactory.cpp:909
static const Dtype Float64
Definition: Dtype.h:25
static bool TriangleTriangle3d(const Eigen::Vector3d &p0, const Eigen::Vector3d &p1, const Eigen::Vector3d &p2, const Eigen::Vector3d &q0, const Eigen::Vector3d &q1, const Eigen::Vector3d &q2)
Definition: IntersectionTest.cpp:32
int height
Definition: FileIOFactory.cpp:143
void setPoint(size_t index, const CCVector3 &P)
Definition: PointCloudTpl.h:259
normal_z y
Definition: my_point_types.h:168
double GetTriangleArea(size_t triangle_idx) const
Definition: TriangleMeshFactory.cpp:1637
constexpr utility::nullopt_t None
Definition: TensorKey.h:20
ccMesh & PaintUniformColor(const Eigen::Vector3d &color)
Assigns each vertex in the ccMesh the same color.
Definition: TriangleMeshFactory.cpp:398
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
Definition: ecvMesh.cpp:828
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"))
Definition: TriangleMeshFactory.cpp:123
std::shared_ptr< ccPointCloud > SamplePointsUniformly(size_t number_of_points, bool use_triangle_normal=false, int seed=-1)
Definition: TriangleMeshFactory.cpp:1831
const double * e
Definition: essential_matrix_poly.h:10
const Dtype Int32
Definition: Dtype.cpp:46
static std::shared_ptr< ccMesh > CreateCoordinateFrame(double size=1.0, const Eigen::Vector3d &origin=Eigen::Vector3d(0.0, 0.0, 0.0))
Definition: TriangleMeshFactory.cpp:2808
std::vector< CCVector3 > & getPoints()
Definition: PointCloudTpl.h:149
ccPointCloud & NormalizeNormals()
Normalize point normals to length 1.`.
Definition: PointCloudFactory.cpp:290
void swap(cloudViewer::core::SmallVectorImpl< T > &LHS, cloudViewer::core::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Definition: SmallVector.h:1370
#define LogDebug(...)
Definition: Logging.h:90
unsigned i3
Definition: GenericIndexedMesh.h:19
math::float4 next
Definition: LineSetBuffers.cpp:45
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"))
Definition: TriangleMeshFactory.cpp:183
unsigned i[3]
Definition: GenericIndexedMesh.h:21
void CheckColorTensor(const core::Tensor &color)
Definition: Utility.h:27
Eigen::Vector3d getEigenColor(size_t index) const
Definition: ecvPointCloud.cpp:1625
bool OrientTriangleHelper(const std::vector< Eigen::Vector3i > &triangles, F &swap)
Definition: TriangleMeshFactory.cpp:1053
std::tuple< std::shared_ptr< ccMesh >, std::vector< size_t > > ComputeConvexHull() const
Definition: TriangleMeshFactory.cpp:409
bool hasNormals() const override
Returns whether normals are enabled or not.
Definition: ecvPointCloud.cpp:1693
const Dtype UInt8
Definition: Dtype.cpp:48
static std::shared_ptr< ccMesh > CreateTorus(double torus_radius=1.0, double tube_radius=0.5, int radial_resolution=30, int tubular_resolution=20)
Definition: TriangleMeshFactory.cpp:2689
ccMesh & RemoveDegenerateTriangles()
Function that removes degenerate triangles, i.e., triangles that reference a single vertex multiple t...
Definition: TriangleMeshFactory.cpp:193
static bool AABBAABB(const Eigen::Vector3d &min0, const Eigen::Vector3d &max0, const Eigen::Vector3d &min1, const Eigen::Vector3d &max1)
Definition: IntersectionTest.cpp:16
std::string ToString() const
Definition: Dtype.h:65
const Dtype Float64
Definition: Dtype.cpp:43
Eigen::Matrix< Index, 3, 1 > Vector3i
Definition: knncpp.h:30
a[190]
Definition: essential_matrix_poly.h:19
bool IsWatertight() const
Definition: TriangleMeshFactory.cpp:1162
static std::unordered_map< Edge< T >, std::vector< size_t >, utility::hash_tuple< Edge< T > > > GetEdgeToTrianglesMap(const core::Tensor &tris_cpu)
Definition: TriangleMesh.cpp:1680
ColorsTableType * rgbColors() const
Returns pointer on RGB colors table.
Definition: ecvPointCloud.h:914
const Dtype Float32
Definition: Dtype.cpp:42
Type z
Definition: CVGeom.h:137
Type & getValue(size_t index)
Definition: ecvArray.h:100
Definition: SizeVector.h:70
void RemoveVerticesByIndex(const std::vector< size_t > &vertex_indices)
This function removes the vertices with index in vertex_indices. Note that also all triangles associa...
Definition: TriangleMeshFactory.cpp:1283
ccMesh & ComputeTriangleNormals(bool normalized=true)
Function to compute triangle normals, usually called before rendering.
Definition: TriangleMeshFactory.cpp:1380
Eigen::Vector3d origin
Definition: VoxelGridIO.cpp:26
bool resize(unsigned numberOfPoints) override
Resizes all the active features arrays.
Definition: ecvPointCloud.cpp:1476
int SearchRadius(const T &query, double radius, std::vector< int > &indices, std::vector< double > &distance2) const
Definition: ecvKDTreeFlann.h:144
#define LogError(...)
Definition: Logging.h:60
ccMesh & RemoveUnreferencedVertices()
This function removes vertices from the triangle mesh that are not referenced in any triangle of the ...
Definition: TriangleMeshFactory.cpp:139
std::shared_ptr< ccMesh > FilterSmoothSimple(int number_of_iterations, FilterScope scope=FilterScope::All) const
Function to smooth triangle mesh with simple neighbour average.
Definition: TriangleMeshFactory.cpp:535
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"))
Definition: TriangleMeshFactory.cpp:236
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"))
Definition: TriangleMeshFactory.cpp:203
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"))
Definition: TriangleMeshFactory.cpp:167
void setEigenPoint(size_t index, const Eigen::Vector3d &point)
Definition: PointCloudTpl.h:272
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"))
Definition: TriangleMeshFactory.cpp:217
Eigen::Vector3i getTriangle(size_t index) const
Definition: ecvMesh.cpp:2448
math::float2 uv
Definition: PointCloudBuffers.cpp:51
#define AssertTensorDtype(tensor,...)
Definition: TensorCheck.h:21
KDTree with FLANN for nearest neighbor search.
Definition: ecvKDTreeFlann.h:33
void clear()
Definition: ecvMesh.cpp:2126
FilterScope
Indicates the scope of filter operations.
Definition: GenericMesh.h:44
static CCVector3 & GetNormalPtr(unsigned normIndex)
Definition: ecvNormalVectors.h:40
void setPointNormals(const std::vector< CCVector3 > &normals)
Definition: ecvPointCloud.cpp:1590
static std::shared_ptr< ccMesh > CreateBox(double width=1.0, double height=1.0, double depth=1.0, bool create_uv_map=false, bool map_texture_to_each_face=false)
Definition: TriangleMeshFactory.cpp:2091
Triangular mesh.
Definition: ecvMesh.h:35
Eigen::Vector3d getVertice(size_t index) const
Definition: ecvMesh.cpp:2213
std::unordered_map< Eigen::Vector2i, std::vector< int >, cloudViewer::utility::hash_eigen< Eigen::Vector2i > > GetEdgeToTrianglesMap() const
Definition: TriangleMeshFactory.cpp:1589
int64_t NumElements() const
Definition: Tensor.h:1170
void RemoveVerticesByMask(const std::vector< bool > &vertex_mask)
This function removes the vertices that are masked in vertex_mask. Note that also all triangles assoc...
Definition: TriangleMeshFactory.cpp:1299
bool IsVertexManifold() const
Definition: TriangleMeshFactory.cpp:977
void CheckIntrinsicTensor(const core::Tensor &intrinsic)
Definition: Utility.h:37
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
Definition: ecvMesh.cpp:820
#define LogWarning(...)
Definition: Logging.h:72
Type y
Definition: CVGeom.h:137
static std::shared_ptr< ccMesh > CreateMobius(int length_split=70, int width_split=15, int twists=1, double radius=1, double flatness=1, double width=1, double scale=1)
Definition: TriangleMeshFactory.cpp:2850
CLOUDVIEWER_LOCAL vtkSmartPointer< vtkImageData > CreateVtkImageDataFromTensor(core::Tensor &tensor, bool copy)
Definition: VtkUtils.cpp:186
std::shared_ptr< ccMesh > FilterSmoothLaplacian(int number_of_iterations, double lambda, FilterScope scope=FilterScope::All) const
Function to smooth triangle mesh using Laplacian.
Definition: TriangleMeshFactory.cpp:706
static std::tuple< std::shared_ptr< ccMesh >, std::vector< size_t > > ComputeConvexHull(const std::vector< Eigen::Vector3d > &points)
Definition: ecvQhull.cpp:34
int EulerPoincareCharacteristic() const
Definition: TriangleMeshFactory.cpp:879
static std::shared_ptr< ccMesh > CreateSphere(double radius=1.0, int resolution=20, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:2180
void setPointNormal(size_t pointIndex, const CCVector3 &N)
Sets a particular point normal (shortcut)
Definition: ecvPointCloud.cpp:1681
std::vector< Eigen::Vector2i > GetNonManifoldEdges(bool allow_boundary_edges=true) const
Definition: TriangleMeshFactory.cpp:895
std::vector< CCVector3 > getPointNormals() const
Definition: ecvPointCloud.cpp:1574
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
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"))
Definition: TriangleMesh.cpp:379
constexpr static RgbTpl FromEigen(const Eigen::Vector3d &t)
Definition: ecvColorTypes.h:86
#define AssertTensorShape(tensor,...)
Definition: TensorCheck.h:61
void shrinkToFit()
Removes unused capacity.
Definition: ecvPointCloud.h:357
void addEigenPoint(const Eigen::Vector3d &point)
Definition: PointCloudTpl.h:290
ccPointCloud & PaintUniformColor(const Eigen::Vector3d &color)
Assigns each vertex in the ccMesh the same color.
Definition: PointCloudFactory.cpp:1497
static const Dtype Int32
Definition: Dtype.h:28
bool computeNormals(const ccHObject::Container &selectedEntities, QWidget *parent)
Definition: ecvEntityAction.cpp:1570
#define AssertTensorDtypes(tensor,...)
Definition: TensorCheck.h:33
static std::shared_ptr< ccMesh > CreateTetrahedron(double radius=1.0, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:1851
std::shared_ptr< ccMesh > FilterSmoothTaubin(int number_of_iterations, double lambda=0.5, double mu=-0.53, FilterScope scope=FilterScope::All) const
Function to smooth triangle mesh using method of Taubin, "Curve and Surface Smoothing Without Shrinka...
Definition: TriangleMeshFactory.cpp:785
virtual void setEnabled(bool state)
Sets the "enabled" property.
Definition: ecvObject.h:102
static TriangleMesh CreateIsosurfaces(const core::Tensor &volume, const std::vector< double > contour_values={0.0}, const core::Device &device=core::Device("CPU:0"))
Definition: TriangleMeshFactory.cpp:279
void setPointColor(size_t pointIndex, const ecvColor::Rgb &col)
Sets a particular point color.
Definition: ecvPointCloud.cpp:1649
static std::shared_ptr< ccMesh > CreatePlane(double width=1.0, double height=1.0, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:2047
Eigen::Vector4d GetTrianglePlane(size_t triangle_idx) const
Definition: TriangleMeshFactory.cpp:1713
const Dtype Int64
Definition: Dtype.cpp:47
void RemoveTrianglesByIndex(const std::vector< size_t > &triangle_indices)
This function removes the triangles with index in triangle_indices. Call RemoveUnreferencedVertices t...
Definition: TriangleMeshFactory.cpp:1243
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:739
bool IsIntersecting(const ccMesh &other) const
Definition: TriangleMeshFactory.cpp:1026
static std::shared_ptr< ccMesh > CreateCylinder(double radius=1.0, double height=2.0, int resolution=20, int split=4, bool create_uv_map=false)
Definition: TriangleMeshFactory.cpp:2368
unsigned i1
Definition: GenericIndexedMesh.h:19
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"))
Definition: TriangleMeshFactory.cpp:22
double GetVolume() const
Definition: TriangleMeshFactory.cpp:1664
static Eigen::Vector4d ComputeTrianglePlane(const Eigen::Vector3d &p0, const Eigen::Vector3d &p1, const Eigen::Vector3d &p2)
Definition: TriangleMeshFactory.cpp:1697
void CheckDepthTensor(const core::Tensor &depth)
Definition: Utility.h:17
Array of RGB colors for each point.
Definition: ecvAdvancedTypes.h:82
T * GetDataPtr()
Definition: Tensor.h:1144