void setAffineAndOrientation(Sifteo::VideoBuffer &v, uint16_t angle, Sifteo::Side orientation) { float f = (M_TAU*angle)/65536.0f; AffineMatrix m = AffineMatrix::identity(); m.translate(64,64); // move center to origin m.rotate(f); // do the rotation m.translate(-64,-64); // move it back syncMatrixAndOrientation(v, m, orientation); }
void setAffine(Sifteo::VideoBuffer &v, uint16_t angle) { float f = (M_TAU*angle)/65536.0f; AffineMatrix m = AffineMatrix::identity(); m.translate(64,64); // move center to origin m.rotate(f); // do the rotation m.translate(-64,-64); // move it back v.bg2.setMatrix( m ); }