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
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.
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.
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.
21 class Texture2Dplane from Graphic3d
23 inherits Texture2D from Graphic3d
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.
30 NameOfTexture2D from Graphic3d,
31 NameOfTexturePlane from Graphic3d,
32 AsciiString from TCollection
36 Create (theFileName : AsciiString from TCollection) returns mutable Texture2Dplane from Graphic3d;
37 ---Purpose: Creates a texture from a file
39 Create (theNOT : NameOfTexture2D from Graphic3d) returns mutable Texture2Dplane from Graphic3d;
40 ---Purpose: Creates a texture from a predefined texture name set.
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;