iMSTK
Interactive Medical Simulation Toolkit
imstkSpotLight.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkMacros.h"
10 #include "imstkPointLight.h"
11 
12 namespace imstk
13 {
19 class SpotLight : public PointLight
20 {
21 public:
22  SpotLight() : m_spotAngle(10.0) { }
23  ~SpotLight() override = default;
24 
25  IMSTK_TYPE_NAME(SpotLight)
26 
27 
28  double getSpotAngle() const { return m_spotAngle; }
31 
35  void setSpotAngle(const double angle) { m_spotAngle = angle; }
36 
37 protected:
38  double m_spotAngle = 45.0;
39 };
40 } // namespace imstk
Compound Geometry.
double getSpotAngle() const
Get the spotlight angle in degrees.
void setSpotAngle(const double angle)
Set the spotlight angle in degrees.
A point light has a position, and it's range is determined by it's intensity.