39 void Foam::OBJstream::writeAndCheck(
const char c)
45 else if (startOfLine_)
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;
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.
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
void size(const label)
Override size to be inconsistent with allocated storage.
OFstream which keeps track of vertices.
virtual Ostream & writeQuoted(const std::string &, const bool quoted=true)
Write std::string surrounded by quotes.
virtual Ostream & write(const char)=0
Inherit write from Ostream.
OBJstream(const fileName &filePath, streamFormat format=ASCII, versionNumber version=currentVersion, compressionType compression=UNCOMPRESSED)
Construct from filePath.
virtual Ostream & write(const char)
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
A List obtained as a section of another List.
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 point labels. The functionality it provides supports the discretisation on a...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
A triangle primitive used to calculate face areas and swept volumes.
A class for handling words, derived from string.
const dimensionedScalar c
Speed of light in a vacuum.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
defineTypeNameAndDebug(combustionModel, 0)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
word format(conversionProperties.lookup("format"))