#include "Pixel.h" Pixel::Pixel( Vertex pos, Vertex speed, float ep, int id ) : Object2D() { setPosition( pos ); setSpeed( speed ); this->ep = ep; pixelId = id; collision = false; } bool Pixel::tick( const WeltInfo &info, double zeit ) { ep -= (float)zeit; return Object2D::tick( info, zeit ); } void Pixel::render( Mat3< float > &kamMat, Bild &zRObj, const char *kamName ) {} Rect2< float > Pixel::getBoundingBox() const { Rect2< float > r = Rect2< float >(); r.topLeft.x = -( ep / 5 + 1 ); r.topLeft.y = -( ep / 5 + 1 ); r.bottomRight.x = ep / 5 + 1; r.bottomRight.y = ep / 5 + 1; r.topLeft = getWorldPos( r.topLeft ); r.bottomRight = getWorldPos( r.bottomRight ); return r; } float Pixel::getEp() const { return ep; } int Pixel::getId() const { return pixelId; }