39 void Foam::OBJstream::writeAndCheck(
const char c)
45 else if (startOfLine_)
67 OFstream(filePath, format, version, compression),
90 for (
const char*
p = str; *
p !=
'\0'; ++
p)
110 for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter)
150 const std::string& str,
161 string::const_iterator iter = str.begin();
210 write(
"v ") << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z()
220 <<
' ' << n.
z() <<
nl;
229 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
238 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
252 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
263 label start = nVertices_;
270 for (
int i = 0; i < 3; i++)
272 write(
' ') << start+1+i;
274 write(
' ') << start+1 <<
'\n';
279 for (
int i = 0; i < 3; i++)
281 write(
' ') << start+1+i;
296 label start = nVertices_;
306 write(
' ') << start+1+i;
308 write(
' ') << start+1 <<
'\n';
315 write(
' ') << start+1+i;
334 const pointField& localPoints = pp.localPoints();
335 const faceList& localFaces = pp.localFaces();
337 label start = nVertices_;
341 write(localPoints[i]);
349 const edge&
e = edges[edgeI];
351 write(
"l ") << start+e[0]+1 <<
' ' << start+e[1]+1 <<
nl;
358 const face& f = localFaces[facei];
362 write(
' ') << start+f[i]+1;
#define forAll(list, i)
Loop across all elements in list.
A triangle primitive used to calculate face areas and swept volumes.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
const Point & c() const
Return third vertex.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual Ostream & write(const char)
Write character.
A list of faces which address into the list of points.
A List obtained as a section of another List.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A class for handling words, derived from string.
streamFormat
Enumeration for the format of data in the stream.
PointRef start() const
Return first vertex.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
defineTypeNameAndDebug(combustionModel, 0)
virtual Ostream & write(const char)
Write character.
const Point & a() const
Return first vertex.
const Point & b() const
Return second vertex.
PointRef end() const
Return second vertex.
OBJstream(const fileName &filePath, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
Construct from filePath.
const doubleScalar e
Elementary charge.
virtual Ostream & writeQuoted(const std::string &, const bool quoted=true)
Write std::string surrounded by quotes.