iMSTK
Interactive Medical Simulation Toolkit
imstkPointLight.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 "imstkLight.h"
10 #include "imstkMacros.h"
11 
12 namespace imstk
13 {
20 class PointLight : public Light
21 {
22 public:
23  PointLight() = default;
24  ~PointLight() override = default;
25 
26  IMSTK_TYPE_NAME(PointLight)
27 
28  const Vec3d getPosition() const { return m_position; }
29  void setPosition(const Vec3d& p) { m_position = p; }
30  void setPosition(const double x, const double y, const double z)
31  {
32  this->setPosition(Vec3d(x, y, z));
33  }
34 
35 protected:
36  Vec3d m_position = Vec3d::Zero();
37 };
38 } // namespace imstk
Compound Geometry.
A point light has a position, and it's range is determined by it's intensity.
Abstract base class for lights.
Definition: imstkLight.h:22