Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-22 08:31:05

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_Appearance_HeaderFile
0017 #define VrmlData_Appearance_HeaderFile
0018 
0019 #include <VrmlData_Material.hxx>
0020 #include <VrmlData_Texture.hxx>
0021 #include <VrmlData_TextureTransform.hxx>
0022 
0023 /**
0024  *  Implementation of the Appearance node type
0025  */
0026 class VrmlData_Appearance : public VrmlData_Node
0027 {
0028 public:
0029   // ---------- PUBLIC METHODS ----------
0030 
0031   /**
0032    * Empty constructor
0033    */
0034   inline VrmlData_Appearance() {}
0035 
0036   /**
0037    * Constructor
0038    */
0039   inline VrmlData_Appearance(const VrmlData_Scene& theScene, const char* theName)
0040       : VrmlData_Node(theScene, theName)
0041   {
0042   }
0043 
0044   /**
0045    * Query the Material
0046    */
0047   inline const Handle(VrmlData_Material)& Material() const { return myMaterial; }
0048 
0049   /**
0050    * Query the Texture
0051    */
0052   inline const Handle(VrmlData_Texture)& Texture() const { return myTexture; }
0053 
0054   /**
0055    * Query the TextureTransform
0056    */
0057   inline const Handle(VrmlData_TextureTransform)& TextureTransform() const { return myTTransform; }
0058 
0059   /**
0060    * Set the Material
0061    */
0062   inline void SetMaterial(const Handle(VrmlData_Material)& theMat) { myMaterial = theMat; }
0063 
0064   /**
0065    * Set the Texture
0066    */
0067   inline void SetTexture(const Handle(VrmlData_Texture)& theTexture) { myTexture = theTexture; }
0068 
0069   /**
0070    * Set the Texture Transform
0071    */
0072   inline void SetTextureTransform(const Handle(VrmlData_TextureTransform)& theTT)
0073   {
0074     myTTransform = theTT;
0075   }
0076 
0077   /**
0078    * Create a copy of this node.
0079    * If the parameter is null, a new copied node is created. Otherwise new node
0080    * is not created, but rather the given one is modified.<p>
0081    */
0082   Standard_EXPORT virtual Handle(VrmlData_Node) Clone(const Handle(VrmlData_Node)&) const
0083     Standard_OVERRIDE;
0084   /**
0085    * Read the node from input stream.
0086    */
0087   Standard_EXPORT virtual VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
0088 
0089   /**
0090    * Write the Node from input stream.
0091    */
0092   Standard_EXPORT virtual VrmlData_ErrorStatus Write(const char* thePrefix) const Standard_OVERRIDE;
0093 
0094   /**
0095    * Returns True if the node is default, so that it should not be written.
0096    */
0097   Standard_EXPORT virtual Standard_Boolean IsDefault() const Standard_OVERRIDE;
0098 
0099 protected:
0100   // ---------- PROTECTED METHODS ----------
0101 
0102 private:
0103   // ---------- PRIVATE FIELDS ----------
0104 
0105   Handle(VrmlData_Material)         myMaterial;
0106   Handle(VrmlData_Texture)          myTexture;
0107   Handle(VrmlData_TextureTransform) myTTransform;
0108 
0109 public:
0110   // Declaration of CASCADE RTTI
0111   DEFINE_STANDARD_RTTI_INLINE(VrmlData_Appearance, VrmlData_Node)
0112 };
0113 
0114 // Definition of HANDLE object using Standard_DefineHandle.hxx
0115 DEFINE_STANDARD_HANDLE(VrmlData_Appearance, VrmlData_Node)
0116 
0117 #endif