#pragma once #include "entities/SceneComponent.h" #include class PathComponent : public SceneComponent { Q_OBJECT public: explicit PathComponent(SceneComponent* parent = nullptr); ~PathComponent(); static std::string GetTypeName(); std::string GetSelfTypeName() const override { return PathComponent::GetTypeName(); } bool SetAttribute(const char* name, const char* value) override; bool SaveAttribute(tinyxml2::XMLElement* element) override; void Begin() override; void Update(double dt) override; void SetPath(const QString& path); const QString& GetPath() const; protected: class TransformPath* transformPath_{nullptr}; double deltaTime_{ 0.0 }; class Timestep* timeStep_{ nullptr }; osg::ref_ptr animationPath_; QString path_; };