AnimatLab  2
Test
Light.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
23  class ANIMAT_PORT Light : public AnimatBase, public MovableItem
24  {
25  protected:
27  float m_fltRadius;
28 
31 
34 
37 
40 
43 
46 
47  virtual void UpdateData();
48 
49  public:
50  Light(void);
51  virtual ~Light(void);
52 
53  static Light *CastToDerived(AnimatBase *lpBase) {return static_cast<Light*>(lpBase);}
54 
55 #pragma region AccessorMutators
56 
57  virtual bool Enabled();
58  virtual void Enabled(bool bValue);
59 
60  virtual void Resize();
61 
70  virtual float Radius();
71 
81  virtual void Radius(float fltVal, bool bUseScaling = true);
82 
83  virtual void LatitudeSegments(int iVal);
84  virtual int LatitudeSegments();
85 
86  virtual void LongtitudeSegments(int iVal);
87  virtual int LongtitudeSegments();
88 
89  virtual void LightNumber(int iVal);
90  virtual int LightNumber();
91 
92  virtual void ConstantAttenRatio(float fltVal);
93  virtual float ConstantAttenRatio();
94 
95  virtual void LinearAttenDistance(float fltVal, bool bUseScaling = true);
96  virtual float LinearAttenDistance();
97 
98  virtual void QuadraticAttenDistance(float fltVal, bool bUseScaling = true);
99  virtual float QuadraticAttenDistance();
100 
101 #pragma endregion
102 
103 #pragma region DataAccesMethods
104 
105  virtual void SetSystemPointers(Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify);
106  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
107  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
108 
109 #pragma endregion
110 
111  virtual void Selected(bool bValue, bool bSelectMultiple);
112  virtual void VisualSelectionModeChanged(int iNewMode);
113  virtual void Create();
114 
115  virtual void Load(CStdXml &oXml);
116  };
117 
118  } // Environment
119 } //AnimatSim
Simulates the entire environment.
Definition: Simulator.h:31
Root namespace for the base simulation library for AnimatLab.
Base class for the light object.
Definition: Light.h:23
float m_fltQuadraticAttenDistance
The quadratic attenuation distance.
Definition: Light.h:45
float m_fltLinearAttenDistance
The linear attenuation distance.
Definition: Light.h:42
Baes class for all items that can be moved/roated within the environment.
Definition: MovableItem.h:19
int m_iLightNum
Zero-based index of the light number. OSG only allows 8 lights.
Definition: Light.h:36
A "static" structure in the simulation.
Definition: Structure.h:84
float m_fltRadius
The radius of the sphere.
Definition: Light.h:27
float m_fltConstantAttenRatio
The constant attenuation ratio.
Definition: Light.h:39
Animat base class.
Definition: AnimatBase.h:36
int m_iLatitudeSegments
Number of segments along the latitude direction that are used to build the sphere.
Definition: Light.h:30
Base class for body parts and neural network nodes.
Definition: Node.h:25
int m_iLongtitudeSegments
Number of segments along the longtitude direction that are used to build the sphere.
Definition: Light.h:33