bf75be98 |
1 | -- Copyright (c) 2012 OPEN CASCADE SAS |
2 | -- |
3 | -- The content of this file is subject to the Open CASCADE Technology Public |
4 | -- License Version 6.5 (the "License"). You may not use the content of this file |
5 | -- except in compliance with the License. Please obtain a copy of the License |
6 | -- at http://www.opencascade.org and read it completely before using this file. |
7 | -- |
8 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | -- |
11 | -- The Original Code and all software distributed under the License is |
12 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | -- Initial Developer hereby disclaims all such warranties, including without |
14 | -- limitation, any warranties of merchantability, fitness for a particular |
15 | -- purpose or non-infringement. Please see the License for the specific terms |
16 | -- and conditions governing the rights and limitations under the License. |
17 | |
18 | class TextureParams from Graphic3d |
19 | |
20 | inherits Transient from Standard |
21 | |
22 | ---Purpose: This class describes texture parameters. |
23 | |
24 | uses |
25 | |
26 | Vec2 from Graphic3d, |
27 | Vec4 from Graphic3d, |
28 | TypeOfTextureMode from Graphic3d, |
29 | TypeOfTextureFilter from Graphic3d, |
30 | LevelOfTextureAnisotropy from Graphic3d |
31 | |
32 | is |
33 | |
34 | Create |
35 | returns TextureParams from Graphic3d; |
36 | ---Purpose: Default constructor. |
37 | |
38 | Destroy (me); |
39 | ---C++ : alias ~ |
40 | |
41 | -- |
42 | -- public methods |
43 | -- |
44 | |
45 | IsModulate (me) returns Boolean from Standard; |
46 | ---Level : public |
47 | ---Purpose : @return TRUE if the texture is modulate. |
48 | -- Default value is FALSE. |
49 | |
50 | SetModulate (me : mutable; |
51 | theToModulate : Boolean from Standard); |
52 | ---Level : public |
53 | ---Purpose : @param theToModulate turn modulation on/off. |
54 | |
55 | IsRepeat (me) returns Boolean from Standard; |
56 | ---Level : public |
57 | ---Purpose : @return TRUE if the texture repeat is enabled. |
58 | -- Default value is FALSE. |
59 | |
60 | SetRepeat (me : mutable; |
61 | theToRepeat : Boolean from Standard); |
62 | ---Level : public |
63 | ---Purpose : @param theToRepeat turn texture repeat mode ON or OFF (clamping). |
64 | |
65 | Filter (me) returns TypeOfTextureFilter from Graphic3d; |
66 | ---Level : public |
67 | ---Purpose : @return texture interpolation filter. |
68 | -- Default value is Graphic3d_TOTF_NEAREST. |
69 | |
70 | SetFilter (me : mutable; |
71 | theFilter : TypeOfTextureFilter from Graphic3d); |
72 | ---Level : public |
73 | ---Purpose : @param theFilter texture interpolation filter. |
74 | |
75 | AnisoFilter (me) returns LevelOfTextureAnisotropy from Graphic3d; |
76 | ---Level : public |
77 | ---Purpose : @return level of anisontropy texture filter. |
78 | -- Default value is Graphic3d_LOTA_OFF. |
79 | |
80 | SetAnisoFilter (me : mutable; |
81 | theLevel : LevelOfTextureAnisotropy from Graphic3d); |
82 | ---Level : public |
83 | ---Purpose : @param theLevel level of anisontropy texture filter. |
84 | |
85 | Rotation (me) returns ShortReal from Standard; |
86 | ---Level : public |
87 | ---Purpose : @return rotation angle in degrees |
88 | -- Default value is 0. |
89 | |
90 | SetRotation (me : mutable; |
91 | theAngleDegrees : ShortReal from Standard); |
92 | ---Level : public |
93 | ---Purpose : @param theAngleDegrees rotation angle. |
94 | |
95 | Scale (me) returns Vec2 from Graphic3d; |
96 | ---Level : public |
97 | ---Purpose : @return scale factor |
98 | -- Default value is no scaling (1.0; 1.0). |
99 | ---C++ : return const & |
100 | |
101 | SetScale (me : mutable; |
102 | theScale : Vec2 from Graphic3d); |
103 | ---Level : public |
104 | ---Purpose : @param theScale scale factor. |
105 | |
106 | Translation (me) returns Vec2 from Graphic3d; |
107 | ---Level : public |
108 | ---Purpose : @return translation vector |
109 | -- Default value is no translation (0.0; 0.0). |
110 | ---C++ : return const & |
111 | |
112 | SetTranslation (me : mutable; |
113 | theVec : Vec2 from Graphic3d); |
114 | ---Level : public |
115 | ---Purpose : @param theVec translation vector. |
116 | |
117 | GenMode (me) returns TypeOfTextureMode from Graphic3d; |
118 | ---Level : public |
119 | ---Purpose : @return texture coordinates generation mode. |
120 | -- Default value is Graphic3d_TOTM_MANUAL. |
121 | |
122 | GenPlaneS (me) returns Vec4 from Graphic3d; |
123 | ---Level : public |
124 | ---Purpose : @return texture coordinates generation plane S. |
125 | ---C++ : return const & |
126 | |
127 | GenPlaneT (me) returns Vec4 from Graphic3d; |
128 | ---Level : public |
129 | ---Purpose : @return texture coordinates generation plane T. |
130 | ---C++ : return const & |
131 | |
132 | SetGenMode (me : mutable; |
133 | theMode : TypeOfTextureMode from Graphic3d; |
134 | thePlaneS : Vec4 from Graphic3d; |
135 | thePlaneT : Vec4 from Graphic3d); |
136 | ---Level : public |
137 | ---Purpose : Setup texture coordinates generation mode. |
138 | |
139 | fields |
140 | |
141 | -- apply lighting on texture or not |
142 | myToModulate : Boolean from Standard; |
143 | |
144 | -- texture wrapping mode |
145 | myToRepeat : Boolean from Standard; |
146 | |
147 | -- texture filter |
148 | myFilter : TypeOfTextureFilter from Graphic3d; |
149 | |
150 | -- level of anisontropy texture filter |
151 | myAnisoLevel : LevelOfTextureAnisotropy from Graphic3d; |
152 | |
153 | -- texture mapping - rotation angle in degrees around OZ axis |
154 | myRotAngle : ShortReal from Standard; |
155 | |
156 | -- texture coordinate scale factor |
157 | myScale : Vec2 from Graphic3d; |
158 | |
159 | -- texture coordinate translation vector |
160 | myTranslation: Vec2 from Graphic3d; |
161 | |
162 | -- texture coordinates generation mode |
163 | myGenMode : TypeOfTextureMode from Graphic3d; |
164 | |
165 | -- plane definition for s(x) coordinate (for Graphic3d_TOTM_EYE and Graphic3d_TOTM_OBJECT generation modes) |
166 | myGenPlaneS : Vec4 from Graphic3d; |
167 | |
168 | -- plane definition for t(y) coordinate (for Graphic3d_TOTM_EYE and Graphic3d_TOTM_OBJECT generation modes) |
169 | myGenPlaneT : Vec4 from Graphic3d; |
170 | |
171 | end TextureParams; |