Wrapper for glTF scene for file output. More...
Public Member Functions | |
sceneWriter (const sceneWriter &)=delete | |
No copy construct. More... | |
void | operator= (const sceneWriter &)=delete |
No copy assignment. More... | |
sceneWriter ()=default | |
Default construct. More... | |
sceneWriter (const fileName &outputFile) | |
Construct and open with given file name. More... | |
~sceneWriter () | |
Destructor - calls close() More... | |
bool | good () const noexcept |
True if output file and scene exist. More... | |
const fileName & | path () const |
The json file name. Empty with !good() More... | |
const scene & | getScene () const |
Const access to the scene. Error if good() is not true! More... | |
scene & | getScene () |
Non-const access to the scene. Error if good() is not true! More... | |
void | open (const fileName &outputFile) |
Flush, output and open a new file for output. More... | |
void | close () |
Write scene and close file. More... | |
bool | valid () const noexcept |
Same as good() More... | |
Wrapper for glTF scene for file output.
Definition at line 54 of file foamGltfSceneWriter.H.
|
delete |
No copy construct.
|
default |
Default construct.
|
explicit |
Construct and open with given file name.
Definition at line 27 of file foamGltfSceneWriter.C.
References sceneWriter::open().
~sceneWriter | ( | ) |
Destructor - calls close()
Definition at line 38 of file foamGltfSceneWriter.C.
|
delete |
No copy assignment.
|
noexcept |
True if output file and scene exist.
Definition at line 46 of file foamGltfSceneWriter.C.
Referenced by sceneWriter::valid().
const Foam::fileName & path | ( | ) | const |
The json file name. Empty with !good()
Definition at line 52 of file foamGltfSceneWriter.C.
References fileName::null.
const Foam::glTF::scene & getScene | ( | ) | const |
Const access to the scene. Error if good() is not true!
Definition at line 58 of file foamGltfSceneWriter.C.
Foam::glTF::scene & getScene | ( | ) |
Non-const access to the scene. Error if good() is not true!
Definition at line 64 of file foamGltfSceneWriter.C.
void open | ( | const fileName & | outputFile | ) |
Flush, output and open a new file for output.
Definition at line 70 of file foamGltfSceneWriter.C.
References Foam::isDir(), Foam::mkDir(), fileName::path(), and fileName::replace_ext().
Referenced by sceneWriter::sceneWriter().
void close | ( | ) |
Write scene and close file.
Definition at line 88 of file foamGltfSceneWriter.C.
|
inlinenoexcept |
Same as good()
Definition at line 139 of file foamGltfSceneWriter.H.
References sceneWriter::good().