History

Interim JSDoc for Scene

David Rowe committed 8 years ago

Commit 2c39f2d1 parent 62930eb1 file · +57 −1Browse files

Showing the changes to libraries/script-engine/src/SceneScriptingInterface.h (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/SceneScriptingInterface.h+57−1
@@ -19,6 +19,13 @@ · 18 unmodified lines
1919
2020 // TODO: if QT moc ever supports nested classes, subclass these to the interface instead of namespacing
2121 namespace SceneScripting {
22+
23+ /**jsdoc
24+ * @typedef Scene.Stage.Location
25+ * @property {number} longitude
26+ * @property {number} latitude
27+ * @property {number} altitude
28+ */
2229 class Location : public QObject {
2330 Q_OBJECT
2431
@@ -41,6 +48,11 @@ namespace SceneScripting { · 16 unmodified lines
4148 };
4249 using LocationPointer = std::unique_ptr<Location>;
4350
51+ /**jsdoc
52+ * @typedef Scene.Stage.Time
53+ * @property {number} hour
54+ * @property {number} day
55+ */
4456 class Time : public QObject {
4557 Q_OBJECT
4658
@@ -60,6 +72,13 @@ namespace SceneScripting { · 13 unmodified lines
6072 };
6173 using TimePointer = std::unique_ptr<Time>;
6274
75+ /**jsdoc
76+ * @typedef Scene.Stage.KeyLight
77+ * @property {Vec3} color
78+ * @property {number} intensity
79+ * @property {number} ambientIntensity
80+ * @property {Vec3} direction
81+ */
6382 class KeyLight : public QObject {
6483 Q_OBJECT
6584
@@ -91,6 +110,14 @@ namespace SceneScripting { · 25 unmodified lines
91110 };
92111 using KeyLightPointer = std::unique_ptr<KeyLight>;
93112
113+ /**jsdoc
114+ * @class Scene.Stage
115+ * @property {string} backgroundMode
116+ * @property {Scene.Stage.KeyLight} keyLight
117+ * @property {Scene.Stage.Location} location
118+ * @property {boolean} sunModel
119+ * @property {Scene.Stage.Time} time
120+ */
94121 class Stage : public QObject {
95122 Q_OBJECT
96123
@@ -99,10 +126,22 @@ namespace SceneScripting { · 2 unmodified lines
99126 : _skyStage{ skyStage },
100127 _location{ new Location{ skyStage } }, _time{ new Time{ skyStage } }, _keyLight{ new KeyLight{ skyStage } }{}
101128
129+ /**jsdoc
130+ * @function Scene.Stage.setOrientation
131+ * @param {Quat} orientation
132+ */
102133 Q_INVOKABLE void setOrientation(const glm::quat& orientation) const;
103134
104135 Q_PROPERTY(Location* location READ getLocation)
136+
105137 Location* getLocation() const { return _location.get(); }
138+
139+ /**jsdoc
140+ * @function Scene.Stage.setLocation
141+ * @param {number} longitude
142+ * @param {number} latitude
143+ * @param {number} altitude
144+ */
106145 Q_INVOKABLE void setLocation(float longitude, float latitude, float altitude);
107146
108147 Q_PROPERTY(Time* time READ getTime)
@@ -130,10 +169,15 @@ namespace SceneScripting { · 21 unmodified lines
130169 using StagePointer = std::unique_ptr<Stage>;
131170 };
132171
172+/**jsdoc
173+ * @namespace Scene
174+ * @property {boolean} shouldRenderAvatars
175+ * @property {boolean} shouldRenderEntities
176+ * @property {Scene.Stage} stage
177+ */
133178 class SceneScriptingInterface : public QObject, public Dependency {
134179 Q_OBJECT
135180 SINGLETON_DEPENDENCY
136−
137181
138182 public:
139183 Q_PROPERTY(bool shouldRenderAvatars READ shouldRenderAvatars WRITE setShouldRenderAvatars)
@@ -149,7 +193,19 @@ public: · 9 unmodified lines
149193 graphics::SunSkyStagePointer getSkyStage() const;
150194
151195 signals:
196+
197+ /**jsdoc
198+ * @function Scene.shouldRenderAvatarsChanged
199+ * @param {boolean} shouldRenderAvatars
200+ * @returns {Signal}
201+ */
152202 void shouldRenderAvatarsChanged(bool shouldRenderAvatars);
203+
204+ /**jsdoc
205+ * @function Scene.shouldRenderEntitiesChanged
206+ * @param {boolean} shouldRenderEntities
207+ * @returns {Signal}
208+ */
153209 void shouldRenderEntitiesChanged(bool shouldRenderEntities);
154210
155211 protected:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t