42cf5bc1 |
1 | // Created on: 1997-02-12 |
2 | // Created by: Alexander BRIVIN |
3 | // Copyright (c) 1997-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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 |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Vrml_DirectionalLight_HeaderFile |
18 | #define _Vrml_DirectionalLight_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <Standard_Real.hxx> |
26 | #include <Quantity_Color.hxx> |
27 | #include <gp_Vec.hxx> |
28 | #include <Standard_OStream.hxx> |
29 | class Quantity_Color; |
30 | class gp_Vec; |
31 | |
32 | |
33 | //! defines a directional light node of VRML specifying |
34 | //! properties of lights. |
35 | //! This node defines a directional light source that illuminates |
36 | //! along rays parallel to a given 3-dimentional vector |
37 | //! Color is written as an RGB triple. |
38 | //! Light intensity must be in the range 0.0 to 1.0, inclusive. |
39 | class Vrml_DirectionalLight |
40 | { |
41 | public: |
42 | |
43 | DEFINE_STANDARD_ALLOC |
44 | |
45 | |
46 | Standard_EXPORT Vrml_DirectionalLight(); |
47 | |
48 | Standard_EXPORT Vrml_DirectionalLight(const Standard_Boolean aOnOff, const Standard_Real aIntensity, const Quantity_Color& aColor, const gp_Vec& aDirection); |
49 | |
50 | Standard_EXPORT void SetOnOff (const Standard_Boolean aOnOff); |
51 | |
52 | Standard_EXPORT Standard_Boolean OnOff() const; |
53 | |
54 | Standard_EXPORT void SetIntensity (const Standard_Real aIntensity); |
55 | |
56 | Standard_EXPORT Standard_Real Intensity() const; |
57 | |
58 | Standard_EXPORT void SetColor (const Quantity_Color& aColor); |
59 | |
60 | Standard_EXPORT Quantity_Color Color() const; |
61 | |
62 | Standard_EXPORT void SetDirection (const gp_Vec& aDirection); |
63 | |
64 | Standard_EXPORT gp_Vec Direction() const; |
65 | |
66 | Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const; |
67 | |
68 | |
69 | |
70 | |
71 | protected: |
72 | |
73 | |
74 | |
75 | |
76 | |
77 | private: |
78 | |
79 | |
80 | |
81 | Standard_Boolean myOnOff; |
82 | Standard_Real myIntensity; |
83 | Quantity_Color myColor; |
84 | gp_Vec myDirection; |
85 | |
86 | |
87 | }; |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | #endif // _Vrml_DirectionalLight_HeaderFile |