40 void Foam::OBJstream::writeAndCheck(
const char c)
46 else if (startOfLine_)
68 OFstream(pathname, format, version, compression),
91 for (
const char*
p = str; *
p !=
'\0'; ++
p)
111 for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter)
151 const std::string& str,
162 string::const_iterator iter = str.begin();
211 write(
"v ") << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z()
221 <<
' ' << n.
z() <<
nl;
230 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
239 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
253 write(
"l ") << nVertices_-1 <<
' ' << nVertices_ <<
nl;
264 label start = nVertices_;
271 for (
int i = 0; i < 3; i++)
273 write(
' ') << start+1+i;
275 write(
' ') << start+1 <<
'\n';
280 for (
int i = 0; i < 3; i++)
282 write(
' ') << start+1+i;
297 label start = nVertices_;
307 write(
' ') << start+1+i;
309 write(
' ') << start+1 <<
'\n';
316 write(
' ') << start+1+i;
335 const pointField& localPoints = pp.localPoints();
336 const faceList& localFaces = pp.localFaces();
338 label start = nVertices_;
342 write(localPoints[i]);
350 const edge&
e = edges[edgeI];
352 write(
"l ") << start+e[0]+1 <<
' ' << start+e[1]+1 <<
nl;
359 const face& f = localFaces[facei];
363 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.
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...
OBJstream(const fileName &pathname, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
Construct from pathname.
defineTypeNameAndDebug(combustionModel, 0)
virtual Ostream & write(const token &)
Write next token to stream.
const Point & a() const
Return first vertex.
const Point & b() const
Return second vertex.
PointRef end() const
Return second vertex.
const doubleScalar e
Elementary charge.
virtual Ostream & writeQuoted(const std::string &, const bool quoted=true)
Write std::string surrounded by quotes.