Aim: An helper class for writing mesh file formats (Waverfront OBJ at this point) and creating a SurfaceMesh.
More...
#include <DGtal/io/writers/SurfaceMeshWriter.h>
|
static bool | writeOBJ (std::ostream &output, const SurfaceMesh &smesh) |
|
static bool | writeOBJ (std::string objfile, const SurfaceMesh &smesh, const Colors &diffuse_colors=Colors(), const Color &ambient_color=Color(32, 32, 32), const Color &diffuse_color=Color(200, 200, 255), const Color &specular_color=Color::White) |
|
template<typename EdgePredicate > |
static bool | writeEdgeLinesOBJ (std::string objfile, const SurfaceMesh &smesh, const EdgePredicate &edge_predicate, const double relative_thickness=0.05, const Color &ambient_color=Color::Black, const Color &diffuse_color=Color::Black, const Color &specular_color=Color::Black) |
|
static bool | writeIsoLinesOBJ (std::string objfile, const SurfaceMesh &smesh, const Scalars &face_values, const Scalars &vertex_values, const Scalar iso_value, const double relative_thickness=0.05, const Color &ambient_color=Color::Black, const Color &diffuse_color=Color::Black, const Color &specular_color=Color::Black) |
|
static bool | writeIsoLinesOBJ (std::string objfile, const SurfaceMesh &smesh, const Scalars &face_values, const Scalars &vertex_values, const Scalars &iso_values, const double relative_thickness=0.05, const Colors &diffuse_colors=Colors(), const Color &ambient_color=Color::Black, const Color &diffuse_color=Color::Black, const Color &specular_color=Color::Black) |
|
template<typename TRealPoint, typename TRealVector>
struct DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >
Aim: An helper class for writing mesh file formats (Waverfront OBJ at this point) and creating a SurfaceMesh.
Description of template class 'SurfaceMeshWriter'
- Template Parameters
-
TRealPoint | an arbitrary model of RealPoint. |
TRealVector | an arbitrary model of RealVector. |
- Examples
- geometry/meshes/curvature-measures-icnc-3d.cpp, geometry/meshes/curvature-measures-icnc-XY-3d.cpp, geometry/meshes/curvature-measures-nc-3d.cpp, geometry/meshes/curvature-measures-nc-XY-3d.cpp, geometry/meshes/digpoly-curvature-measures-cnc-3d.cpp, geometry/meshes/digpoly-curvature-measures-cnc-XY-3d.cpp, geometry/meshes/obj-curvature-measures-icnc-3d.cpp, geometry/meshes/obj-curvature-measures-icnc-XY-3d.cpp, geometry/meshes/vol-curvature-measures-icnc-3d.cpp, geometry/meshes/vol-curvature-measures-icnc-XY-3d.cpp, geometry/tools/exampleLatticeBallDelaunay3D.cpp, geometry/tools/exampleQuickHull3D.cpp, geometry/tools/exampleRationalBallDelaunay3D.cpp, geometry/volumes/fullConvexitySphereGeodesics.cpp, and shapes/exampleSurfaceMesh.cpp.
Definition at line 64 of file SurfaceMeshWriter.h.
◆ Colors
template<typename TRealPoint , typename TRealVector >
◆ Face
template<typename TRealPoint , typename TRealVector >
◆ Faces
template<typename TRealPoint , typename TRealVector >
◆ Index
template<typename TRealPoint , typename TRealVector >
◆ RealPoint
template<typename TRealPoint , typename TRealVector >
◆ RealVector
template<typename TRealPoint , typename TRealVector >
◆ Scalar
template<typename TRealPoint , typename TRealVector >
◆ Scalars
template<typename TRealPoint , typename TRealVector >
◆ Self
template<typename TRealPoint , typename TRealVector >
◆ Size
template<typename TRealPoint , typename TRealVector >
◆ SurfaceMesh
template<typename TRealPoint , typename TRealVector >
◆ Vertex
template<typename TRealPoint , typename TRealVector >
◆ Vertices
template<typename TRealPoint , typename TRealVector >
◆ BOOST_STATIC_ASSERT()
template<typename TRealPoint , typename TRealVector >
◆ writeEdgeLinesOBJ()
template<typename TRealPoint , typename TRealVector >
template<typename EdgePredicate >
Writes, in an OBJ file, the geometric lines on edges that satisfies the given edge predicate.
- Template Parameters
-
- Parameters
-
[in] | objfile | the name of the OBJ file (like "contour" or "contour.obj"). |
[in] | smesh | the surface mesh. |
[in] | edge_predicate | the edge predicate, a functor SurfaceMesh::Edge -> bool. |
[in] | relative_thickness | the thickness as a ratio of the average edge length of the mesh. |
[in] | ambient_color,diffuse_color,specular_color | the default color information for each face. |
◆ writeIsoLinesOBJ() [1/2]
template<typename TRealPoint , typename TRealVector >
Writes, in an OBJ file, the geometric isolines of a scalar field around value iso_value. Scalar values of the scalar field should be given at vertices and face centroids.
- Parameters
-
[in] | objfile | the name of the OBJ file (like "isocontour" or "isocontour.obj"). |
[in] | smesh | the surface mesh. |
[in] | face_values,vertex_values | the range of values of the scalard field at faces and at vertices. |
[in] | iso_value | the value of the isoline to output. |
[in] | relative_thickness | the thickness as a ratio of the average edge length of the mesh. |
[in] | ambient_color,diffuse_color,specular_color | the default color information for each face. |
Referenced by saveToObj().
◆ writeIsoLinesOBJ() [2/2]
template<typename TRealPoint , typename TRealVector >
static bool DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::writeIsoLinesOBJ |
( |
std::string |
objfile, |
|
|
const SurfaceMesh & |
smesh, |
|
|
const Scalars & |
face_values, |
|
|
const Scalars & |
vertex_values, |
|
|
const Scalars & |
iso_values, |
|
|
const double |
relative_thickness = 0.05 , |
|
|
const Colors & |
diffuse_colors = Colors() , |
|
|
const Color & |
ambient_color = Color::Black , |
|
|
const Color & |
diffuse_color = Color::Black , |
|
|
const Color & |
specular_color = Color::Black |
|
) |
| |
|
static |
Writes, in an OBJ file, the geometric isolines of a scalar field around values iso_values. Scalar values of the scalar field should be given at vertices and face centroids.
- Parameters
-
[in] | objfile | the name of the OBJ file (like "isocontour" or "isocontour.obj"). |
[in] | smesh | the surface mesh. |
[in] | face_values,vertex_values | the range of values of the scalard field at faces and at vertices. |
[in] | iso_values | the values of the isolines to output. |
[in] | relative_thickness | the thickness as a ratio of the average edge length of the mesh. |
[in] | diffuse_colors | the range of colors for each isoline (in same order) or empty range (then the color is always diffuse_color). |
[in] | ambient_color,diffuse_color,specular_color | the default color information for each face. |
◆ writeOBJ() [1/2]
template<typename TRealPoint , typename TRealVector >
◆ writeOBJ() [2/2]
template<typename TRealPoint , typename TRealVector >
static bool DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::writeOBJ |
( |
std::string |
objfile, |
|
|
const SurfaceMesh & |
smesh, |
|
|
const Colors & |
diffuse_colors = Colors() , |
|
|
const Color & |
ambient_color = Color(32, 32, 32) , |
|
|
const Color & |
diffuse_color = Color(200, 200, 255) , |
|
|
const Color & |
specular_color = Color::White |
|
) |
| |
|
static |
Writes a surface mesh in the given OBJ file (and an associated MTL file) and associate color information.
- Parameters
-
[in] | objfile | the name of the OBJ file (like "bunny" or "bunny.obj"). |
[in] | smesh | the surface mesh. |
[in] | diffuse_colors | either empty or a vector containing the diffuse color for each face. |
[in] | ambient_color,diffuse_color,specular_color | the default color information for each face. |
◆ dimension
template<typename TRealPoint , typename TRealVector >
The documentation for this struct was generated from the following file: