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