CGAL 5.6.3 - 3D Point Set

Loading...
Searching...
No Matches
Functions
Input/Output (OFF)
3D Point Set Reference » Input/Output

##

I/O Functions for the Object File Format (OFF).

## Functions
template<typename Point , typename Vector >
bool | CGAL::IO::read_OFF (std::istream &is, CGAL::Point_set_3< Point, Vector > &point_set)
| reads the content of an input stream in the Object File Format (OFF) into a point set.
template<typename Point , typename Vector >
bool | CGAL::IO::read_OFF (const std::string &fname, CGAL::Point_set_3< Point, Vector > &point_set)
| reads the content of an input file in the Object File Format (OFF) into a point set.
template<typename Point , typename Vector , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool | CGAL::IO::write_OFF (std::ostream &os, const CGAL::Point_set_3< Point, Vector > &point_set, const NamedParameters &np=parameters::default_values())
| writes the content of a point set into an output stream in the Object File Format (OFF).
template<typename Point , typename Vector , typename NamedParameters = CGAL::parameters::Default_named_parameters>
bool | CGAL::IO::write_OFF (const std::string &fname, const CGAL::Point_set_3< Point, Vector > &point_set, const NamedParameters &np=parameters::default_values())
| writes the content of a point set into an output file in the Object File Format (OFF).

## Function Documentation

## ◆ read_OFF() [1/2]

template<typename Point , typename Vector >

bool CGAL::IO::read_OFF | ( | const std::string & | fname,
|  | CGAL::Point_set_3< Point, Vector > & | point_set
| ) |  |

`#include <CGAL/Point_set_3/IO/OFF.h>`

reads the content of an input file in the Object File Format (OFF) into a point set.

If normals are present in the input (NOFF), a normal map will be created and filled.

Parameters

  fname | the path to the input file
  point_set | the point set

Returns
  `true` if the reading was successful, `false` otherwise.

## ◆ read_OFF() [2/2]

template<typename Point , typename Vector >

bool CGAL::IO::read_OFF | ( | std::istream & | is,
|  | CGAL::Point_set_3< Point, Vector > & | point_set
| ) |  |

`#include <CGAL/Point_set_3/IO/OFF.h>`

reads the content of an input stream in the Object File Format (OFF) into a point set.

If normals are present in the input (NOFF), a normal map will be created and filled.

Parameters

  is | the input stream
  point_set | the point set

Returns
  `true` if the reading was successful, `false` otherwise.

## ◆ write_OFF() [1/2]

template<typename Point , typename Vector , typename NamedParameters = CGAL::parameters::Default_named_parameters>

bool CGAL::IO::write_OFF | ( | const std::string & | fname,
|  | const CGAL::Point_set_3< Point, Vector > & | point_set,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/Point_set_3/IO/OFF.h>`

writes the content of a point set into an output file in the Object File Format (OFF).

If it exists, the normal map associated to the point set is inserted in the file.

Template Parameters

  Point | the point type of the `Point_set_3`
  Vector | the vector type of the `Point_set_3`
  NamedParameters | a sequence of Named Parameters

Parameters

  fname | the path to the output file
  point_set | the point set
  np | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  a parameter used to set the precision (i.e. how many digits are generated) of the output stream Type: int Default: `6` |

Returns
  `true` if the writing was successful, `false` otherwise.

## ◆ write_OFF() [2/2]

template<typename Point , typename Vector , typename NamedParameters = CGAL::parameters::Default_named_parameters>

bool CGAL::IO::write_OFF | ( | std::ostream & | os,
|  | const CGAL::Point_set_3< Point, Vector > & | point_set,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/Point_set_3/IO/OFF.h>`

writes the content of a point set into an output stream in the Object File Format (OFF).

If it exists, the normal map associated to the point set is inserted in the stream.

Template Parameters

  Point | the point type of the `Point_set_3`
  Vector | the vector type of the `Point_set_3`
  NamedParameters | a sequence of Named Parameters

Parameters

  os | the output stream
  point_set | the point set
  np | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  a parameter used to set the precision (i.e. how many digits are generated) of the output stream Type: int Default: the precision of the stream `os` |

Returns
  `true` if the writing was successful, `false` otherwise.