i6engine  1.0
AnimatedSpotLightComponent.h
Go to the documentation of this file.
1 /*
2  * i6engine
3  * Copyright (2016) Daniel Bonrath, Michael Baer, All rights reserved.
4  *
5  * This file is part of i6engine; i6engine is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
25 #ifndef __I6ENGINE_API_ANIMATEDSPOTLIGHTCOMPONENT_H_
26 #define __I6ENGINE_API_ANIMATEDSPOTLIGHTCOMPONENT_H_
27 
29 
30 namespace i6e {
31 namespace api {
32 
47  public:
51  AnimatedSpotLightComponent(const int64_t id, const attributeMap & params);
52 
54 
58  attributeMap synchronize() const override;
59 
60  std::string getTemplateName() const override {
61  return "AnimatedSpotLight";
62  }
63 
64  std::vector<componentOptions> getComponentOptions() override;
65 
66  private:
67  uint64_t _directionDuration;
68  std::map<double, Vec3> _directions;
69  uint64_t _innerRangeDuration;
70  std::map<double, double> _innerRanges;
71  uint64_t _outerRangeDuration;
72  std::map<double, double> _outerRanges;
73 
74  void Tick() override;
75  };
76 
77 } /* namespace api */
78 } /* namespace i6e */
79 
80 #endif /* __I6ENGINE_API_ANIMATEDSPOTLIGHTCOMPONENT_H_ */
81 
#define ISIXE_MODULES_API
std::string getTemplateName() const override
returns the name this template was registered with
std::map< std::string, std::string > attributeMap
Definition: attributeMap.h:42
interpolates light colours and attenuation (e.g. range) For creating a AnimatedLuminousAppearanceComp...
Tells the engine that this GameObject is emitting light. For creating a AnimatedSpotLightComponent, these keys are possible: Name Required Type Description Public directionDuration no int duration of one direction interpolation cycle yes directionKey_ no Vec3 direction at timePoint encoded in name (timePoint between 0 and 1) yes innerRangeDuration no int duration of one inner range interpolation cycle yes innerRangeKey_ no double inner range at timePoint encoded in name (timePoint between 0 and 1) yes outerRangeDuration no int duration of one outer range interpolation cycle yes outerRangeKey_ no double outer range at timePoint encoded in name (timePoint between 0 and 1) yes