H3D API  2.4.1
SpotLight.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
27 //
29 #ifndef __SPOTLIGHT_H__
30 #define __SPOTLIGHT_H__
31 
32 #include <H3D/X3DLightNode.h>
33 #include <H3D/SFVec3f.h>
34 
35 namespace H3D {
36 
94  class H3DAPI_API SpotLight : public X3DLightNode {
95  public:
96 
98  SpotLight( Inst< SFNode > _metadata = 0,
99  Inst< SFFloat> _ambientIntensity = 0,
100  Inst< SFColor> _color = 0,
101  Inst< SFFloat> _intensity = 0,
102  Inst< SFBool > _global = 0,
103  Inst< SFBool > _on = 0,
104  Inst< SFVec3f> _attenuation = 0,
105  Inst< SFFloat> _beamWidth = 0,
106  Inst< SFFloat> _cutOffAngle = 0,
107  Inst< SFVec3f> _direction = 0,
108  Inst< SFVec3f> _location = 0,
109  Inst< SFFloat> _radius = 0 );
110 
112  GLLightInfo getGLLightInfo();
113 
128  H3DUniquePtr< SFVec3f > attenuation;
129 
145  H3DUniquePtr< SFFloat > beamWidth;
146 
155  H3DUniquePtr< SFFloat > cutOffAngle;
156 
164  H3DUniquePtr< SFVec3f > direction;
165 
175  H3DUniquePtr< SFVec3f > location;
176 
178  H3DUniquePtr< SFFloat > radius;
179 
182  };
183 }
184 
185 #endif
Contains the SFVec3f field class.
Header file for X3DLightNode, X3D scene-graph node.
The SpotLight node defines a light source that emits light from a specific point along a specific dir...
Definition: SpotLight.h:94
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: SpotLight.h:181
H3DUniquePtr< SFVec3f > attenuation
The attenuation field defines how the SpotLight node's illumination falls off with distance from the ...
Definition: SpotLight.h:128
H3DUniquePtr< SFFloat > cutOffAngle
The cutOffAngle field specifies the outer bound of the solid angle.
Definition: SpotLight.h:155
H3DUniquePtr< SFFloat > radius
This field is not supported by H3DAPI.
Definition: SpotLight.h:178
H3DUniquePtr< SFVec3f > direction
The direction field specifies the direction vector of the light's central axis defined in the local c...
Definition: SpotLight.h:164
H3DUniquePtr< SFVec3f > location
The location field specifies a translation offset of the centre point of the light source from the li...
Definition: SpotLight.h:175
H3DUniquePtr< SFFloat > beamWidth
The beamWidth field specifies an inner solid angle in which the light source emits light at uniform f...
Definition: SpotLight.h:145
The X3DLightNode abstract node type is the base type from which all node types that serve as light so...
Definition: X3DLightNode.h:70
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194
A structure representing a the OpenGL representation of the specified light source.
Definition: X3DLightNode.h:75