OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::TriangleMeshDataAdapter Class Reference

Public Member Functions

size_t polygonCount () const
size_t pointCount () const
size_t vertexCount (size_t) const
void getIndexSpacePoint (size_t n, size_t v, openvdb::Vec3d &pos) const
 TriangleMeshDataAdapter (const indexed_triangle_set &m, float voxel_sc=1.f)

Public Attributes

const indexed_triangle_set & its
float voxel_scale

Detailed Description

Constructor & Destructor Documentation

◆ TriangleMeshDataAdapter()

Slic3r::TriangleMeshDataAdapter::TriangleMeshDataAdapter ( const indexed_triangle_set & m,
float voxel_sc = 1.f )
inline
57 : its{m}, voxel_scale{voxel_sc} {};
const indexed_triangle_set & its
Definition OpenVDBUtils.cpp:39
float voxel_scale
Definition OpenVDBUtils.cpp:40

References its, and voxel_scale.

Member Function Documentation

◆ getIndexSpacePoint()

void Slic3r::TriangleMeshDataAdapter::getIndexSpacePoint ( size_t n,
size_t v,
openvdb::Vec3d & pos ) const
inline
50 {
51 auto vidx = size_t(its.indices[n](Eigen::Index(v)));
52 Slic3r::Vec3d p = its.vertices[vidx].cast<double>() * voxel_scale;
53 pos = {p.x(), p.y(), p.z()};
54 }
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:68

References its, and voxel_scale.

◆ pointCount()

size_t Slic3r::TriangleMeshDataAdapter::pointCount ( ) const
inline
43{ return its.vertices.size(); }

References its.

◆ polygonCount()

size_t Slic3r::TriangleMeshDataAdapter::polygonCount ( ) const
inline
42{ return its.indices.size(); }

References its.

◆ vertexCount()

size_t Slic3r::TriangleMeshDataAdapter::vertexCount ( size_t ) const
inline
44{ return 3; }

Member Data Documentation

◆ its

const indexed_triangle_set& Slic3r::TriangleMeshDataAdapter::its

◆ voxel_scale

float Slic3r::TriangleMeshDataAdapter::voxel_scale

The documentation for this class was generated from the following file: