Changed from sensing to perception

This commit is contained in:
Pascal Serrarens 2023-11-22 15:06:10 +01:00
parent 66c60b66ed
commit 8d3cfdfa51
4 changed files with 18 additions and 36 deletions

View File

@ -4,36 +4,21 @@ Placement::Placement() {
this->position = Vector3::zero; this->position = Vector3::zero;
this->thing = nullptr; this->thing = nullptr;
} }
// Placement::Placement(Vector3 position, Thing* thing) {
// this->position = position;
// this->thing = thing;
// }
Placement::Placement(Vector3 direction, Sensor* thing) { Placement::Placement(Thing* thing, Vector3 position) {
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) {
this->position = position; this->position = position;
this->direction = Vector3::zero; this->direction = Vector3::zero;
this->thing = thing; this->thing = thing;
} }
//Placement::Placement(Vector3 position, ControlledMotor* thing) { Placement::Placement(Thing* thing, Vector3 position, float horizontalDirection) {
// this->position = position; this->position = position;
// this->direction = Vector2::zero; this->direction = Vector3(0, horizontalDirection, 0);
// this->thing = thing; this->thing = thing;
//} }
//
//Placement::Placement(Thing* thing, Vector3 position) { Placement::Placement(Thing* thing, float horizontalDirection) {
// this->thing = thing; this->position = Vector3::zero;
// this->position = position; this->direction = Vector3(0, horizontalDirection, 0);
//} this->thing = thing;
}

View File

@ -1,21 +1,18 @@
#pragma once #pragma once
#include "ControlledMotor.h" #include "ControlledMotor.h"
#include "DistanceSensor.h"
#include "Motor.h" #include "Motor.h"
#include "Thing.h" #include "Thing.h"
#include "Vector2.h" #include "Vector2.h"
#include "Vector3.h" #include "Vector3.h"
#include "DistanceSensor.h"
class Placement { class Placement {
public: public:
Placement(); Placement();
Placement(Vector3 direction, Sensor* sensor); Placement(Thing* thing, Vector3 position);
Placement(Thing* thing, Vector3 position, float horizontalAngle);
//Placement(Vector3 position, Sensor* sensor); Placement(Thing* thing, float horizontalAngle);
Placement(Vector3 position, Motor* motor);
/*Placement(Vector3 position, ControlledMotor* motor);
Placement(Thing* thing, Vector3 position);*/
Placement* parent = nullptr; Placement* parent = nullptr;
Placement** children = nullptr; Placement** children = nullptr;

View File

@ -9,6 +9,6 @@ Roboid::Roboid(Placement configuration[], unsigned int thingCount) {
this->configuration = configuration; this->configuration = configuration;
this->thingCount = thingCount; this->thingCount = thingCount;
sensing.AddSensors(configuration, thingCount); perception.AddSensors(configuration, thingCount);
propulsion.AddMotors(configuration, thingCount); propulsion.AddMotors(configuration, thingCount);
} }

View File

@ -10,7 +10,7 @@ class Roboid {
Roboid(); Roboid();
Roboid(Placement configuration[], unsigned int thingCount); Roboid(Placement configuration[], unsigned int thingCount);
Sensing sensing; Perception perception;
Propulsion propulsion; Propulsion propulsion;
Placement* configuration; Placement* configuration;