Overte C++ Documentation
SpatialEvent.h
1 //
2 // SpatialEvent.h
3 // script-engine/src
4 //
5 // Created by Stephen Birarda on 2014-10-27.
6 // Copyright 2014 High Fidelity, Inc.
7 // Copyright 2023 Overte e.V.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 // SPDX-License-Identifier: Apache-2.0
12 //
13 
16 
17 #ifndef hifi_SpatialEvent_h
18 #define hifi_SpatialEvent_h
19 
20 #include <glm/glm.hpp>
21 #include <glm/gtc/quaternion.hpp>
22 
23 #include "ScriptValue.h"
24 
25 class ScriptEngine;
26 
28 class SpatialEvent {
29 public:
30  SpatialEvent();
31  SpatialEvent(const SpatialEvent& other);
32 
33  static ScriptValue toScriptValue(ScriptEngine* engine, const SpatialEvent& event);
34  static bool fromScriptValue(const ScriptValue& object, SpatialEvent& event);
35 
36  glm::vec3 locTranslation;
37  glm::quat locRotation;
38  glm::vec3 absTranslation;
39  glm::quat absRotation;
40 };
41 
42 Q_DECLARE_METATYPE(SpatialEvent)
43 
44 #endif // hifi_SpatialEvent_h
45 
Provides an engine-independent interface for a scripting engine.
Definition: ScriptEngine.h:93
[ScriptInterface] Provides an engine-independent interface for QScriptValue
Definition: ScriptValue.h:40
[unused] Represents a spatial event to the scripting engine
Definition: SpatialEvent.h:28