ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::t::geometry::kernel::trianglemesh Namespace Reference

Functions

void NormalizeNormalsCPU (core::Tensor &normals)
 
void ComputeTriangleNormalsCPU (const core::Tensor &vertices, const core::Tensor &triangles, core::Tensor &normals)
 
void ComputeVertexNormalsCPU (const core::Tensor &triangles, const core::Tensor &triangle_normals, core::Tensor &vertex_normals)
 
void ComputeTriangleAreasCPU (const core::Tensor &vertices, const core::Tensor &triangles, core::Tensor &triangle_areas)
 
std::array< core::Tensor, 3 > SamplePointsUniformlyCPU (const core::Tensor &triangles, const core::Tensor &vertices, const core::Tensor &triangle_areas, const core::Tensor &vertex_normals, const core::Tensor &vertex_colors, const core::Tensor &triangle_normals, const core::Tensor &texture_uvs, const core::Tensor &albedo, size_t number_of_points)
 
template<typename T >
void mix_3x3 (T *out, const T *a, const T *b, const T *c, float wts[3])
 
template void mix_3x3< float > (float *out, const float *a, const float *b, const float *c, float wts[3])
 

Function Documentation

◆ ComputeTriangleAreasCPU()

◆ ComputeTriangleNormalsCPU()

◆ ComputeVertexNormalsCPU()

void cloudViewer::t::geometry::kernel::trianglemesh::ComputeVertexNormalsCPU ( const core::Tensor triangles,
const core::Tensor triangle_normals,
core::Tensor vertex_normals 
)

◆ mix_3x3()

template<typename T >
void cloudViewer::t::geometry::kernel::trianglemesh::mix_3x3 ( T *  out,
const T *  a,
const T *  b,
const T *  c,
float  wts[3] 
)

Definition at line 60 of file TriangleMeshCPU.cpp.

◆ mix_3x3< float >()

template void cloudViewer::t::geometry::kernel::trianglemesh::mix_3x3< float > ( float *  out,
const float *  a,
const float *  b,
const float *  c,
float  wts[3] 
)

◆ NormalizeNormalsCPU()

void cloudViewer::t::geometry::kernel::trianglemesh::NormalizeNormalsCPU ( core::Tensor normals)

◆ SamplePointsUniformlyCPU()

std::array< core::Tensor, 3 > cloudViewer::t::geometry::kernel::trianglemesh::SamplePointsUniformlyCPU ( const core::Tensor triangles,
const core::Tensor vertices,
const core::Tensor triangle_areas,
const core::Tensor vertex_normals,
const core::Tensor vertex_colors,
const core::Tensor triangle_normals,
const core::Tensor texture_uvs,
const core::Tensor albedo,
size_t  number_of_points 
)

All input tensors must be on CPU, contiguous and the correct shape. normals are computed if either vertex_normals and triangle_normals are not empty (used in that order). colors (Float32) are computed if either albedo and texture_uvs or vertex_colors are not empty (used in that order).

Definition at line 76 of file TriangleMeshCPU.cpp.

References colors, DISPATCH_FLOAT_INT_DTYPE_TO_TEMPLATE, cloudViewer::core::Tensor::Empty(), cloudViewer::core::Float32, cloudViewer::core::Tensor::GetDtype(), cloudViewer::core::Tensor::GetShape(), normals, cloudViewer::core::Tensor::NumElements(), and points.

Referenced by cloudViewer::t::geometry::TriangleMesh::SamplePointsUniformly().