From 1f4225345723d338eaa221f5d291d28856a0bd80 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens <21057728+passervr@users.noreply.github.com> Date: Thu, 23 Nov 2023 14:54:10 +0100 Subject: [PATCH] Make override possible --- Quadcopter.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Quadcopter.h b/Quadcopter.h index 5d62f78..1d307b4 100644 --- a/Quadcopter.h +++ b/Quadcopter.h @@ -4,20 +4,23 @@ #include "Vector3.h" class Quadcopter : public Thing { -public: - Quadcopter(); + public: + Quadcopter(); - void LinearMotion(Vector3 velocity, float yawSpeed = 0.0F, float rollSpeed = 0.0); - void SetTwistSpeed(float forward, float yaw, float pitch); - void SetTwistSpeed(Vector3 velocity, float yawSpeed = 0.0F); + void LinearMotion(Vector3 velocity, + float yawSpeed = 0.0F, + float rollSpeed = 0.0); + void SetTwistSpeed(float forward, float yaw, float pitch); + virtual void SetTwistSpeed(Vector3 velocity, float yawSpeed = 0.0F); - Vector3 GetTargetVelocity(); - float GetYawSpeed(); - float GetPitchSpeed(); - float GetRollSpeed(); -protected: - Vector3 velocity = Vector3::zero; - float pitchSpeed = 0.0F; - float yawSpeed = 0.0F; - float rollSpeed = 0.0F; + Vector3 GetTargetVelocity(); + float GetYawSpeed(); + float GetPitchSpeed(); + float GetRollSpeed(); + + protected: + Vector3 velocity = Vector3::zero; + float pitchSpeed = 0.0F; + float yawSpeed = 0.0F; + float rollSpeed = 0.0F; }; \ No newline at end of file