Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::TriangleMeshDataAdapter Class Reference
+ Collaboration diagram for Slic3r::TriangleMeshDataAdapter:

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, const Transform3d tr=Transform3d::Identity())
 

Public Attributes

const indexed_triangle_setits
 
Transform3d trafo
 

Detailed Description

Constructor & Destructor Documentation

◆ TriangleMeshDataAdapter()

Slic3r::TriangleMeshDataAdapter::TriangleMeshDataAdapter ( const indexed_triangle_set m,
const Transform3d  tr = Transform3d::Identity() 
)
inline
74 : its{m}, trafo{tr} {}
const indexed_triangle_set & its
Definition OpenVDBUtils.cpp:56
Transform3d trafo
Definition OpenVDBUtils.cpp:57

Member Function Documentation

◆ getIndexSpacePoint()

void Slic3r::TriangleMeshDataAdapter::getIndexSpacePoint ( size_t  n,
size_t  v,
openvdb::Vec3d &  pos 
) const
inline
67 {
68 auto vidx = size_t(its.indices[n](Eigen::Index(v)));
69 Slic3r::Vec3d p = trafo * its.vertices[vidx].cast<double>();
70 pos = {p.x(), p.y(), p.z()};
71 }
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:33
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:14
std::vector< stl_vertex > vertices
Definition stl.h:165
std::vector< stl_triangle_vertex_indices > indices
Definition stl.h:164

References indexed_triangle_set::indices, its, trafo, and indexed_triangle_set::vertices.

Referenced by Slic3r::mesh_to_grid().

+ Here is the caller graph for this function:

◆ pointCount()

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

References its, and indexed_triangle_set::vertices.

Referenced by Slic3r::mesh_to_grid().

+ Here is the caller graph for this function:

◆ polygonCount()

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

References indexed_triangle_set::indices, and its.

Referenced by Slic3r::mesh_to_grid().

+ Here is the caller graph for this function:

◆ vertexCount()

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

Referenced by Slic3r::mesh_to_grid().

+ Here is the caller graph for this function:

Member Data Documentation

◆ its

const indexed_triangle_set& Slic3r::TriangleMeshDataAdapter::its

◆ trafo

Transform3d Slic3r::TriangleMeshDataAdapter::trafo

Referenced by getIndexSpacePoint().


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