Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:31

0001 // Copyright (c) 2022 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Vrml_ConfigurationNode_HeaderFile
0015 #define _Vrml_ConfigurationNode_HeaderFile
0016 
0017 #include <DE_ConfigurationNode.hxx>
0018 #include <RWMesh_CoordinateSystem.hxx>
0019 
0020 //! The purpose of this class is to configure the transfer process for VRML format
0021 //! Stores the necessary settings for Vrml_Provider.
0022 //! Configures and creates special provider to transfer VRML files.
0023 //!
0024 //! Nodes grouped by Vendor name and Format type.
0025 //! The Vendor name is "OCC"
0026 //! The Format type is "VRML"
0027 //! The supported CAD extensions are ".vrml", ".wrl"
0028 //! The import process is supported.
0029 //! The export process is supported.
0030 class Vrml_ConfigurationNode : public DE_ConfigurationNode
0031 {
0032   DEFINE_STANDARD_RTTIEXT(Vrml_ConfigurationNode, DE_ConfigurationNode)
0033 public:
0034 
0035   //! Initializes all field by default
0036   Standard_EXPORT Vrml_ConfigurationNode();
0037 
0038   //! Copies values of all fields
0039   //! @param[in] theNode object to copy
0040   Standard_EXPORT Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNode)& theNode);
0041 
0042   //! Updates values according the resource
0043   //! @param[in] theResource input resource to use
0044   //! @return true if theResource loading has ended correctly
0045   Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE;
0046 
0047   //! Writes configuration to the string
0048   //! @return result resource string
0049   Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE;
0050 
0051   //! Copies values of all fields
0052   //! @return new object with the same field values
0053   Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE;
0054 
0055 
0056   //! Creates new provider for the own format
0057   //! @return new created provider
0058   Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE;
0059 
0060 public:
0061 
0062   //! Checks the import supporting
0063   //! @return true if import is supported
0064   Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE;
0065 
0066   //! Checks the export supporting
0067   //! @return true if export is supported
0068   Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE;
0069 
0070   //! Gets CAD format name of associated provider
0071   //! @return provider CAD format
0072   Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE;
0073 
0074   //! Gets provider's vendor name of associated provider
0075   //! @return provider's vendor name
0076   Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE;
0077 
0078   //! Gets list of supported file extensions
0079   //! @return list of extensions
0080   Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE;
0081 
0082 public:
0083   enum WriteMode_WriterVersion
0084   {
0085     WriteMode_WriterVersion_1 = 1,
0086     WriteMode_WriterVersion_2
0087   };
0088   enum WriteMode_RepresentationType
0089   {
0090     WriteMode_RepresentationType_Shaded = 0,
0091     WriteMode_RepresentationType_Wireframe,
0092     WriteMode_RepresentationType_Both
0093   };
0094 
0095   struct Vrml_InternalSection
0096   {
0097     // Read
0098     double ReadFileUnit = 1.; //<! file length units to convert from while reading the file, defined as scale factor for meters
0099     RWMesh_CoordinateSystem ReadFileCoordinateSys = RWMesh_CoordinateSystem_Yup; //<! coordinate system defined by Vrml file
0100     RWMesh_CoordinateSystem ReadSystemCoordinateSys = RWMesh_CoordinateSystem_Zup; //<! result coordinate system 
0101     bool ReadFillIncomplete = true; //<! fill the document with partially retrieved data even if reader has failed with error
0102 
0103     // Write
0104     WriteMode_WriterVersion WriterVersion = WriteMode_WriterVersion_2; //!< Setting up writer version (1/2)
0105     WriteMode_RepresentationType WriteRepresentationType = WriteMode_RepresentationType_Wireframe; //!< Setting up representation (shaded/wireframe/both) 
0106 
0107   } InternalParameters;
0108 };
0109 
0110 #endif // _Vrml_ConfigurationNode_HeaderFile