AnnLightObject.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "systemMacro.h"
9 
10 #include "AnnAbstractMovable.hpp"
11 #include "AnnTypes.h"
12 
13 #include <OgreLight.h>
14 
15 namespace Annwvyn
16 {
17  class AnnEngine;
18 
21  {
22  public:
23  AnnLightObject(Ogre::Light* light, const std::string& name);
24  virtual ~AnnLightObject();
25 
27  enum LightTypes {
29  ANN_LIGHT_POINT = Ogre::Light::LightTypes::LT_POINT,
31  ANN_LIGHT_DIRECTIONAL = Ogre::Light::LightTypes::LT_DIRECTIONAL,
33  ANN_LIGHT_SPOTLIGHT = Ogre::Light::LightTypes::LT_SPOTLIGHT,
34 
35  ANN_LIGHT_ERROR = -1
36  };
37 
38  static LightTypes getLightTypeFromString(const std::string& ltype);
39 
41  void setPosition(AnnVect3 position) override;
43  AnnVect3 getPosition() override;
45  void setDirection(AnnVect3 direction) const;
47  AnnVect3 getDirection() const;
49  void setType(LightTypes type) const;
51  void setDiffuseColor(AnnColor color) const;
53  void setSpecularColor(AnnColor color) const;
55  AnnColor getDiffuseColor() const;
57  AnnColor getSpecularColor() const;
58 
60  void setPower(float lumens) const;
61 
63  float getPower() const;
64 
66  void setAttenuation(float range, float constant, float linear, float quadratic) const;
67 
69  Ogre::Light* _getOgreLight() const;
70 
72  std::string getName() const;
73 
74  private:
75  friend class AnnEngine;
76  friend class AnnGameObjectManager;
77  Ogre::Light* light;
78  Ogre::SceneNode* node;
80  };
81 
83 }
file for defining macros used for symbol export regarding the way the OS does things.
Ogre::SceneNode * node
Class that represent a 4 channel color value.
Definition: AnnColor.hpp:17
const std::string name
Main engine class. Creating an instance of this class make the engine start.
Definition: AnnEngine.hpp:70
A 3D Vector.
Definition: AnnVect3.hpp:16
Namespace containing the totality of Annwvyn components.
Definition: AnnGetter.cpp:8
LightTypes
Defines the type of light.
Abstract Class that represent a an object that you can set the position. Define the API used to move ...
Game object manager. Create, destroy and keep track of objects, lights and other movable stuff...
Data types definition for Annwvyn.
#define AnnDllExport
Definition: systemMacro.h:24
Light Object : Represent a light source.