1 -- Created on: 1992-01-17
3 -- Copyright (c) 1992-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 -- Update: FDA Oct 15 1994
23 -- GG IMP230300 Add SetColor() and Color() methods
24 -- GG - 23/11/00 Add IsDisplayed() method
27 deferred class Light from V3d
29 ---Purpose: Defines services on Light type objects..
40 TypeOfRepresentation from V3d,
41 TypeOfPickLight from V3d,
46 TypeOfColor from Quantity,
47 NameOfColor from Quantity,
49 Parameter from Quantity,
50 PlaneAngle from Quantity,
52 Vertex from Graphic3d,
53 Structure from Graphic3d
60 Initialize( VM : mutable Viewer ) ;
62 --------------------------------------------------------
63 ---Category: Methods to modify the attributes of the Light
64 --------------------------------------------------------
66 SetColor( me : mutable; Type: TypeOfColor ; V1 , V2 , V3 : Parameter)
69 ---Purpose: Defines the colour of a light source
70 -- according to the type of colour definition
71 -- and the three corresponding values.
73 SetColor( me : mutable; Name : NameOfColor ) is static;
75 ---Purpose: Defines the colour of a light source by giving
76 -- the name of the colour in the form Quantity_NOC_xxxx .
78 SetColor( me : mutable; Name : Color ) is static;
80 ---Purpose: Defines the colour of a light source by giving
83 ---------------------------------------------------
84 ---Category: Inquire methods
85 ---------------------------------------------------
87 Color ( me; Type: TypeOfColor ; V1 , V2 , V3 : out Parameter )
90 ---Purpose: Returns the colour of the light source depending of
93 Color( me ; Name : out NameOfColor ) is static;
95 ---Purpose: Returns the colour of the light source.
97 Color( me ) returns Color is static;
99 ---Purpose: Returns the colour of the light source.
101 Type ( me ) returns TypeOfLight from V3d is static;
103 ---Purpose: Returns the Type of the Light
105 Headlight ( me ) returns Boolean from Standard is static;
107 ---Purpose: returns true if the light is a headlight
109 SetHeadlight( me : mutable; theValue : Boolean from Standard ) is static;
111 ---Purpose: Setup headlight flag.
113 IsDisplayed( me ) returns Boolean from Standard;
115 ---Purpose: Returns TRUE when a light representation is displayed
117 -----------------------------------------
118 ---Category: Private or Protected methods
119 -----------------------------------------
121 SymetricPointOnSphere ( myclass ; aView : View from V3d;
122 Center : Vertex from Graphic3d;
123 aPoint : Vertex from Graphic3d;
125 X,Y,Z : out Coordinate;
126 VX,VY,VZ : out Parameter )
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.
133 Light ( me ) returns mutable Light from Visual3d is static private ;
135 ---Purpose: Returns the Light of the associated Visual3d.
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;
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 )