Back to home page

EIC code displayed by LXR

 
 

    


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

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 () {}
0034 
0035   /**
0036    * Constructor
0037    */
0038   inline        VrmlData_ShapeNode (const VrmlData_Scene& theScene,
0039                                     const char            * theName)
0040     : VrmlData_Node (theScene, theName) {}
0041 
0042   /**
0043    * Query the Appearance.
0044    */
0045   inline const Handle(VrmlData_Appearance)&
0046                 Appearance      () const        { return myAppearance; }
0047 
0048   /**
0049    * Query the Geometry.
0050    */
0051   inline const Handle(VrmlData_Geometry)&
0052                 Geometry        () const        { return myGeometry; }
0053 
0054   /**
0055    * Set the Appearance
0056    */
0057   inline void   SetAppearance   (const Handle(VrmlData_Appearance)& theAppear)
0058   { myAppearance = theAppear; }
0059 
0060   /**
0061    * Set the Geometry
0062    */
0063   inline void   SetGeometry     (const Handle(VrmlData_Geometry)& theGeometry)
0064   { myGeometry = theGeometry; }
0065 
0066   /**
0067    * Create a copy of this node.
0068    * If the parameter is null, a new copied node is created. Otherwise new node
0069    * is not created, but rather the given one is modified.
0070    */
0071   Standard_EXPORT virtual Handle(VrmlData_Node)
0072                 Clone           (const Handle(VrmlData_Node)& theOther)const Standard_OVERRIDE;
0073 
0074   /**
0075    * Fill the Node internal data from the given input stream.
0076    */
0077   Standard_EXPORT virtual VrmlData_ErrorStatus
0078                 Read            (VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
0079 
0080   /**
0081    * Write the Node to output stream.
0082    */
0083   Standard_EXPORT virtual VrmlData_ErrorStatus
0084                 Write           (const char * thePrefix) const Standard_OVERRIDE;
0085 
0086   /**
0087    * Check if the Shape Node is writeable.
0088    */
0089   Standard_EXPORT virtual Standard_Boolean
0090                 IsDefault       () const Standard_OVERRIDE;
0091 
0092  protected:
0093   // ---------- PROTECTED METHODS ----------
0094 
0095 
0096 
0097  private:
0098   // ---------- PRIVATE FIELDS ----------
0099 
0100   Handle(VrmlData_Appearance)   myAppearance;
0101   Handle(VrmlData_Geometry)     myGeometry;
0102 
0103  public:
0104 // Declaration of CASCADE RTTI
0105 DEFINE_STANDARD_RTTI_INLINE(VrmlData_ShapeNode,VrmlData_Node)
0106 };
0107 
0108 // Definition of HANDLE object using Standard_DefineHandle.hxx
0109 DEFINE_STANDARD_HANDLE (VrmlData_ShapeNode, VrmlData_Node)
0110 
0111 
0112 #endif