Main class to assemble glTF components into a scene. More...
Public Member Functions | |
scene () | |
template<class Type > | |
label | addField (const Type &fld, const word &name, const label target=-1) |
template<class Type > | |
label | addMesh (const Type &fld, const word &name) |
template<class Type > | |
label | addFieldToMesh (const Type &fld, const word &name, const label meshi) |
label | addColourToMesh (const vectorField &fld, const word &name, const label meshi, const scalarField &alpha=scalarField()) |
label | createAnimation (const word &name) |
void | addToAnimation (const label animationi, const label inputId, const label outputId, const label meshId, const string &interpolation="LINEAR") |
void | write (Ostream &os) |
template<class Type > | |
Foam::label | addField (const Type &fld, const word &name, const label target) |
template<class Type > | |
Foam::label | addMesh (const Type &fld, const word &name) |
template<class Type > | |
Foam::label | addFieldToMesh (const Type &fld, const word &name, const label meshi) |
Main class to assemble glTF components into a scene.
Definition at line 60 of file foamGltfScene.H.
scene | ( | ) |
Definition at line 26 of file foamGltfScene.C.
label addField | ( | const Type & | fld, |
const word & | name, | ||
const label | target = -1 |
||
) |
Referenced by scene::addMesh(), and gltfSetWriter< Type >::writeAnimateTracks().
label addMesh | ( | const Type & | fld, |
const word & | name | ||
) |
Referenced by gltfSetWriter< Type >::write(), gltfSetWriter< Type >::writeAnimateTracks(), and gltfSetWriter< Type >::writeStaticTracks().
label addFieldToMesh | ( | const Type & | fld, |
const word & | name, | ||
const label | meshi | ||
) |
Referenced by gltfSetWriter< Type >::write(), gltfSetWriter< Type >::writeAnimateTracks(), and gltfSetWriter< Type >::writeStaticTracks().
Foam::label addColourToMesh | ( | const vectorField & | fld, |
const word & | name, | ||
const label | meshi, | ||
const scalarField & | alpha = scalarField() |
||
) |
Definition at line 40 of file foamGltfScene.C.
References Foam::abort(), Foam::constant::atomic::alpha, Foam::glTF::ARRAY_BUFFER, Foam::FatalError, FatalErrorInFunction, fld, Foam::glTF::key(), and Foam::name().
Referenced by gltfSetWriter< Type >::write(), gltfSetWriter< Type >::writeAnimateTracks(), and gltfSetWriter< Type >::writeStaticTracks().
Foam::label createAnimation | ( | const word & | name | ) |
Definition at line 87 of file foamGltfScene.C.
References Foam::name().
Referenced by gltfSetWriter< Type >::writeAnimateTracks().
void addToAnimation | ( | const label | animationi, |
const label | inputId, | ||
const label | outputId, | ||
const label | meshId, | ||
const string & | interpolation = "LINEAR" |
||
) |
Definition at line 95 of file foamGltfScene.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by gltfSetWriter< Type >::writeAnimateTracks().
void write | ( | Ostream & | os | ) |
Definition at line 132 of file foamGltfScene.C.
References IOstreamOption::BINARY, fileName::concat(), Foam::decrIndent(), Foam::endl(), forAll, Foam::incrIndent(), Foam::indent(), fileName::name(), Foam::nl, os(), OFstream::stdStream(), and Ostream::write().
Referenced by gltfSetWriter< Type >::write(), gltfSetWriter< Type >::writeAnimateTracks(), and gltfSetWriter< Type >::writeStaticTracks().
Foam::label addField | ( | const Type & | fld, |
const word & | name, | ||
const label | target | ||
) |
Definition at line 23 of file foamGltfSceneTemplates.C.
References fld, and Foam::name().
Foam::label addMesh | ( | const Type & | fld, |
const word & | name | ||
) |
Definition at line 52 of file foamGltfSceneTemplates.C.
References mesh::accessorId(), scene::addField(), Foam::glTF::ARRAY_BUFFER, fld, Foam::glTF::key(), and Foam::name().
Foam::label addFieldToMesh | ( | const Type & | fld, |
const word & | name, | ||
const label | meshi | ||
) |
Definition at line 66 of file foamGltfSceneTemplates.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, fld, and Foam::name().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.