ELVE  1
ELVE Logic Visualization Explorer
/home/travis/build/stdgregwar/elve/Core/Movable.cpp
00001 #include "Movable.h"
00002 #include "Point.h"
00003 
00004 namespace Elve {
00005 
00006 void Movable::setState(const QVector2D &pos, const QVector2D &speed){
00007     if(mPoint) {
00008         mPoint->setPos(pos);
00009         mPoint->setSpeed(speed);
00010         for(Movable* m : mPoint->movables()) {
00011             if(m != this) {
00012                 m->onStateChange(pos,speed);
00013             }
00014         }
00015     }
00016 }
00017 
00018 Point* Movable::point()
00019 {
00020     return mPoint;
00021 }
00022 
00023 void Movable::setPoint(Point *m) {
00024     mPoint = m;
00025 }
00026 
00027 }
 All Classes Functions