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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Texture2Dplane from Graphic3d
19 inherits Texture2D from Graphic3d
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.
26 NameOfTexture2D from Graphic3d,
27 NameOfTexturePlane from Graphic3d,
28 AsciiString from TCollection,
29 PixMap_Handle from Image
33 Create (theFileName : AsciiString from TCollection) returns Texture2Dplane from Graphic3d;
34 ---Purpose: Creates a texture from a file
36 Create (theNOT : NameOfTexture2D from Graphic3d) returns Texture2Dplane from Graphic3d;
37 ---Purpose: Creates a texture from a predefined texture name set.
39 Create (thePixMap : PixMap_Handle from Image) returns Texture2Dplane from Graphic3d;
40 ---Purpose: Creates a texture from the pixmap.
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>
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>
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
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
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
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.
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.
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
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.
95 PlaneS (me; A, B, C, D : out ShortReal from Standard);
96 ---Purpose: Returns the current texture plane S equation
98 PlaneT (me; A, B, C, D : out ShortReal from Standard);
99 ---Purpose: Returns the current texture plane T equation
101 TranslateS (me; theVal : out ShortReal from Standard);
102 ---Purpose: Returns the current texture S translation value
104 TranslateT (me; theVal : out ShortReal from Standard);
105 ---Purpose: Returns the current texture T translation value
107 ScaleS (me; theVal : out ShortReal from Standard);
108 ---Purpose: Returns the current texture S scale value
110 ScaleT (me; theVal : out ShortReal from Standard);
111 ---Purpose: Returns the current texture T scale value
113 Rotation (me; theVal : out ShortReal from Standard);
114 ---Purpose: Returns the current texture rotation angle
118 myPlaneName : NameOfTexturePlane from Graphic3d;