Overte C++ Documentation
ObjectActionTravelOriented.h
1 //
2 // ObjectActionTravelOriented.h
3 // libraries/physics/src
4 //
5 // Created by Seth Alves 2016-8-28
6 // Copyright 2015 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_ObjectActionTravelOriented_h
13 #define hifi_ObjectActionTravelOriented_h
14 
15 #include "ObjectAction.h"
16 
17 class ObjectActionTravelOriented : public ObjectAction {
18 public:
19  ObjectActionTravelOriented(const QUuid& id, EntityItemPointer ownerEntity);
20  virtual ~ObjectActionTravelOriented();
21 
22  virtual bool updateArguments(QVariantMap arguments) override;
23  virtual QVariantMap getArguments() override;
24 
25  virtual void updateActionWorker(float deltaTimeStep) override;
26 
27  virtual QByteArray serialize() const override;
28  virtual void deserialize(QByteArray serializedArguments) override;
29 
30 protected:
31  static const uint16_t actionVersion;
32 
33  glm::vec3 _forward { glm::vec3() }; // the vector in object space that should point in the direction of travel
34  float _angularTimeScale { 0.1f };
35 
36  glm::vec3 _angularVelocityTarget;
37 };
38 
39 #endif // hifi_ObjectActionTravelOriented_h