Skyscraper 2.0
light.h
Go to the documentation of this file.
1/*
2 Scalable Building Simulator - Light Object
3 The Skyscraper Project - Version 2.0
4 Copyright (C)2004-2024 Ryan Thoryk
5 https://www.skyscrapersim.net
6 https://sourceforge.net/projects/skyscraper/
7 Contact - ryan@skyscrapersim.net
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22*/
23
24#ifndef _SBS_LIGHT_H
25#define _SBS_LIGHT_H
26
27namespace SBS {
28
29class SBSIMPEXP Light : public Object
30{
31public:
32
33 int Type;
34
35 //functions
36 Light(Object *parent, const std::string &name, int type);
37 ~Light();
38 void SetColor(Real color_r = 1.0f, Real color_g = 1.0f, Real color_b = 1.0f);
39 void SetSpecularColor(Real color_r = 0.0f, Real color_g = 0.0f, Real color_b = 0.0f);
40 void SetAttenuation(Real att_range = 100000.f, Real att_constant = 1.f, Real att_linear = 0.f, Real att_quadratic = 0.f);
41 void SetSpotlightRange(Real spot_inner_angle = 30.f, Real spot_outer_angle = 40.f, Real spot_falloff = 1.f);
42 void SetDirection(const Vector3 &direction);
43 void SetRenderingDistance(Real distance);
44 void Enabled(bool value);
45 bool IsEnabled();
46
47private:
48
49 Ogre::Light* light;
50};
51
52}
53
54#endif
int Type
Definition light.h:33
Ogre::Light * light
Definition light.h:49
Ogre::Vector3 Vector3
Definition globals.h:58
Ogre::Real Real
Definition globals.h:57
#define SBSIMPEXP
Definition globals.h:53