Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:22:36

0001 // Created on: 2006-05-25
0002 // Created by: Alexander GRIGORIEV
0003 // Copyright (c) 2006-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef VrmlData_ShapeNode_HeaderFile
0017 #define VrmlData_ShapeNode_HeaderFile
0018 
0019 #include <VrmlData_Appearance.hxx>
0020 #include <VrmlData_Geometry.hxx>
0021 
0022 /**
0023  *  Implementation of the Shape node type
0024  */
0025 class VrmlData_ShapeNode : public VrmlData_Node
0026 {
0027 public:
0028   // ---------- PUBLIC METHODS ----------
0029 
0030   /**
0031    * Empty constructor
0032    */
0033   inline VrmlData_ShapeNode() = default;
0034 
0035   /**
0036    * Constructor
0037    */
0038   inline VrmlData_ShapeNode(const VrmlData_Scene& theScene, const char* theName)
0039       : VrmlData_Node(theScene, theName)
0040   {
0041   }
0042 
0043   /**
0044    * Query the Appearance.
0045    */
0046   inline const occ::handle<VrmlData_Appearance>& Appearance() const { return myAppearance; }
0047 
0048   /**
0049    * Query the Geometry.
0050    */
0051   inline const occ::handle<VrmlData_Geometry>& Geometry() const { return myGeometry; }
0052 
0053   /**
0054    * Set the Appearance
0055    */
0056   inline void SetAppearance(const occ::handle<VrmlData_Appearance>& theAppear)
0057   {
0058     myAppearance = theAppear;
0059   }
0060 
0061   /**
0062    * Set the Geometry
0063    */
0064   inline void SetGeometry(const occ::handle<VrmlData_Geometry>& theGeometry)
0065   {
0066     myGeometry = theGeometry;
0067   }
0068 
0069   /**
0070    * Create a copy of this node.
0071    * If the parameter is null, a new copied node is created. Otherwise new node
0072    * is not created, but rather the given one is modified.
0073    */
0074   Standard_EXPORT occ::handle<VrmlData_Node> Clone(
0075     const occ::handle<VrmlData_Node>& theOther) const override;
0076 
0077   /**
0078    * Fill the Node internal data from the given input stream.
0079    */
0080   Standard_EXPORT VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) override;
0081 
0082   /**
0083    * Write the Node to output stream.
0084    */
0085   Standard_EXPORT VrmlData_ErrorStatus Write(const char* thePrefix) const override;
0086 
0087   /**
0088    * Check if the Shape Node is writeable.
0089    */
0090   Standard_EXPORT bool IsDefault() const override;
0091 
0092 private:
0093   // ---------- PRIVATE FIELDS ----------
0094 
0095   occ::handle<VrmlData_Appearance> myAppearance;
0096   occ::handle<VrmlData_Geometry>   myGeometry;
0097 
0098 public:
0099   // Declaration of CASCADE RTTI
0100   DEFINE_STANDARD_RTTI_INLINE(VrmlData_ShapeNode, VrmlData_Node)
0101 };
0102 
0103 // Definition of HANDLE object using Standard_DefineHandle.hxx
0104 #endif