iMSTK
Interactive Medical Simulation Toolkit
imstkDirectionalLight.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 DirectionalLight : public Light
21 {
22 public:
24  {
25  this->setFocalPoint(-1.0, -1.0, -1.0);
26  }
27 
28  ~DirectionalLight() override = default;
29 
30  IMSTK_TYPE_NAME(DirectionalLight)
31 
32 
33  void setDirection(const Vec3d& dir) { setFocalPoint(dir); }
36  void setDirection(const double x, const double y, const double z) { setFocalPoint(Vec3d(x, y, z)); }
38 };
39 } // namespace imstk
Compound Geometry.
void setDirection(const Vec3d &dir)
Set the direction of the light.
A directional light has no position or range. The focal point is the direction.
void setFocalPoint(const Vec3d &p)
Get/Set the light focal point.
Definition: imstkLight.h:33
Abstract base class for lights.
Definition: imstkLight.h:22