39#ifndef Foam_OBJstream_H
40#define Foam_OBJstream_H
75 inline void vertex_state(
const char c);
130 const bool quoted=
true
140 virtual Ostream&
write(
const std::string& str)
override;
181 const bool lines =
true
189 const bool lines =
true
197 const bool lines =
true
206 const bool compact =
false
A simple container for options an IOstream can normally have.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression.
streamFormat
Data format (ascii | binary | coherent).
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED).
@ UNCOMPRESSED
compression = false
OBJstream(const fileName &pathname, IOstreamOption::streamFormat fmt, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
Construct from pathname, format (uncompressed).
label nVertices() const noexcept
Return the number of vertices written.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
~OBJstream()=default
Destructor.
Ostream & writeFace(const UList< point > &points, const bool lines=true)
Write face loop points with lines/filled-polygon.
Ostream & writeLine(const point &p0, const point &p1)
Write line joining two points.
Ostream & writeComment(const std::string &str)
Write comment (with '# ' prefix).
ClassNameNoDebug("OBJstream")
Declare type-name (no debug switch).
OBJstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())
Construct from pathname (ASCII, uncompressed).
OFstream(std::nullptr_t)
Construct a null output file stream that behaves like /dev/null.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true)=0
Write character/string content, with/without surrounding quotes.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
Standard boundBox with extra functionality for use in octree.
A class for handling words, derived from Foam::string.
#define ClassNameNoDebug(TypeNameString)
Add typeName information from argument TypeNameString to a class.
const volScalarField & p0
line< point, const point & > linePointRef
A line using referred points.
vector point
Point is a vector.
triangle< point, const point & > triPointRef
A triangle using referred points.
vectorField pointField
pointField is a vectorField.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.