sceneWriter Class Reference

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 fileNamepath () const
 The json file name. Empty with !good() More...
 
const scenegetScene () const
 Const access to the scene. Error if good() is not true! More...
 
scenegetScene ()
 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...
 

Detailed Description

Wrapper for glTF scene for file output.

Source files

Definition at line 54 of file foamGltfSceneWriter.H.

Constructor & Destructor Documentation

◆ sceneWriter() [1/3]

sceneWriter ( const sceneWriter )
delete

No copy construct.

◆ sceneWriter() [2/3]

sceneWriter ( )
default

Default construct.

◆ sceneWriter() [3/3]

sceneWriter ( const fileName outputFile)
explicit

Construct and open with given file name.

Definition at line 27 of file foamGltfSceneWriter.C.

References sceneWriter::open().

Here is the call graph for this function:

◆ ~sceneWriter()

Destructor - calls close()

Definition at line 38 of file foamGltfSceneWriter.C.

Member Function Documentation

◆ operator=()

void operator= ( const sceneWriter )
delete

No copy assignment.

◆ good()

bool good ( ) const
noexcept

True if output file and scene exist.

Definition at line 46 of file foamGltfSceneWriter.C.

Referenced by sceneWriter::valid().

Here is the caller graph for this function:

◆ path()

const Foam::fileName & path ( ) const

The json file name. Empty with !good()

Definition at line 52 of file foamGltfSceneWriter.C.

References fileName::null.

◆ getScene() [1/2]

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.

◆ getScene() [2/2]

Foam::glTF::scene & getScene ( )

Non-const access to the scene. Error if good() is not true!

Definition at line 64 of file foamGltfSceneWriter.C.

◆ open()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close()

void close ( )

Write scene and close file.

Definition at line 88 of file foamGltfSceneWriter.C.

◆ valid()

bool valid ( ) const
inlinenoexcept

Same as good()

Definition at line 139 of file foamGltfSceneWriter.H.

References sceneWriter::good().

Here is the call graph for this function:

The documentation for this class was generated from the following files: