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->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;
//}
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;
}

View File

@ -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;

View File

@ -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);
}

View File

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