VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLightEditorWidget.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2019 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "lightEditorPlugin.h"
13 
14 #include "DtLightEditorWidgetUI.hpp"
15 #include "DtLightEditorInterface.h"
16 
17 #include <QtWidgets/QWidget>
18 
19 namespace makVrv
20 {
21 
26  : public QWidget , public Ui_DtExampleWidgetUI
27  , public DtLightEditorInterface
28  { Q_OBJECT;
29  public:
30 
32  DtLightEditorWidget( QWidget* parent = 0, Qt::WindowFlags f = Qt::Widget );
33 
35  virtual ~DtLightEditorWidget();
36 
37  virtual void setLights(const std::vector<std::string>& lightNames) ;
38  virtual void setAmbient(float r, float g, float b, float a) ;
39  virtual void setDiffuse(float r, float g, float b, float a) ;
40  virtual void setSpecular(float r, float g, float b, float a) ;
41  virtual void setConstantAttenuation(float constantAttenuation) ;
42  virtual void setLinearAttenuation(float linearAttenuation) ;
43  virtual void setQuadraticAttenuation(float quadraticAttenuation) ;
44  virtual void setSpotExponent(float spotExponent) ;
45  virtual void setSpotCutoff(float spotCutoff) ;
46 
47  public slots:
48  void slot_onLightChanged(const QString& lightName);
49  void slot_onConstantAttenuationChanged(double val);
50  void slot_onLinearAttenuationChanged(double val);
51  void slot_onQuadraticAttenuationChanged(double val);
52  void slot_onSpotExponentChanged(double val);
53  void slot_onSpotCutoffChanged(double val);
54  void slot_onAmbientClicked();
55  void slot_onDiffuseClicked();
56  void slot_onSpecularClicked();
57  protected:
58  struct Color { float r; float g; float b; float a; };
62  };
63 
64 }
Contains DLL export macros.
Example Widget that is part of the example page. Based on the humble dialog pattern.
Definition: DtLightEditorWidget.h:25
float r
Definition: DtLightEditorWidget.h:58
Example Interface (based on the humble dialog pattern).
Definition: DtLightEditorInterface.h:23
Color myDiffuse
Definition: DtLightEditorWidget.h:60
Color myAmbient
Definition: DtLightEditorWidget.h:59
Definition: DtLightEditorWidget.h:58
Contains the makVrv::DtLightEditorInterface class declaration.
Color mySpecular
Definition: DtLightEditorWidget.h:61
#define DT_DLL_EXAMPLELIGHTEDITOR
Definition: lightEditorPlugin.h:19

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)