1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "WRLsurfaceFormatCore.H"
29 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
31 void Foam::fileFormats::WRLsurfaceFormatCore::writeHeader
34 const pointField& pointLst,
36 const UList<surfZone>& zoneLst
39 os << "#VRML V2.0 utf8" << nl
41 << "# written " << clock::dateTime().c_str() << nl
42 << "# points : " << pointLst.size() << nl
43 << "# faces : " << nFaces << nl
44 << "# zones : " << zoneLst.size() << nl;
46 // Print zone names as comment
47 forAll(zoneLst, zoneI)
49 os << "# " << zoneI << " " << zoneLst[zoneI].name()
50 << " (nFaces: " << zoneLst[zoneI].size() << ")" << nl;
55 void Foam::fileFormats::WRLsurfaceFormatCore::writeAppearance
61 " appearance Appearance {\n"
62 " material Material {\n"
63 " diffuseColor 0.8 0.8 0.8\n"
64 " specularColor 1.0 1.0 1.0\n"
67 " }\n" // end material
68 " }\n"; // end appearance
73 // ************************************************************************* //