28 lines
647 B
C++
28 lines
647 B
C++
#pragma once
|
|
|
|
#include "Polar.h"
|
|
#include "Sensor.h"
|
|
|
|
class PerceivedObject {
|
|
public:
|
|
PerceivedObject();
|
|
PerceivedObject(Sensor *sensor, Polar position, float radius = 0.1F);
|
|
|
|
static constexpr float equalityDistance = 0.3F;
|
|
static constexpr float equalityAngle = 5.0F;
|
|
bool IsTheSameAs(PerceivedObject *otherObj);
|
|
|
|
char id;
|
|
|
|
Polar position = Polar::zero;
|
|
float radius;
|
|
Sensor *sensor = nullptr;
|
|
|
|
static constexpr unsigned char maxConfidence = 255;
|
|
static constexpr unsigned char confidenceDropSpeed = 2;
|
|
unsigned char confidence;
|
|
|
|
bool DegradeConfidence(float deltaTime);
|
|
void Refresh(Polar position, float radius);
|
|
};
|