Update of header of files in context of License text
[occt.git] / src / Graphic3d / Graphic3d_Texture2Dplane.cdl
1 -- Created on: 1997-07-28
2 -- Created by: Pierre CHALAMET
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Texture2Dplane from Graphic3d
18
19 inherits Texture2D from Graphic3d
20
21   ---Purpose: This class allows the management of a 2D texture defined from a plane equation
22   -- Use the SetXXX() methods for positioning the texture as you want.
23
24 uses
25
26   NameOfTexture2D    from Graphic3d,
27   NameOfTexturePlane from Graphic3d,
28   AsciiString        from TCollection,
29   PixMap_Handle      from Image
30
31 is
32
33   Create (theFileName : AsciiString from TCollection) returns Texture2Dplane from Graphic3d;
34   ---Purpose: Creates a texture from a file
35
36   Create (theNOT : NameOfTexture2D from Graphic3d) returns Texture2Dplane from Graphic3d;
37   ---Purpose: Creates a texture from a predefined texture name set.
38
39   Create (thePixMap : PixMap_Handle from Image) returns Texture2Dplane from Graphic3d;
40   ---Purpose: Creates a texture from the pixmap.
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
67
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
73
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
116 fields
117
118   myPlaneName : NameOfTexturePlane from Graphic3d;
119
120 end Texture2Dplane;