i6engine  1.0
MovingCameraComponent.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_MOVINGCAMERACOMPONENT_H__
26 #define __I6ENGINE_API_MOVINGCAMERACOMPONENT_H__
27 
29 
30 namespace i6e {
31 namespace api {
32 
39  public:
40  MovingCameraComponent(const int64_t id, const attributeMap & params);
42 
43  std::string getTemplateName() const override {
44  return "MovingCamera";
45  }
46 
47  private:
48  Vec3 _oldPos;
49 
50  void Init() override;
51 
52  void Finalize() override;
53 
54  void Tick() override;
55  };
56 
57 } /* namespace api */
58 } /* namespace i6e */
59 
60 #endif /* __I6ENGINE_API_MOVINGCAMERACOMPONENT_H__ */
61 
#define ISIXE_MODULES_API
std::map< std::string, std::string > attributeMap
Definition: attributeMap.h:42
Implements 3-dimensional vectors.
Definition: i6eVector.h:48
Attaches a moving camera to an object. This camera will follow the object in a more sophisticated way...
Attaches a camera to an object. The Camera will follow the object For creating a CameraComponent, these keys are possible: Name Required Type Description Public pos yes Vec3 relative position of camera to SceneNode yes lookAt yes Vec3 absolute look at position in the world yes nearclip yes double near clipping distance yes aspect no double aspect ration of the camera yes viewport no bool defines whether this camera has a viewport or not yes zOrder *) int relative position on the screen depending on other viewports (has to be unique), *) required when viewport true yes vp_left *) double left startpoint of the viewport, value between 0 and 1, *) required when viewport true yes vp_top *) double uppper startpoint of the viewport, value between 0 and 1, *) required when viewport true yes vp_width *) double width of the viewport, value between 0 and 1, *) required when viewport true yes vp_height *) double height of the viewport, value between 0 and 1, *) required when viewport true yes vp_red *) double red part of the viewports background colour, *) required when viewport true yes vp_green *) double green part of the viewports background colour, *) required when viewport true yes vp_blue *) double blue part of the viewports background colour, *) required when viewport true yes vp_alpha *) double alpha part of the viewports background colour, *) required when viewport true yes
std::string getTemplateName() const override
returns the name this template was registered with