0023544: Texture management in TKOpenGl should be redesigned
[occt.git] / src / Graphic3d / Graphic3d_Texture2Dplane.cdl
CommitLineData
b311480e 1-- Created on: 1997-07-28
2-- Created by: Pierre CHALAMET
3-- Copyright (c) 1997-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
bf75be98 21class Texture2Dplane from Graphic3d
7fd59977 22
bf75be98 23inherits Texture2D from Graphic3d
24
25 ---Purpose: This class allows the management of a 2D texture defined from a plane equation
26 -- Use the SetXXX() methods for positioning the texture as you want.
27
28uses
29
30 NameOfTexture2D from Graphic3d,
31 NameOfTexturePlane from Graphic3d,
32 AsciiString from TCollection
33
34is
35
36 Create (theFileName : AsciiString from TCollection) returns mutable Texture2Dplane from Graphic3d;
37 ---Purpose: Creates a texture from a file
38
39 Create (theNOT : NameOfTexture2D from Graphic3d) returns mutable Texture2Dplane from Graphic3d;
40 ---Purpose: Creates a texture from a predefined texture name set.
41
42 SetPlaneS (me : mutable; A, B, C, D : ShortReal from Standard);
43 ---Purpose: Defines the texture projection plane for texture coordinate S
44 -- default is <1.0, 0.0, 0.0, 0.0>
45
46 SetPlaneT (me : mutable; A, B, C, D : ShortReal from Standard);
47 ---Purpose: Defines the texture projection plane for texture coordinate T
48 -- default is <0.0, 1.0, 0.0, 0.0>
49
50 SetPlane (me : mutable; thePlane : NameOfTexturePlane from Graphic3d);
51 ---Purpose: Defines the texture projection plane for both S and T texture coordinate
52 -- default is NOTP_XY meaning:
53 -- <1.0, 0.0, 0.0, 0.0> for S
54 -- and <0.0, 1.0, 0.0, 0.0> for T
55
56 SetScaleS (me : mutable; theVal : ShortReal from Standard);
57 ---Purpose: Defines the texture scale for the S texture coordinate
58 -- much easier than recomputing the S plane equation
59 -- but the result is the same
60 -- default to 1.0
61
62 SetScaleT (me : mutable; theVal : ShortReal from Standard);
63 ---Purpose: Defines the texture scale for the T texture coordinate
64 -- much easier than recompution the T plane equation
65 -- but the result is the same
66 -- default to 1.0
7fd59977 67
bf75be98 68 SetTranslateS (me : mutable; theVal : ShortReal from Standard);
69 ---Purpose: Defines the texture translation for the S texture coordinate
70 -- you can obtain the same effect by modifying the S plane
71 -- equation but its not easier.
72 -- default to 0.0
7fd59977 73
bf75be98 74 SetTranslateT (me : mutable; theVal : ShortReal from Standard);
75 ---Purpose: Defines the texture translation for the T texture coordinate
76 -- you can obtain the same effect by modifying the T plane
77 -- equation but its not easier.
78 -- default to 0.0
79
80 SetRotation (me : mutable; theVal : ShortReal from Standard);
81 ---Purpose: Sets the rotation angle of the whole texture.
82 -- the same result might be achieved by recomputing the
83 -- S and T plane equation but it's not the easiest way...
84 -- the angle is expressed in degrees
85 -- default is 0.0
86
87 --
88 -- inquire methods
89 --
90
91 Plane (me) returns NameOfTexturePlane from Graphic3d;
92 ---Purpose: Returns the current texture plane name or NOTP_UNKNOWN
93 -- when the plane is user defined.
94
95 PlaneS (me; A, B, C, D : out ShortReal from Standard);
96 ---Purpose: Returns the current texture plane S equation
97
98 PlaneT (me; A, B, C, D : out ShortReal from Standard);
99 ---Purpose: Returns the current texture plane T equation
100
101 TranslateS (me; theVal : out ShortReal from Standard);
102 ---Purpose: Returns the current texture S translation value
103
104 TranslateT (me; theVal : out ShortReal from Standard);
105 ---Purpose: Returns the current texture T translation value
106
107 ScaleS (me; theVal : out ShortReal from Standard);
108 ---Purpose: Returns the current texture S scale value
109
110 ScaleT (me; theVal : out ShortReal from Standard);
111 ---Purpose: Returns the current texture T scale value
112
113 Rotation (me; theVal : out ShortReal from Standard);
114 ---Purpose: Returns the current texture rotation angle
115
116fields
7fd59977 117
bf75be98 118 myPlaneName : NameOfTexturePlane from Graphic3d;
7fd59977 119
bf75be98 120end Texture2Dplane;