diff --git a/Placement.cpp b/Placement.cpp index 59d1ff6..16e8da7 100644 --- a/Placement.cpp +++ b/Placement.cpp @@ -4,36 +4,21 @@ Placement::Placement() { this->position = Vector3::zero; this->thing = nullptr; } -// Placement::Placement(Vector3 position, Thing* thing) { -// this->position = position; -// this->thing = thing; -// } -Placement::Placement(Vector3 direction, Sensor* thing) { - this->position = Vector3::zero; - this->direction = direction; - this->thing = thing; -} - -//Placement::Placement(Vector3 position, Sensor* thing) { -// this->position = position; -// this->direction = Vector2::zero; -// this->thing = thing; -//} - -Placement::Placement(Vector3 position, Motor* thing) { +Placement::Placement(Thing* thing, Vector3 position) { this->position = position; this->direction = Vector3::zero; this->thing = thing; } -//Placement::Placement(Vector3 position, ControlledMotor* thing) { -// this->position = position; -// this->direction = Vector2::zero; -// this->thing = thing; -//} -// -//Placement::Placement(Thing* thing, Vector3 position) { -// this->thing = thing; -// this->position = position; -//} \ No newline at end of file +Placement::Placement(Thing* thing, Vector3 position, float horizontalDirection) { + this->position = position; + this->direction = Vector3(0, horizontalDirection, 0); + this->thing = thing; +} + +Placement::Placement(Thing* thing, float horizontalDirection) { + this->position = Vector3::zero; + this->direction = Vector3(0, horizontalDirection, 0); + this->thing = thing; +} diff --git a/Placement.h b/Placement.h index a2491df..ecdf17b 100644 --- a/Placement.h +++ b/Placement.h @@ -1,21 +1,18 @@ #pragma once #include "ControlledMotor.h" +#include "DistanceSensor.h" #include "Motor.h" #include "Thing.h" #include "Vector2.h" #include "Vector3.h" -#include "DistanceSensor.h" class Placement { public: Placement(); - Placement(Vector3 direction, Sensor* sensor); - - //Placement(Vector3 position, Sensor* sensor); - Placement(Vector3 position, Motor* motor); - /*Placement(Vector3 position, ControlledMotor* motor); - Placement(Thing* thing, Vector3 position);*/ + Placement(Thing* thing, Vector3 position); + Placement(Thing* thing, Vector3 position, float horizontalAngle); + Placement(Thing* thing, float horizontalAngle); Placement* parent = nullptr; Placement** children = nullptr; diff --git a/Roboid.cpp b/Roboid.cpp index 2d6bc9c..b0cca1e 100644 --- a/Roboid.cpp +++ b/Roboid.cpp @@ -9,6 +9,6 @@ Roboid::Roboid(Placement configuration[], unsigned int thingCount) { this->configuration = configuration; this->thingCount = thingCount; - sensing.AddSensors(configuration, thingCount); + perception.AddSensors(configuration, thingCount); propulsion.AddMotors(configuration, thingCount); } \ No newline at end of file diff --git a/Roboid.h b/Roboid.h index cbcd440..7aa1b23 100644 --- a/Roboid.h +++ b/Roboid.h @@ -10,7 +10,7 @@ class Roboid { Roboid(); Roboid(Placement configuration[], unsigned int thingCount); - Sensing sensing; + Perception perception; Propulsion propulsion; Placement* configuration;