ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Light.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <Eigen/Geometry>
11 #include <cmath>
12 
13 namespace cloudViewer {
14 namespace visualization {
15 namespace rendering {
16 
17 struct Light {
19 
20  // common light parameters
21  Eigen::Vector3f color = Eigen::Vector3f(1.f, 1.f, 1.f);
22  Eigen::Vector3f position = Eigen::Vector3f(0.f, 0.f, 0.f);
24  float intensity = 10000.f;
25  float falloff = 10.f;
26  bool cast_shadows = false;
27 
28  Eigen::Vector3f direction = Eigen::Vector3f(0.f, 0.f, -1.f);
29 
30  // Spot lights parameters
31  float light_cone_inner = float(M_PI / 4.0);
32  float light_cone_outer = float(M_PI / 2.0);
33 };
34 
35 } // namespace rendering
36 } // namespace visualization
37 } // namespace cloudViewer
constexpr double M_PI
Pi.
Definition: CVConst.h:19
Generic file read and write utility for python interface.