1 // Created on: 2006-05-25 2 // Created by: Alexander GRIGORIEV 3 // Copyright (c) 2006-2014 OPEN CASCADE SAS 4 // 5 // This file is part of Open CASCADE Technology software library. 6 // 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. 12 // 13 // Alternatively, this file may be used under the terms of Open CASCADE 14 // commercial license or contractual agreement. 15 16 #ifndef VrmlData_TextureTransform_HeaderFile 17 #define VrmlData_TextureTransform_HeaderFile 18 19 #include <VrmlData_Node.hxx> 20 #include <gp_XY.hxx> 21 22 /// Implementation of the TextureTransform node 23 24 class VrmlData_TextureTransform : public VrmlData_Node 25 { 26 public: 27 // ---------- PUBLIC METHODS ---------- 28 29 /** 30 * Empty constructor 31 */ VrmlData_TextureTransform()32 inline VrmlData_TextureTransform () 33 : myRotation(0.0) 34 { 35 } 36 37 /** 38 * Constructor 39 */ VrmlData_TextureTransform(const VrmlData_Scene & theScene,const char * theName)40 inline VrmlData_TextureTransform (const VrmlData_Scene& theScene, 41 const char * theName) 42 : VrmlData_Node (theScene, theName), 43 myRotation(0.) 44 {} 45 46 /** 47 * Query the Center 48 */ Center() const49 inline const gp_XY& Center () const { return myCenter; } 50 51 /** 52 * Query the Rotation 53 */ Rotation() const54 inline Standard_Real Rotation () const { return myRotation; } 55 56 /** 57 * Query the Scale 58 */ Scale() const59 inline const gp_XY& Scale () const { return myScale; } 60 61 /** 62 * Query the Translation 63 */ Translation() const64 inline const gp_XY& Translation () const { return myTranslation; } 65 66 /** 67 * Set the Center 68 */ SetCenter(const gp_XY & V)69 inline void SetCenter (const gp_XY& V) { myCenter = V; } 70 71 /** 72 * Set the Rotation 73 */ SetRotation(const Standard_Real V)74 inline void SetRotation (const Standard_Real V) 75 { myRotation = V; } 76 77 /** 78 * Set the Scale 79 */ SetScale(const gp_XY & V)80 inline void SetScale (const gp_XY& V) { myScale = V; } 81 82 /** 83 * Set the Translation 84 */ SetTranslation(const gp_XY & V)85 inline void SetTranslation (const gp_XY& V) { myTranslation = V; } 86 87 protected: 88 // ---------- PROTECTED METHODS ---------- 89 90 91 92 private: 93 // ---------- PRIVATE FIELDS ---------- 94 95 gp_XY myCenter; 96 Standard_Real myRotation; 97 gp_XY myScale; 98 gp_XY myTranslation; 99 100 public: 101 // Declaration of CASCADE RTTI 102 DEFINE_STANDARD_RTTI_INLINE(VrmlData_TextureTransform,VrmlData_Node) 103 }; 104 105 // Definition of HANDLE object using Standard_DefineHandle.hxx 106 DEFINE_STANDARD_HANDLE (VrmlData_TextureTransform, VrmlData_Node) 107 108 109 #endif 110