ALBA
albaLightKit.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaLightKit
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaLightKit_H__
18#define __albaLightKit_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaEvent.h"
24#include "albaObserver.h"
25#include "albaServiceClient.h"
26#include "albaAbsLogicManager.h"
27
28#define MAX_NUM_LIGHT 10
29
30//----------------------------------------------------------------------------
31// forward references :
32//----------------------------------------------------------------------------
33class albaGUIButton;
34class vtkLight;
35class vtkRenderer;
36class albaGUI;
37
38//----------------------------------------------------------------------------
39// albaLightKit :
40//----------------------------------------------------------------------------
43class ALBA_EXPORT albaLightKit : public albaObserver, public albaServiceClient
44{
45public:
46 albaLightKit(wxWindow* parent, vtkRenderer *r, albaObserver *Listener = NULL);
48
49 void OnEvent(albaEventBase *alba_event);
50 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
51 void CreateGui();
52
54 albaGUI *GetGui() {return m_Gui;};
55
56protected:
57 class LightItem {
58 public:
59 LightItem(wxString n, int onoff,float az,float el,float inten,wxColour c, vtkLight *l) {m_Name = n; m_OnOff = onoff; m_Azimuth = az; m_Elevation = el; m_Intensity = inten; m_Colour = c; m_Light = l;};
61
62 wxString m_Name;
64 float m_Azimuth,m_Elevation,m_Intensity;
65 wxColour m_Colour;
66 vtkLight *m_Light;
67 };
68
70 void AddLight();
71
73 void RemoveLight(int sel);
74
77
79 void EnableWidget(bool enable);
80
82
85
87 wxListBox *m_LightList;
89 LightItem *m_LightItemList[MAX_NUM_LIGHT];
94 wxColour m_LightColor;
95
96 vtkRenderer *m_LightRenderer;
97
100};
101#endif
#define MAX_NUM_LIGHT
Definition: albaLightKit.h:28
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUIButton inherit from wxButton.
Definition: albaGUIButton.h:35
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
LightItem(wxString n, int onoff, float az, float el, float inten, wxColour c, vtkLight *l)
Definition: albaLightKit.h:59
wxWindow * m_LightParentPanel
Definition: albaLightKit.h:98
albaGUIButton * m_ButtonAdd
Definition: albaLightKit.h:83
double m_LightIntensity
Definition: albaLightKit.h:92
double m_LightElevation
Definition: albaLightKit.h:91
vtkRenderer * m_LightRenderer
Definition: albaLightKit.h:96
void RemoveLight(int sel)
Remove the selected light (into the light list listbox) from the scene.
double m_LightAzimuth
Definition: albaLightKit.h:90
albaGUI * GetGui()
Returns the albaLightKit's GUI.
Definition: albaLightKit.h:54
albaGUIButton * m_ButtonRemove
Definition: albaLightKit.h:84
albaGUI * m_Gui
Definition: albaLightKit.h:99
void EnableWidget(bool enable)
Enable-Disable interface's widgets.
wxListBox * m_LightList
Definition: albaLightKit.h:87
void SetListener(albaObserver *Listener)
Definition: albaLightKit.h:50
void AddLight()
Add a light to the scene.
int m_LightCounter
Definition: albaLightKit.h:86
albaLightKit(wxWindow *parent, vtkRenderer *r, albaObserver *Listener=NULL)
void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
wxColour m_LightColor
Definition: albaLightKit.h:94
void ParametersInit()
Initialize the interface's parameters.
albaObserver * m_Listener
Definition: albaLightKit.h:81
LightItem * m_SelectedLight
Definition: albaLightKit.h:88
void CreateGui()
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36