0024784: Move documentation in CDL files to proper location
[occt.git] / src / V3d / V3d_PositionalLight.cdl
CommitLineData
b311480e 1-- Created on: 1992-01-22
2-- Created by: GG
3-- Copyright (c) 1992-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
7fd59977 17-- Update: FDA Oct 15 1994
18-- ZOV - Mars 30 1998
7fd59977 19
20
21class PositionalLight from V3d
22
23 ---Version:
24
25 ---Purpose: Creation and modification of an isolated
ff8178ef 26 -- (positional) light source.
7fd59977 27
28 ---Keywords: Light,Positional
29
30 ---Warning:
31
32 ---References:
33
34
35inherits PositionLight from V3d
36
37uses
38
39 Viewer from V3d,
40 Coordinate from V3d,
41 View from V3d,
42 TypeOfRepresentation from V3d,
43 NameOfColor from Quantity,
44 Coefficient from Quantity,
45 Parameter from Quantity,
46 Structure from Graphic3d,
47 Vertex from Graphic3d,
48 Group from Graphic3d
49
6942f04a 50raises BadValue from V3d
7fd59977 51
52is
53
6e33d3ce 54 Create ( VM : Viewer ; X,Y,Z : Coordinate ;
7fd59977 55 Color : NameOfColor = Quantity_NOC_WHITE ;
56 Attenuation1 : Coefficient = 1.0 ;
57 Attenuation2 : Coefficient = 0.0 )
6e33d3ce 58 returns PositionalLight
7fd59977 59 ---Level: Public
60 ---Purpose: Creates an isolated light source X,Y,Z in the viewer.
61 -- It is also defined by the color Color and
62 -- two attenuation factors Attenuation1, Attenuation2.
63 -- The resulting attenuation factor determining the
64 -- illumination of a surface depends on the following
65 -- formula :
66 -- F = 1/(A1 + A2*Length)
67 -- A1,A2 being the two factors of attenuation
68 -- Length is the distance of the isolated source
69 -- from the surface.
6942f04a 70 raises BadValue from V3d;
71 ---Purpose: Warning! raises BadValue from V3d
7fd59977 72 -- if one of the attenuation coefficients is not between 0 et 1.
73
6e33d3ce 74 Create ( VM : Viewer ; Xt,Yt,Zt : Coordinate;
7fd59977 75 Xp,Yp,Zp : Coordinate;
76 Color : NameOfColor = Quantity_NOC_WHITE ;
77 Attenuation1 : Coefficient = 1.0 ;
78 Attenuation2 : Coefficient = 0.0 )
6e33d3ce 79 returns PositionalLight
7fd59977 80 ---Level: Public
81 ---Purpose: Creates a light source of the Positional type
82 -- in the viewer.
83 -- Xt,Yt,Zt : Coordinate of Target light source.
84 -- Xp,Yp,Zp : Coordinate of Position light source.
85 -- The light source is also defined by the color Color
86 -- and two attenuation factors Attenuation1,
87 -- Attenuation2 that determine the illumination of a
88 -- surface using the following formula :
89 -- F = 1/(A1 + A2*Length) where:
90 -- - A1,A2 are the two attenuation factors, and
91 -- - Length is the distance from the isolated source.
6942f04a 92 raises BadValue from V3d;
93 ---Purpose: Warning! raises BadValue from V3d
7fd59977 94 -- if one of the attenuation coefficients is not between 0 et 1.
95
96
97 --------------------------------------------------------
98 ---Category: Methods to modify the Attributes of the Light
99 --------------------------------------------------------
100
101 SetPosition ( me : mutable; X,Y,Z : Coordinate ) is redefined;
102 ---Level: Public
103 ---Purpose: Defines the position of the light source.
104
6942f04a 105 SetAttenuation( me : mutable; A1,A2 : Coefficient ) raises BadValue from V3d is static;
7fd59977 106 ---Level: Public
107 ---Purpose: Defines the attenuation factors.
6942f04a 108 -- Warning: raises BadValue from V3d
7fd59977 109 -- if one of the attenuation coefficients is not between 0 et 1.
110
111 ---------------------------------------------------
112 ---Category: Displaying methods
113 ---------------------------------------------------
114
115 Display(me: mutable; aView: View from V3d;
116 Representation : TypeOfRepresentation)
117 is redefined static;
118 ---Level: Public
119 ---Purpose: Display the graphic structure of light source
120 -- in the choosen view. We have three type of representation
121 -- - SIMPLE : Only the light source is displayed.
122 -- - PARTIAL : The light source and the light space are
123 -- displayed.
124 -- - COMPLETE : The light source, the light space and the
125 -- radius of light space are displayed.
126 -- We can choose the "SAMELAST" as parameter of representation
127 -- In this case the graphic structure representation will be
128 -- the last displayed.
129
130 ---------------------------------------------------
131 ---Category: Inquire methods
132 ---------------------------------------------------
133
134 Position ( me; X,Y,Z : out Coordinate ) is redefined static;
135 ---Level: Public
136 ---Purpose : Returns the position of the light source.
137
138 Attenuation ( me; A1,A2 : out Coefficient ) is static;
139 ---Level: Public
140 ---Purpose : Returns the attenuation factors A1,A2 of the light
141 -- source used at construction time.
142
143 -----------------------------------------
144 ---Category: Private or Protected methods
145 -----------------------------------------
146
6e33d3ce 147 Symbol ( me ; gsymbol : Group from Graphic3d ;
7fd59977 148 aView : View from V3d ) is redefined static private;
149 ---Level: Internal
150 ---Purpose: Defined the representation of the positional light source.
151
152end PositionalLight;
153
154