0024310: TKOpenGl - GLSL compatibility issues
[occt.git] / src / V3d / V3d_Light.cdl
1 -- Created on: 1992-01-17
2 -- Created by: GG 
3 -- Copyright (c) 1992-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
21 -- Update:      FDA Oct 15 1994
22 --              ZOV - Mars 30 1998
23 --              GG IMP230300 Add SetColor() and Color() methods
24 --              GG - 23/11/00 Add IsDisplayed() method
25
26
27 deferred class Light from V3d 
28
29         ---Purpose: Defines services on Light type objects.. 
30
31
32
33 inherits 
34
35         TShared
36
37 uses
38
39         TypeOfLight from V3d,
40         TypeOfRepresentation from V3d,
41         TypeOfPickLight from V3d,
42         View from V3d,
43         Viewer from V3d,
44         Coordinate from V3d,
45         Light from Visual3d,
46         TypeOfColor from Quantity,
47         NameOfColor from Quantity,
48         Color from Quantity,
49         Parameter from Quantity,
50         PlaneAngle from Quantity,
51         Group from Graphic3d,
52         Vertex from Graphic3d,
53         Structure from Graphic3d
54         
55 raises
56         BadValue from V3d
57
58 is
59
60         Initialize( VM : mutable Viewer )  ;
61
62         --------------------------------------------------------
63         ---Category: Methods to modify the attributes of the Light
64         --------------------------------------------------------
65
66         SetColor( me : mutable; Type: TypeOfColor ; V1 , V2 , V3 : Parameter) 
67         is static;
68         ---Level: Public
69         ---Purpose: Defines the colour of a light source
70         --          according to the type of colour definition 
71         --          and the three corresponding values.
72
73         SetColor( me : mutable; Name : NameOfColor )  is static;
74         ---Level: Public
75         ---Purpose: Defines the colour of a light source by giving
76         --          the name of the colour in the form Quantity_NOC_xxxx .
77
78         SetColor( me : mutable; Name : Color )  is static;
79         ---Level: Public
80         ---Purpose: Defines the colour of a light source by giving
81         --          the basic colour.
82
83         ---------------------------------------------------
84         ---Category: Inquire methods
85         ---------------------------------------------------
86
87         Color ( me; Type: TypeOfColor ; V1 , V2 , V3 : out Parameter ) 
88         is static;
89         ---Level: Public
90         ---Purpose: Returns the colour of the light source depending of
91         --          the color type.
92
93         Color( me ; Name : out NameOfColor )  is static;
94         ---Level: Public
95         ---Purpose: Returns the colour of the light source.     
96
97         Color( me )  returns Color is static;
98         ---Level: Public
99         ---Purpose: Returns the colour of the light source.     
100         
101         Type ( me ) returns TypeOfLight from V3d  is static;
102         ---Level: Public
103         ---Purpose: Returns the Type of the Light
104
105         Headlight ( me ) returns Boolean from Standard is static;
106         ---Level: Public
107         ---Purpose: returns true if the light is a headlight
108
109   SetHeadlight( me : mutable; theValue : Boolean from Standard ) is static;
110   ---Level: Public
111   ---Purpose: Setup headlight flag.
112
113         IsDisplayed( me ) returns Boolean from Standard;
114         ---Level: Public
115         ---Purpose: Returns TRUE when a light representation is displayed
116
117         -----------------------------------------
118         ---Category: Private or Protected methods
119         -----------------------------------------
120
121         SymetricPointOnSphere ( myclass ; aView  : View from V3d;
122                                           Center : Vertex from Graphic3d;
123                                           aPoint : Vertex from Graphic3d;
124                                           Radius : Parameter;
125                                           X,Y,Z  : out Coordinate;
126                                           VX,VY,VZ : out Parameter ) 
127                                           is protected ;
128         ---Level: Internal
129         ---Purpose: Returns the symetric point coordinates of "aPoint"  
130         --          on the sphere of center "Center" and radius "Radius".
131         --          VX,VY,VZ is the project vector of view.
132
133         Light ( me ) returns mutable Light from Visual3d is static private ;
134         ---Level: Internal
135         ---Purpose: Returns the Light of the associated Visual3d.
136
137 fields
138
139         MyType:         TypeOfLight from V3d is protected ;
140         MyLight:        Light from Visual3d is protected ;
141         MyGraphicStructure:     Structure from Graphic3d is protected;
142         MyGraphicStructure1:    Structure from Graphic3d is protected;
143  
144 friends
145
146         SetLightOn from class View from V3d 
147                                 ( me : mutable ; MyLight : Light from V3d ),
148         SetLightOn from class View from V3d ( me : mutable ),
149         SetLightOff from class View from V3d 
150                                 ( me : mutable ; MyLight : Light from V3d ),
151         SetLightOff from class View from V3d ( me : mutable )
152
153 end Light;