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

Detailed Description

Wrapper for glTF scene for file output.

Source files

Definition at line 58 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 34 of file foamGltfSceneWriter.C.

References sceneWriter::open().

Here is the call graph for this function:

◆ ~sceneWriter()

Destructor - calls close()

Definition at line 45 of file foamGltfSceneWriter.C.

Member Function Documentation

◆ operator=()

void operator= ( const sceneWriter )
delete

No copy assignment.

◆ valid()

bool valid ( ) const
noexcept

True if output file and scene exist.

Definition at line 53 of file foamGltfSceneWriter.C.

◆ path()

const Foam::fileName & path ( ) const

The json file name. Empty with !valid()

Definition at line 59 of file foamGltfSceneWriter.C.

◆ getScene() [1/2]

const Foam::glTF::scene & getScene ( ) const

Const access to the scene. Error if valid() is not true!

Definition at line 65 of file foamGltfSceneWriter.C.

◆ getScene() [2/2]

Foam::glTF::scene & getScene ( )

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

Definition at line 71 of file foamGltfSceneWriter.C.

◆ open()

void open ( const fileName outputFile)

Flush, output and open a new file for output.

Definition at line 77 of file foamGltfSceneWriter.C.

References fileName::ext(), Foam::isDir(), fileName::lessExt(), Foam::mkDir(), and fileName::path().

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 95 of file foamGltfSceneWriter.C.


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