CGAL 6.3-dev - IO Streams
Loading...
Searching...
No Matches
MEDIT I/O Functions

I/O Functions for the Medit File Format.

Functions

template<class PointRange, typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_MEDIT (std::istream &is, PointRange &points, const NamedParameters &np=parameters::default_values())
 reads the content of is into points and the named parameters using the Medit File Format.
template<class PointRange, typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_MEDIT (std::ostream &os, const PointRange &points, const NamedParameters &np=parameters::default_values())
 writes a soup of indexed cells using the Medit File Format.

Function Documentation

◆ read_MEDIT()

template<class PointRange, typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::read_MEDIT ( std::istream & is,
PointRange & points,
const NamedParameters & np = parameters::default_values() )

#include <CGAL/IO/MEDIT.h>

reads the content of is into points and the named parameters using the Medit File Format.

Note
Currently, only tetrahedral cells are supported.
The cell soup is not cleared, and the data from the stream are appended.
Template Parameters
PointRangea model of BackInsertionSequence whose value type is the point type
Parameters
isthe input stream
pointspoints of the soup of cells
npoptional Named Parameters described below
Optional Named Parameters
  • a non-const reference wrapper of a container of integers that will be filled by this function. Each element in the container corresponds to an element in points.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible from an integer.
  • Default: point references are ignored.
  • a non-const reference wrapper of a container of quadruples of integers that will be filled by this function. Each element represents a tetrahedron with vertices corresponding to the four integers.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible using a braced initializer list of four integers.
  • Default: tetrahedra are ignored.
  • a non-const reference wrapper of a container of integers that will be filled by this function. Each element in the container corresponds to an element in tetrahedra.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible from an integer.
  • Default: tetrahedron references are ignored.
  • a non-const reference wrapper of a container of triples of integers that will be filled by this function. Each element represents a triangle with vertices corresponding to the three integers.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible using a braced initializer list of three integers.
  • Default: triangles are ignored.
  • a non-const reference wrapper of a container of integers that will be filled by this function. Each element in the container corresponds to an element in triangles.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible from an integer.
  • Default: triangle references are ignored
  • a non-const reference wrapper of a container of pairs of integers that will be filled by this function. Each element represents an edge with vertices corresponding to the two integers.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible using a braced initializer list of two integers.
  • Default: edges are ignored.
  • a non-const reference wrapper of a container of integers that will be filled by this function. Each element in the container corresponds to an element in edges.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible from an integer.
  • Default: edge references are ignored
  • a non-const reference wrapper of a container of integers that will be filled by this function. Each element in the container is an index in the sequence of edges.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible from an integer.
  • Default: ridges are ignored.
  • a non-const reference wrapper of a container of integers that will be filled by this function. Each element in the container is an index in the sequence of points.
  • Type: a std::reference_wrapper to a model of BackInsertionSequence with a value type constructible from an integer.
  • Default: corners are ignored.
  • if true, prints information about the reading process.
  • Type: Boolean
  • Default: false
Returns
true if the reading was successful, false otherwise.
See also
Medit File Format

◆ write_MEDIT()

template<class PointRange, typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool CGAL::IO::write_MEDIT ( std::ostream & os,
const PointRange & points,
const NamedParameters & np = parameters::default_values() )

#include <CGAL/IO/MEDIT.h>

writes a soup of indexed cells using the Medit File Format.

Note
Currently, only tetrahedral cells are supported.
Template Parameters
PointRangea model of ConstRange whose value type is the point type
Parameters
osthe output stream
pointspoints of the soup of cells
npoptional Named Parameters described below
Optional Named Parameters
  • a const reference wrapper of a container of integers that will be written by this function. It must have the same size as points, and each element in the container is a value associated to the point at the same position.
  • Type: a std::reference_wrapper to a model of SequenceContainer with an integer type as value type.
  • Default: The value 0 is written for each point
  • a const reference wrapper of a container of quadruples of integers that will be written by this function. Each element corresponds to a tetrahedron with vertices corresponding to the four integers.
  • Type: a std::reference_wrapper to a model of SequenceContainer with a value type where the elements of the quadruples can be accessed with std::get<int>()
  • Default: tetrahedra are not written
  • a const reference wrapper of a container of integers that will be written by this function. It must have the same size as tetrahedra, and each element in the container is a value associated to the tetrahedron at the same position.
  • Type: a std::reference_wrapper to a model of SequenceContainer with an integer type as value type.
  • Default: The value 1 is written for each tetrahedron
  • a const reference wrapper of a container of triples of integers that will be written by this function. Each element corresponds to a triangle with vertices corresponding to the three integers.
  • Type: a std::reference_wrapper to a model of SequenceContainer with a value type where the elements of the triples can be accessed with std::get<int>()
  • Default: triangles are not written
  • a const reference wrapper of a container of integers that will be written by this function. It must have the same size as triangles, and each element in the container is a value associated to the triangle at the same position.
  • Type: a std::reference_wrapper to a model of SequenceContainer with an integer type as value type.
  • Default: The value 1 is written for each triangle
  • a const reference wrapper of a container of pairs of integers that will be written by this function. Each element corresponds to an edge with vertices corresponding to the two integers.
  • Type: a std::reference_wrapper to a model of SequenceContainer with a value type where the elements of the pairs can be accessed with std::get<int>()
  • Default: edges are not written
  • a const reference wrapper of a container of integers that will be written by this function. It must have the same size as edges, and each element in the container is a value associated to the edge at the same position.
  • Type: a std::reference_wrapper to a model of SequenceContainer with an integer type as value type.
  • Default: The value 1 is written for each edge
  • a const reference wrapper of a container of integers that will be written by this function. Each element in the container is an index in the sequence of edges.
  • Type: a std::reference_wrapper to a model of SequenceContainer with an integer type as value type.
  • Default: ridges are not written
  • a const reference wrapper of a container of integers that will be written by this function. Each element in the container is an index in the sequence of points.
  • Type: a std::reference_wrapper to a model of SequenceContainer with an integer type as value type.
  • Default: corners are not written
Returns
true if the writing was successful, false otherwise.
See also
Medit File Format