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 Ostream & writeFace(const UList< point > &points, const bool lines=true)
Write face loop points with lines/filled-polygon.
ClassNameNoDebug("OBJstream")
Declare type-name (no debug switch)
A triangle primitive used to calculate face normals and swept volumes. Uses referred points...
A class for handling file names.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
A face is a list of labels corresponding to mesh vertices.
virtual Ostream & write(const char c) override
Write character.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
OBJstream(const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())
Construct from pathname (ASCII, uncompressed)
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
A simple container for options an IOstream can normally have.
label nVertices() const noexcept
Return the number of vertices written.
~OBJstream()=default
Destructor.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression...
Ostream & writeComment(const std::string &str)
Write comment (with '# ' prefix)
const dimensionedScalar e
Elementary charge.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A class for handling words, derived from Foam::string.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool write(const token &tok) override
Write token to stream or otherwise handle it.
Ostream & writeLine(const point &p0, const point &p1)
Write line joining two points.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
An OFstream that keeps track of vertices and provides convenience output methods for OBJ files...
const dimensionedScalar c
Speed of light in a vacuum.
streamFormat
Data format (ascii | binary)
Standard boundBox with extra functionality for use in octree.
const volScalarField & p0