1 // Created on: 2006-05-25
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2006-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef VrmlData_Appearance_HeaderFile
17 #define VrmlData_Appearance_HeaderFile
19 #include <VrmlData_Material.hxx>
20 #include <VrmlData_Texture.hxx>
21 #include <VrmlData_TextureTransform.hxx>
24 * Implementation of the Appearance node type
26 class VrmlData_Appearance : public VrmlData_Node
29 // ---------- PUBLIC METHODS ----------
34 inline VrmlData_Appearance () {}
39 inline VrmlData_Appearance (const VrmlData_Scene& theScene,
41 : VrmlData_Node (theScene, theName) {}
46 inline const Handle(VrmlData_Material)&
47 Material () const { return myMaterial; }
52 inline const Handle(VrmlData_Texture)&
53 Texture () const { return myTexture; }
56 * Query the TextureTransform
58 inline const Handle(VrmlData_TextureTransform)&
59 TextureTransform () const { return myTTransform; }
64 inline void SetMaterial (const Handle(VrmlData_Material)& theMat)
65 { myMaterial = theMat; }
70 inline void SetTexture (const Handle(VrmlData_Texture)& theTexture)
71 { myTexture = theTexture; }
74 * Set the Texture Transform
76 inline void SetTextureTransform
77 (const Handle(VrmlData_TextureTransform)& theTT)
78 { myTTransform = theTT; }
81 * Create a copy of this node.
82 * If the parameter is null, a new copied node is created. Otherwise new node
83 * is not created, but rather the given one is modified.<p>
85 Standard_EXPORT virtual Handle(VrmlData_Node)
86 Clone (const Handle(VrmlData_Node)&)const;
88 * Read the node from input stream.
90 Standard_EXPORT virtual VrmlData_ErrorStatus
91 Read (VrmlData_InBuffer& theBuffer);
94 * Write the Node from input stream.
96 Standard_EXPORT virtual VrmlData_ErrorStatus
97 Write (const char * thePrefix) const;
100 * Returns True if the node is default, so that it should not be written.
102 Standard_EXPORT virtual Standard_Boolean
106 // ---------- PROTECTED METHODS ----------
111 // ---------- PRIVATE FIELDS ----------
113 Handle(VrmlData_Material) myMaterial;
114 Handle(VrmlData_Texture) myTexture;
115 Handle(VrmlData_TextureTransform) myTTransform;
118 // Declaration of CASCADE RTTI
119 DEFINE_STANDARD_RTTI (VrmlData_Appearance)
122 // Definition of HANDLE object using Standard_DefineHandle.hxx
123 DEFINE_STANDARD_HANDLE (VrmlData_Appearance, VrmlData_Node)