41#ifndef foam_gltf_object_H
42#define foam_gltf_object_H
87 template<
class Type1,
class Type2>
88 void addData(
const Type1& fld1,
const Type2& fld2);
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const word & name() const noexcept
Return const access to the name.
const Foam::List< float > & data() const noexcept
Return const access to the data buffer.
object()
Default construct.
void addData(const Type &fld)
Add data to the buffer.
A class for handling words, derived from Foam::string.
Namespace for handling glTF creation. https://www.khronos.org/registry/glTF/.