glTF writer context from XCAF document. More...
#include <RWGltf_CafWriter.hxx>

Data Structures | |
| struct | Hasher |
| struct | Mesh |
| Mesh. More... | |
| struct | RWGltf_StyledShape |
| Shape + Style pair. More... | |
Public Member Functions | |
| RWGltf_CafWriter (const TCollection_AsciiString &theFile, Standard_Boolean theIsBinary) | |
| Main constructor. | |
| virtual | ~RWGltf_CafWriter () |
| Destructor. | |
| const RWMesh_CoordinateSystemConverter & | CoordinateSystemConverter () const |
| Return transformation from OCCT to glTF coordinate system. | |
| RWMesh_CoordinateSystemConverter & | ChangeCoordinateSystemConverter () |
| Return transformation from OCCT to glTF coordinate system. | |
| void | SetCoordinateSystemConverter (const RWMesh_CoordinateSystemConverter &theConverter) |
| Set transformation from OCCT to glTF coordinate system. | |
| bool | IsBinary () const |
| Return flag to write into binary glTF format (.glb), specified within class constructor. | |
| RWGltf_WriterTrsfFormat | TransformationFormat () const |
| Return preferred transformation format for writing into glTF file; RWGltf_WriterTrsfFormat_Compact by default. | |
| void | SetTransformationFormat (RWGltf_WriterTrsfFormat theFormat) |
| Set preferred transformation format for writing into glTF file. | |
| RWMesh_NameFormat | NodeNameFormat () const |
| Return name format for exporting Nodes; RWMesh_NameFormat_InstanceOrProduct by default. | |
| void | SetNodeNameFormat (RWMesh_NameFormat theFormat) |
| Set name format for exporting Nodes. | |
| RWMesh_NameFormat | MeshNameFormat () const |
| Return name format for exporting Meshes; RWMesh_NameFormat_Product by default. | |
| void | SetMeshNameFormat (RWMesh_NameFormat theFormat) |
| Set name format for exporting Meshes. | |
| bool | IsForcedUVExport () const |
| Return TRUE to export UV coordinates even if there are no mapped texture; FALSE by default. | |
| void | SetForcedUVExport (bool theToForce) |
| Set flag to export UV coordinates even if there are no mapped texture; FALSE by default. | |
| const XCAFPrs_Style & | DefaultStyle () const |
| Return default material definition to be used for nodes with only color defined. | |
| void | SetDefaultStyle (const XCAFPrs_Style &theStyle) |
| Set default material definition to be used for nodes with only color defined. | |
| Standard_Boolean | ToEmbedTexturesInGlb () |
| Return flag to write image textures into GLB file (binary gltf export); TRUE by default. When set to FALSE, texture images will be written as separate files. Has no effect on writing into non-binary format. | |
| void | SetToEmbedTexturesInGlb (Standard_Boolean theToEmbedTexturesInGlb) |
| Set flag to write image textures into GLB file (binary gltf export). | |
| bool | ToMergeFaces () const |
| Return flag to merge faces within a single part; FALSE by default. | |
| void | SetMergeFaces (bool theToMerge) |
| Set flag to merge faces within a single part. May reduce JSON size thanks to smaller number of primitive arrays. | |
| bool | ToSplitIndices16 () const |
| Return flag to prefer keeping 16-bit indexes while merging face; FALSE by default. | |
| void | SetSplitIndices16 (bool theToSplit) |
| Set flag to prefer keeping 16-bit indexes while merging face. Has effect only with ToMergeFaces() option turned ON. May reduce binary data size thanks to smaller triangle indexes. | |
| bool | ToParallel () const |
| Return TRUE if multithreaded optimizations are allowed; FALSE by default. | |
| void | SetParallel (bool theToParallel) |
| Setup multithreaded execution. | |
| const RWGltf_DracoParameters & | CompressionParameters () const |
| Return Draco parameters. | |
| void | SetCompressionParameters (const RWGltf_DracoParameters &theDracoParameters) |
| Set Draco parameters. | |
| virtual bool | Perform (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRootLabels, const TColStd_MapOfAsciiString *theLabelFilter, const TColStd_IndexedDataMapOfStringString &theFileInfo, const Message_ProgressRange &theProgress) |
| Write glTF file and associated binary file. Triangulation data should be precomputed within shapes! | |
| virtual bool | Perform (const Handle< TDocStd_Document > &theDocument, const TColStd_IndexedDataMapOfStringString &theFileInfo, const Message_ProgressRange &theProgress) |
| Write glTF file and associated binary file. Triangulation data should be precomputed within shapes! | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
| Standard_Integer | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. | |
| Standard_Integer | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Protected Types | |
| typedef NCollection_IndexedDataMap< RWGltf_StyledShape, Handle< RWGltf_GltfFaceList >, Hasher > | ShapeToGltfFaceMap |
Protected Member Functions | |
| virtual bool | writeBinData (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRootLabels, const TColStd_MapOfAsciiString *theLabelFilter, const Message_ProgressRange &theProgress) |
| Write binary data file with triangulation data. Triangulation data should be precomputed within shapes! | |
| virtual bool | writeJson (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRootLabels, const TColStd_MapOfAsciiString *theLabelFilter, const TColStd_IndexedDataMapOfStringString &theFileInfo, const Message_ProgressRange &theProgress) |
| Write JSON file with glTF structure (should be called after writeBinData()). | |
| virtual Standard_Boolean | toSkipShape (const RWMesh_ShapeIterator &theShapeIter) const |
| Return TRUE if face shape should be skipped (e.g. because it is invalid or empty). | |
| virtual Standard_Boolean | hasTriangulation (const RWGltf_GltfFace &theShape) const |
| Return TRUE if shape has triangulation (not vertex or edge). | |
| virtual TCollection_AsciiString | formatName (RWMesh_NameFormat theFormat, const TDF_Label &theLabel, const TDF_Label &theRefLabel) const |
| Generate name for specified labels. | |
| virtual void | saveNodes (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_ShapeIterator &theShapeIter, Standard_Integer &theAccessorNb, const std::shared_ptr< RWGltf_CafWriter::Mesh > &theMesh) const |
| Write mesh nodes into binary file. | |
| virtual void | saveNormals (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_FaceIterator &theFaceIter, Standard_Integer &theAccessorNb, const std::shared_ptr< RWGltf_CafWriter::Mesh > &theMesh) const |
| Write mesh normals into binary file. | |
| virtual void | saveTextCoords (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_FaceIterator &theFaceIter, Standard_Integer &theAccessorNb, const std::shared_ptr< RWGltf_CafWriter::Mesh > &theMesh) const |
| Write mesh texture UV coordinates into binary file. | |
| virtual void | saveIndices (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_ShapeIterator &theShapeIter, Standard_Integer &theAccessorNb, const std::shared_ptr< RWGltf_CafWriter::Mesh > &theMesh) |
| Write mesh indexes into binary file. | |
| virtual void | saveTriangleIndices (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_FaceIterator &theFaceIter, const std::shared_ptr< RWGltf_CafWriter::Mesh > &theMesh) |
| Write triangle indexes into binary file. | |
| virtual void | saveEdgeIndices (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_EdgeIterator &theEdgeIter) |
| Write edge indexes into binary file. | |
| virtual void | saveVertexIndices (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, const RWMesh_VertexIterator &theVertexIter) |
| Write vertex indexes into binary file. | |
| virtual void | writePositions (const RWGltf_GltfFace &theGltfFace) |
| Write bufferView for vertex positions within RWGltf_GltfRootElement_Accessors section. | |
| virtual void | writeNormals (const RWGltf_GltfFace &theGltfFace) |
| Write bufferView for vertex normals within RWGltf_GltfRootElement_Accessors section. | |
| virtual void | writeTextCoords (const RWGltf_GltfFace &theGltfFace) |
| Write bufferView for vertex texture coordinates within RWGltf_GltfRootElement_Accessors section. | |
| virtual void | writeIndices (const RWGltf_GltfFace &theGltfFace) |
| Write bufferView for triangle indexes within RWGltf_GltfRootElement_Accessors section. | |
| virtual void | writeAccessors (const RWGltf_GltfSceneNodeMap &theSceneNodeMap) |
| Write RWGltf_GltfRootElement_Accessors section. | |
| virtual void | writeAnimations () |
| Write RWGltf_GltfRootElement_Animations section (reserved). | |
| virtual void | writeAsset (const TColStd_IndexedDataMapOfStringString &theFileInfo) |
| Write RWGltf_GltfRootElement_Asset section. | |
| virtual void | writeBufferViews (const Standard_Integer theBinDataBufferId) |
| Write RWGltf_GltfRootElement_BufferViews section. | |
| virtual void | writeBuffers () |
| Write RWGltf_GltfRootElement_Buffers section. | |
| virtual void | writeExtensions () |
| Write RWGltf_GltfRootElement_ExtensionsUsed/RWGltf_GltfRootElement_ExtensionsRequired sections (reserved). | |
| virtual void | writeImages (const RWGltf_GltfSceneNodeMap &theSceneNodeMap) |
| Write RWGltf_GltfRootElement_Images section. | |
| virtual void | writeMaterials (const RWGltf_GltfSceneNodeMap &theSceneNodeMap) |
| Write RWGltf_GltfRootElement_Materials section. | |
| virtual void | writeMaterial (RWMesh_ShapeIterator &theShapeIter, Standard_Boolean &theIsStarted) |
| Write RWGltf_GltfRootElement_Materials section. | |
| virtual void | writeMeshes (const RWGltf_GltfSceneNodeMap &theSceneNodeMap) |
| Write RWGltf_GltfRootElement_Meshes section. | |
| virtual void | writePrimArray (const RWGltf_GltfFace &theGltfFace, const TCollection_AsciiString &theName, const int theDracoBufInd, bool &theToStartPrims) |
| Write a primitive array to RWGltf_GltfRootElement_Meshes section. | |
| virtual void | writeNodes (const Handle< TDocStd_Document > &theDocument, const TDF_LabelSequence &theRootLabels, const TColStd_MapOfAsciiString *theLabelFilter, const RWGltf_GltfSceneNodeMap &theSceneNodeMap, NCollection_Sequence< Standard_Integer > &theSceneRootNodeInds) |
| Write RWGltf_GltfRootElement_Nodes section. | |
| virtual void | writeSamplers () |
| Write RWGltf_GltfRootElement_Samplers section. | |
| virtual void | writeScene (const Standard_Integer theDefSceneId) |
| Write RWGltf_GltfRootElement_Scene section. | |
| virtual void | writeScenes (const NCollection_Sequence< Standard_Integer > &theSceneRootNodeInds) |
| Write RWGltf_GltfRootElement_Scenes section. | |
| virtual void | writeSkins () |
| Write RWGltf_GltfRootElement_Skins section (reserved). | |
| virtual void | writeTextures (const RWGltf_GltfSceneNodeMap &theSceneNodeMap) |
| Write RWGltf_GltfRootElement_Textures section. | |
| virtual void | writeExtrasAttributes (const Handle< TDataStd_NamedData > &theNamedData) |
| Write nodes.extras section with key-value attributes. | |
| virtual void | dispatchShapes (const XCAFPrs_DocumentNode &theDocNode, const Message_ProgressScope &thePSentryBin, NCollection_DataMap< XCAFPrs_Style, Handle< RWGltf_GltfFace > > &theMergedFaces, RWMesh_ShapeIterator &theShapeIter) |
| Dispatch shapes. | |
| bool | writeShapesToBin (RWGltf_GltfFace &theGltfFace, std::ostream &theBinFile, RWMesh_ShapeIterator &theShapeIter, Standard_Integer &theAccessorNb, const std::shared_ptr< RWGltf_CafWriter::Mesh > &theMesh, const RWGltf_GltfArrayType theArrType, const Message_ProgressScope &thePSentryBin) |
| Write shape into binary file. | |
| virtual void | writeShapes (RWMesh_ShapeIterator &theShapeIter, Standard_Integer &theDracoBufInd, Standard_Boolean &theToStartPrims, const TCollection_AsciiString &theNodeName, NCollection_Map< Handle< RWGltf_GltfFaceList > > &theWrittenShapes, NCollection_IndexedDataMap< int, int > &theDracoBufIndMap) |
| Write shapes to RWGltf_GltfRootElement_Meshes section. | |
Protected Attributes | |
| TCollection_AsciiString | myFile |
| output glTF file | |
| TCollection_AsciiString | myBinFileNameFull |
| output file with binary data (full path) | |
| TCollection_AsciiString | myBinFileNameShort |
| output file with binary data (short path) | |
| RWGltf_WriterTrsfFormat | myTrsfFormat |
| transformation format to write into glTF file | |
| RWMesh_NameFormat | myNodeNameFormat |
| name format for exporting Nodes | |
| RWMesh_NameFormat | myMeshNameFormat |
| name format for exporting Meshes | |
| Standard_Boolean | myIsBinary |
| flag to write into binary glTF format (.glb) | |
| Standard_Boolean | myIsForcedUVExport |
| export UV coordinates even if there are no mapped texture | |
| Standard_Boolean | myToEmbedTexturesInGlb |
| flag to write image textures into GLB file | |
| Standard_Boolean | myToMergeFaces |
| flag to merge faces within a single part | |
| Standard_Boolean | myToSplitIndices16 |
| flag to prefer keeping 16-bit indexes while merging face | |
| RWMesh_CoordinateSystemConverter | myCSTrsf |
| transformation from OCCT to glTF coordinate system | |
| XCAFPrs_Style | myDefaultStyle |
| default material definition to be used for nodes with only color defined | |
| std::shared_ptr< RWGltf_GltfOStreamWriter > | myWriter |
| JSON writer. | |
| Handle< RWGltf_GltfMaterialMap > | myMaterialMap |
| map of defined materials | |
| RWGltf_GltfBufferView | myBuffViewPos |
| current buffer view with nodes positions | |
| RWGltf_GltfBufferView | myBuffViewNorm |
| current buffer view with nodes normals | |
| RWGltf_GltfBufferView | myBuffViewTextCoord |
| current buffer view with nodes UV coordinates | |
| RWGltf_GltfBufferView | myBuffViewInd |
| current buffer view with triangulation indexes | |
| ShapeToGltfFaceMap | myBinDataMap |
| map for TopoDS_Face to glTF face (merging duplicates) | |
| int64_t | myBinDataLen64 |
| length of binary file | |
| std::vector< RWGltf_GltfBufferView > | myBuffViewsDraco |
| vector of buffers view with compression data | |
| Standard_Boolean | myToParallel |
| flag to use multithreading; FALSE by default | |
| RWGltf_DracoParameters | myDracoParameters |
| Draco parameters. | |
Additional Inherited Members | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
glTF writer context from XCAF document.
|
protected |
| RWGltf_CafWriter::RWGltf_CafWriter | ( | const TCollection_AsciiString & | theFile, |
| Standard_Boolean | theIsBinary ) |
Main constructor.
| [in] | theFile | path to output glTF file |
| [in] | theIsBinary | flag to write into binary glTF format (.glb) |
|
virtual |
Destructor.
|
inline |
Return transformation from OCCT to glTF coordinate system.
|
inline |
Return Draco parameters.
|
inline |
Return transformation from OCCT to glTF coordinate system.
|
inline |
Return default material definition to be used for nodes with only color defined.
|
protectedvirtual |
Dispatch shapes.
| [in] | theDocNode | Document node containing shape data |
| [in] | thePSentryBin | Progress scope for the operation |
| [in,out] | theMergedFaces | Data map to store merged faces |
| [in,out] | theShapeIter | Shape iterator to traverse shapes |
|
protectedvirtual |
Generate name for specified labels.
| [in] | theFormat | name format to apply |
| [in] | theLabel | instance label |
| [in] | theRefLabel | product label |
|
protectedvirtual |
Return TRUE if shape has triangulation (not vertex or edge).
|
inline |
Return flag to write into binary glTF format (.glb), specified within class constructor.
|
inline |
Return TRUE to export UV coordinates even if there are no mapped texture; FALSE by default.
|
inline |
Return name format for exporting Meshes; RWMesh_NameFormat_Product by default.
|
inline |
Return name format for exporting Nodes; RWMesh_NameFormat_InstanceOrProduct by default.
|
virtual |
Write glTF file and associated binary file. Triangulation data should be precomputed within shapes!
| [in] | theDocument | input document |
| [in] | theFileInfo | map with file metadata to put into glTF header section |
| [in] | theProgress | optional progress indicator |
|
virtual |
Write glTF file and associated binary file. Triangulation data should be precomputed within shapes!
| [in] | theDocument | input document |
| [in] | theRootLabels | list of root shapes to export |
| [in] | theLabelFilter | optional filter with document nodes to export, with keys defined by XCAFPrs_DocumentExplorer::DefineChildId() and filled recursively (leaves and parent assembly nodes at all levels); when not NULL, all nodes not included into the map will be ignored |
| [in] | theFileInfo | map with file metadata to put into glTF header section |
| [in] | theProgress | optional progress indicator |
|
protectedvirtual |
Write edge indexes into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theEdgeIter | current edge to write |
|
protectedvirtual |
Write mesh indexes into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theShapeIter | current shape to write |
| [in] |
out] theAccessorNb last accessor index
| [in] |
out] theMesh mesh
|
protectedvirtual |
Write mesh nodes into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theShapeIter | current shape to write |
| [in] |
out] theAccessorNb last accessor index
| [in] |
out] theMesh mesh
|
protectedvirtual |
Write mesh normals into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theFaceIter | current face to write |
| [in] |
out] theAccessorNb last accessor index
| [in] |
out] theMesh mesh
|
protectedvirtual |
Write mesh texture UV coordinates into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theFaceIter | current face to write |
| [in] |
out] theAccessorNb last accessor index
| [in] |
out] theMesh mesh
|
protectedvirtual |
Write triangle indexes into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theFaceIter | current face to write |
| [in] |
out] theMesh mesh
|
protectedvirtual |
Write vertex indexes into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | output file to write into |
| [in] | theVertexIter | current vertex to write |
|
inline |
Set Draco parameters.
|
inline |
Set transformation from OCCT to glTF coordinate system.
|
inline |
Set default material definition to be used for nodes with only color defined.
|
inline |
Set flag to export UV coordinates even if there are no mapped texture; FALSE by default.
|
inline |
Set flag to merge faces within a single part. May reduce JSON size thanks to smaller number of primitive arrays.
|
inline |
Set name format for exporting Meshes.
|
inline |
Set name format for exporting Nodes.
|
inline |
Setup multithreaded execution.
|
inline |
Set flag to prefer keeping 16-bit indexes while merging face. Has effect only with ToMergeFaces() option turned ON. May reduce binary data size thanks to smaller triangle indexes.
|
inline |
Set flag to write image textures into GLB file (binary gltf export).
|
inline |
Set preferred transformation format for writing into glTF file.
|
inline |
Return flag to write image textures into GLB file (binary gltf export); TRUE by default. When set to FALSE, texture images will be written as separate files. Has no effect on writing into non-binary format.
|
inline |
Return flag to merge faces within a single part; FALSE by default.
|
inline |
Return TRUE if multithreaded optimizations are allowed; FALSE by default.
|
protectedvirtual |
Return TRUE if face shape should be skipped (e.g. because it is invalid or empty).
|
inline |
Return flag to prefer keeping 16-bit indexes while merging face; FALSE by default.
|
inline |
Return preferred transformation format for writing into glTF file; RWGltf_WriterTrsfFormat_Compact by default.
|
protectedvirtual |
Write RWGltf_GltfRootElement_Accessors section.
| [in] | theSceneNodeMap | ordered map of scene nodes |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Animations section (reserved).
|
protectedvirtual |
Write RWGltf_GltfRootElement_Asset section.
| [in] | theFileInfo | optional metadata to write into file header |
|
protectedvirtual |
Write binary data file with triangulation data. Triangulation data should be precomputed within shapes!
| [in] | theDocument | input document |
| [in] | theRootLabels | list of root shapes to export |
| [in] | theLabelFilter | optional filter with document nodes to export |
| [in] | theProgress | optional progress indicator |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Buffers section.
|
protectedvirtual |
Write RWGltf_GltfRootElement_BufferViews section.
| [in] | theBinDataBufferId | index of binary buffer with vertex data |
|
protectedvirtual |
Write RWGltf_GltfRootElement_ExtensionsUsed/RWGltf_GltfRootElement_ExtensionsRequired sections (reserved).
|
protectedvirtual |
Write nodes.extras section with key-value attributes.
| [in] | theNamedData | attributes map to process. |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Images section.
| [in] | theSceneNodeMap | ordered map of scene nodes |
| [out] | theMaterialMap | map of materials, filled with image files used by textures |
|
protectedvirtual |
Write bufferView for triangle indexes within RWGltf_GltfRootElement_Accessors section.
| [in] | theGltfFace | face definition to write |
|
protectedvirtual |
Write JSON file with glTF structure (should be called after writeBinData()).
| [in] | theDocument | input document |
| [in] | theRootLabels | list of root shapes to export |
| [in] | theLabelFilter | optional filter with document nodes to export |
| [in] | theFileInfo | map with file metadata to put into glTF header section |
| [in] | theProgress | optional progress indicator |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Materials section.
| [in] | theShapeIter | Shape iterator to traverse shapes |
| [out] | theIsStarted | Flag indicating that writing material has been started |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Materials section.
| [in] | theSceneNodeMap | ordered map of scene nodes |
| [out] | theMaterialMap | map of materials, filled with materials |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Meshes section.
| [in] | theSceneNodeMap | ordered map of scene nodes |
| [in] | theMaterialMap | map of materials |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Nodes section.
| [in] | theDocument | input document |
| [in] | theRootLabels | list of root shapes to export |
| [in] | theLabelFilter | optional filter with document nodes to export |
| [in] | theSceneNodeMap | ordered map of scene nodes |
| [out] | theSceneRootNodeInds | sequence of scene nodes pointing to root shapes (to be used for writeScenes()) |
|
protectedvirtual |
Write bufferView for vertex normals within RWGltf_GltfRootElement_Accessors section.
| [in] | theGltfFace | face definition to write |
|
protectedvirtual |
Write bufferView for vertex positions within RWGltf_GltfRootElement_Accessors section.
| [in] | theGltfFace | face definition to write |
|
protectedvirtual |
Write a primitive array to RWGltf_GltfRootElement_Meshes section.
| [in] | theGltfFace | face to write |
| [in] | theName | primitive array name |
| [in] | theDracoBufInd | draco buffer index |
| [in,out] | theToStartPrims | flag indicating that primitive array has been started |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Samplers section.
|
protectedvirtual |
Write RWGltf_GltfRootElement_Scene section.
| [in] | theDefSceneId | index of default scene (0) |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Scenes section.
| [in] | theSceneRootNodeInds | sequence of scene nodes pointing to root shapes |
|
protectedvirtual |
Write shapes to RWGltf_GltfRootElement_Meshes section.
| [in] | theShapeIter | Shape iterator to traverse shapes |
| [in,out] | theDracoBufInd | Draco buffer index |
| [in,out] | theToStartPrims | Flag to indicate if primitives should be started |
| [in] | theNodeName | Name of the current node |
| [in,out] | theWrittenShapes | Map to store written shapes |
| [in,out] | theDracoBufIndMap | Map to store Draco buffer indices |
|
protected |
Write shape into binary file.
| [out] | theGltfFace | glTF face definition |
| [out] | theBinFile | Output file to write into |
| [in] | theShapeIter | Current shape iterator |
| [in,out] | theAccessorNb | Last accessor index |
| [in,out] | theMesh | Mesh data |
| [in] | theArrType | Array type for glTF |
| [in] | thePSentryBin | Progress scope for the operation |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Skins section (reserved).
|
protectedvirtual |
Write bufferView for vertex texture coordinates within RWGltf_GltfRootElement_Accessors section.
| [in] | theGltfFace | face definition to write |
|
protectedvirtual |
Write RWGltf_GltfRootElement_Textures section.
| [in] | theSceneNodeMap | ordered map of scene nodes |
| [out] | theMaterialMap | map of materials, filled with textures |
|
protected |
length of binary file
|
protected |
map for TopoDS_Face to glTF face (merging duplicates)
|
protected |
output file with binary data (full path)
|
protected |
output file with binary data (short path)
|
protected |
current buffer view with triangulation indexes
|
protected |
current buffer view with nodes normals
|
protected |
current buffer view with nodes positions
|
protected |
vector of buffers view with compression data
|
protected |
current buffer view with nodes UV coordinates
|
protected |
transformation from OCCT to glTF coordinate system
|
protected |
default material definition to be used for nodes with only color defined
|
protected |
Draco parameters.
|
protected |
output glTF file
|
protected |
flag to write into binary glTF format (.glb)
|
protected |
export UV coordinates even if there are no mapped texture
|
protected |
map of defined materials
|
protected |
name format for exporting Meshes
|
protected |
name format for exporting Nodes
|
protected |
flag to write image textures into GLB file
|
protected |
flag to merge faces within a single part
|
protected |
flag to use multithreading; FALSE by default
|
protected |
flag to prefer keeping 16-bit indexes while merging face
|
protected |
transformation format to write into glTF file
|
protected |
JSON writer.