973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
21b2385f |
14 | #include <V3d_DirectionalLight.hxx> |
7fd59977 |
15 | |
42cf5bc1 |
16 | #include <V3d.hxx> |
7fd59977 |
17 | |
92efcf78 |
18 | IMPLEMENT_STANDARD_RTTIEXT(V3d_DirectionalLight,V3d_PositionLight) |
19 | |
c357e426 |
20 | // ======================================================================= |
21 | // function : V3d_DirectionalLight |
22 | // purpose : |
23 | // ======================================================================= |
992ed6b3 |
24 | V3d_DirectionalLight::V3d_DirectionalLight (const V3d_TypeOfOrientation theDirection, |
87432b82 |
25 | const Quantity_Color& theColor, |
c357e426 |
26 | const Standard_Boolean theIsHeadlight) |
f7fc0c03 |
27 | : V3d_PositionLight (Graphic3d_TOLS_DIRECTIONAL) |
c357e426 |
28 | { |
c357e426 |
29 | SetColor (theColor); |
30 | SetHeadlight (theIsHeadlight); |
992ed6b3 |
31 | SetDirection (V3d::GetProjAxis (theDirection)); |
7fd59977 |
32 | } |
33 | |
c357e426 |
34 | // ======================================================================= |
35 | // function : V3d_DirectionalLight |
36 | // purpose : |
37 | // ======================================================================= |
992ed6b3 |
38 | V3d_DirectionalLight::V3d_DirectionalLight (const gp_Dir& theDirection, |
87432b82 |
39 | const Quantity_Color& theColor, |
c357e426 |
40 | const Standard_Boolean theIsHeadlight) |
f7fc0c03 |
41 | : V3d_PositionLight (Graphic3d_TOLS_DIRECTIONAL) |
c357e426 |
42 | { |
c357e426 |
43 | SetColor (theColor); |
44 | SetHeadlight (theIsHeadlight); |
992ed6b3 |
45 | SetDirection (theDirection); |
7fd59977 |
46 | } |
47 | |
c357e426 |
48 | // ======================================================================= |
49 | // function : SetDirection |
50 | // purpose : |
51 | // ======================================================================= |
992ed6b3 |
52 | void V3d_DirectionalLight::SetDirection (V3d_TypeOfOrientation theDirection) |
c357e426 |
53 | { |
992ed6b3 |
54 | SetDirection (V3d::GetProjAxis (theDirection)); |
7fd59977 |
55 | } |