ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
UVUnwrapping.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 
11 
12 namespace cloudViewer {
13 namespace t {
14 namespace geometry {
15 namespace kernel {
16 namespace uvunwrapping {
17 
56 std::tuple<float, int, int> ComputeUVAtlas(TriangleMesh& mesh,
57  const size_t width = 512,
58  const size_t height = 512,
59  const float gutter = 1.0f,
60  const float max_stretch = 1.f / 6,
61  int parallel_partitions = 1,
62  int nthreads = 0);
63 
64 } // namespace uvunwrapping
65 } // namespace kernel
66 } // namespace geometry
67 } // namespace t
68 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
cloudViewer::core::Tensor::GetLength
int64_t GetLength() const
Definition: Tensor.h:1125
x
normal_z x
Definition: my_point_types.h:165
cloudViewer::t::geometry::TriangleMesh::GetTriangleIndices
core::Tensor & GetTriangleIndices()
Definition: TriangleMesh.h:174
max_stretch_out
float max_stretch_out
Definition: UVUnwrapping.cpp:64
core::Tensor
ib
std::vector< uint8_t > ib
Definition: UVUnwrapping.cpp:62
cloudViewer::core::UInt32
const Dtype UInt32
Definition: Dtype.cpp:50
cloudViewer::core::Tensor::Contiguous
Tensor Contiguous() const
Definition: Tensor.cpp:772
cloudViewer::t::geometry::TriangleMesh::SelectFacesByMask
TriangleMesh SelectFacesByMask(const core::Tensor &mask) const
Definition: TriangleMesh.cpp:1176
cloudViewer::geometry::TriangleMesh
::ccMesh TriangleMesh
Definition: TriangleMesh.h:19
original_face_idx
std::vector< int64_t > original_face_idx
Definition: UVUnwrapping.cpp:59
TriangleMesh.h
partition_result_adjacency
std::vector< uint32_t > partition_result_adjacency
Definition: UVUnwrapping.cpp:63
vb
std::vector< UVAtlasVertex > vb
Definition: UVUnwrapping.cpp:60
cloudViewer::t::geometry::TriangleMesh
A triangle mesh contains vertices and triangles.
Definition: TriangleMesh.h:98
width
int width
Definition: FileIOFactory.cpp:142
cloudViewer::t::geometry::TriangleMesh::SetTriangleAttr
void SetTriangleAttr(const std::string &key, const core::Tensor &value)
Definition: TriangleMesh.h:285
height
int height
Definition: FileIOFactory.cpp:143
cloudViewer::core::Tensor::Arange
static Tensor Arange(const Scalar start, const Scalar stop, const Scalar step=1, const Dtype dtype=core::Int64, const Device &device=core::Device("CPU:0"))
Create a 1D tensor with evenly spaced values in the given interval.
Definition: Tensor.cpp:436
e
const double * e
Definition: essential_matrix_poly.h:10
cloudViewer::t::geometry::TriangleMesh::PCAPartition
int PCAPartition(int max_faces)
Definition: TriangleMesh.cpp:1112
cloudViewer::core::Device
Definition: Device.h:18
num_charts_out
size_t num_charts_out
Definition: UVUnwrapping.cpp:65
UVUnwrapping.h
cloudViewer::t::geometry::kernel::uvunwrapping::ComputeUVAtlas
std::tuple< float, int, int > ComputeUVAtlas(TriangleMesh &mesh, const size_t width, const size_t height, const float gutter, const float max_stretch, int parallel_partitions, int nthreads)
Definition: UVUnwrapping.cpp:175
cloudViewer::core::Float32
const Dtype Float32
Definition: Dtype.cpp:42
LogError
#define LogError(...)
Definition: Logging.h:60
cloudViewer::t::geometry::TriangleMesh::GetTriangleAttr
const TensorMap & GetTriangleAttr() const
Getter for triangle_attr_ TensorMap. Used in Pybind.
Definition: TriangleMesh.h:159
LogInfo
#define LogInfo(...)
Definition: Logging.h:81
INVALID
@ INVALID
Definition: SinusxFilter.cpp:140
cloudViewer::t::geometry::TriangleMesh::GetDevice
core::Device GetDevice() const override
Returns the device of the geometry.
Definition: TriangleMesh.h:721
cloudViewer::t::geometry::TriangleMesh::GetVertexPositions
core::Tensor & GetVertexPositions()
Definition: TriangleMesh.h:148
cloudViewer::core::Int64
const Dtype Int64
Definition: Dtype.cpp:47
cloudViewer::core::Tensor::To
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:739