0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / Vrml / Vrml_PointLight.hxx
CommitLineData
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_PointLight_HeaderFile
18#define _Vrml_PointLight_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>
29class Quantity_Color;
30class gp_Vec;
31
32
33//! defines a point light node of VRML specifying
34//! properties of lights.
35//! This node defines a point light source at a fixed 3D location
36//! A point source illuminates equally in all directions;
37//! that is omni-directional.
38//! Color is written as an RGB triple.
39//! Light intensity must be in the range 0.0 to 1.0, inclusive.
40class Vrml_PointLight
41{
42public:
43
44 DEFINE_STANDARD_ALLOC
45
46
47 Standard_EXPORT Vrml_PointLight();
48
49 Standard_EXPORT Vrml_PointLight(const Standard_Boolean aOnOff, const Standard_Real aIntensity, const Quantity_Color& aColor, const gp_Vec& aLocation);
50
51 Standard_EXPORT void SetOnOff (const Standard_Boolean aOnOff);
52
53 Standard_EXPORT Standard_Boolean OnOff() const;
54
55 Standard_EXPORT void SetIntensity (const Standard_Real aIntensity);
56
57 Standard_EXPORT Standard_Real Intensity() const;
58
59 Standard_EXPORT void SetColor (const Quantity_Color& aColor);
60
61 Standard_EXPORT Quantity_Color Color() const;
62
63 Standard_EXPORT void SetLocation (const gp_Vec& aLocation);
64
65 Standard_EXPORT gp_Vec Location() const;
66
67 Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
68
69
70
71
72protected:
73
74
75
76
77
78private:
79
80
81
82 Standard_Boolean myOnOff;
83 Standard_Real myIntensity;
84 Quantity_Color myColor;
85 gp_Vec myLocation;
86
87
88};
89
90
91
92
93
94
95
96#endif // _Vrml_PointLight_HeaderFile