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