Loading...
Searching...
No Matches
X3DsurfaceFormat.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2024 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::fileFormats::X3DsurfaceFormat
29
30Description
31 Provide a means of writing x3d format.
32
33 Output stream options:
34 - ASCII only
35 - compression on/off
36
37 Output dictionary options: ignored
38
39SourceFiles
40 X3DsurfaceFormat.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef Foam_X3DsurfaceFormat_H
45#define Foam_X3DsurfaceFormat_H
46
47#include "MeshedSurface.H"
48#include "MeshedSurfaceProxy.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56namespace fileFormats
57{
58
59/*---------------------------------------------------------------------------*\
60 Class fileFormats::X3DsurfaceFormat Declaration
61\*---------------------------------------------------------------------------*/
62
63template<class Face>
65:
66 public MeshedSurface<Face>,
68{
69public:
70
71 // Constructors
72
73 //- Default construct
74 X3DsurfaceFormat() = default;
75
76
77 //- Destructor
78 virtual ~X3DsurfaceFormat() = default;
79
80
81 // Static Functions
82
83 //- Write surface mesh components (by proxy) in X3D format
84 static void write
85 (
86 const fileName& filename,
87 const MeshedSurfaceProxy<Face>& surf,
88 IOstreamOption streamOpt = IOstreamOption(),
89 const dictionary& /*unused*/ = dictionary::null
90 );
91
92
93 // Member Functions
94
95 //- Write surface mesh to file (by proxy)
96 virtual void write
97 (
98 const fileName& name,
100 const dictionary& options = dictionary::null
101 ) const override
102 {
103 write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
104 }
105
106 //- Write surface mesh to file (by proxy)
107 virtual void write
108 (
109 const fileName& name,
110 const word& fileType, /* ignored */
111 IOstreamOption streamOpt = IOstreamOption(),
113 ) const override
114 {
115 write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
116 }
117};
118
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122} // End namespace fileFormats
123} // End namespace Foam
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127#ifdef NoRepository
128 #include "X3DsurfaceFormat.C"
129#endif
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133#endif
134
135// ************************************************************************* //
A simple container for options an IOstream can normally have.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
friend class MeshedSurface
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition dictionary.H:487
Internal class used by the X3DsurfaceFormat.
virtual ~X3DsurfaceFormat()=default
Destructor.
virtual void write(const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const override
Write surface mesh to file (by proxy).
X3DsurfaceFormat()=default
Default construct.
virtual void write(const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const override
Write surface mesh to file (by proxy).
A class for handling file names.
Definition fileName.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace to isolate specifics for file formats, and some common utilities.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
runTime write()