DGtal
1.5.beta
|
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>
Public Types | |
typedef TRealPoint | RealPoint |
typedef TRealVector | RealVector |
typedef SurfaceMeshWriter< RealPoint, RealVector > | Self |
typedef DGtal::SurfaceMesh< RealPoint, RealVector > | SurfaceMesh |
typedef SurfaceMesh::Size | Size |
typedef SurfaceMesh::Index | Index |
typedef SurfaceMesh::Vertex | Vertex |
typedef SurfaceMesh::Vertices | Vertices |
typedef SurfaceMesh::Face | Face |
typedef SurfaceMesh::Faces | Faces |
typedef SurfaceMesh::Scalar | Scalar |
typedef SurfaceMesh::Scalars | Scalars |
typedef std::vector< Color > | Colors |
Public Member Functions | |
BOOST_STATIC_ASSERT ((dimension==3)) | |
Static Public Member Functions | |
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) |
Static Public Attributes | |
static const Dimension | dimension = RealPoint::dimension |
Aim: An helper class for writing mesh file formats (Waverfront OBJ at this point) and creating a SurfaceMesh.
Description of template class 'SurfaceMeshWriter'
TRealPoint | an arbitrary model of RealPoint. |
TRealVector | an arbitrary model of RealVector. |
Definition at line 64 of file SurfaceMeshWriter.h.
typedef std::vector< Color > DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Colors |
Definition at line 81 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Face DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Face |
Definition at line 77 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Faces DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Faces |
Definition at line 78 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Index DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Index |
Definition at line 74 of file SurfaceMeshWriter.h.
typedef TRealPoint DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::RealPoint |
Definition at line 66 of file SurfaceMeshWriter.h.
typedef TRealVector DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::RealVector |
Definition at line 67 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Scalar DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Scalar |
Definition at line 79 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Scalars DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Scalars |
Definition at line 80 of file SurfaceMeshWriter.h.
typedef SurfaceMeshWriter< RealPoint, RealVector > DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Self |
Definition at line 68 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Size DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Size |
Definition at line 73 of file SurfaceMeshWriter.h.
typedef DGtal::SurfaceMesh< RealPoint, RealVector > DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::SurfaceMesh |
Definition at line 72 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Vertex DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Vertex |
Definition at line 75 of file SurfaceMeshWriter.h.
typedef SurfaceMesh::Vertices DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::Vertices |
Definition at line 76 of file SurfaceMeshWriter.h.
DGtal::SurfaceMeshWriter< TRealPoint, TRealVector >::BOOST_STATIC_ASSERT | ( | (dimension==3) | ) |
|
static |
Writes, in an OBJ file, the geometric lines on edges that satisfies the given edge predicate.
EdgePredicate | any type of functor SurfaceMesh::Edge -> bool. |
[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. |
|
static |
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.
[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. |
|
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.
[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. |
|
static |
Writes a surface mesh in an output file (in OBJ file format).
[in,out] | output | the output stream where the OBJ file is written. |
[in] | smesh | the surface mesh. |
Referenced by main().
|
static |
Writes a surface mesh in the given OBJ file (and an associated MTL file) and associate color information.
[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. |
|
static |
Definition at line 69 of file SurfaceMeshWriter.h.