20 lines
749 B
C++
20 lines
749 B
C++
#include "Thing.h"
|
|
|
|
using namespace Passer::RoboidControl;
|
|
|
|
Thing::Thing() : position(Polar::zero) {
|
|
this->type = (unsigned int)Type::Undetermined;
|
|
}
|
|
|
|
const unsigned int Thing::SwitchType = SensorType | (unsigned int)Type::Switch;
|
|
const unsigned int Thing::DistanceSensorType =
|
|
SensorType | (unsigned int)Type::DistanceSensor;
|
|
const unsigned int Thing::ControlledMotorType =
|
|
MotorType | (unsigned int)Type::ControlledMotor;
|
|
const unsigned int Thing::UncontrolledMotorType =
|
|
MotorType | (unsigned int)Type::UncontrolledMotor;
|
|
const unsigned int Thing::ExternalType = (unsigned int)Type::ExternalSensor;
|
|
|
|
bool Thing::IsMotor() { return (type & Thing::MotorType) != 0; }
|
|
|
|
bool Thing::IsSensor() { return (type & Thing::SensorType) != 0; } |