private bool pixcol(gObj obj){ Matrix t = obj.m * Matrix.Invert(m) * Matrix.CreateTranslation(0.5f, 0.5f, 0); for (int x = 0; x < size.X; ++x) for (int y = 0; y < size.Y; y++) { if (col[(int)(x + y * size.X)].A == 0) continue; Vector2 p = Vector2.Transform(new Vector2(x, y), t); { int x2 = (int)p.X; int y2 = (int)p.Y; } if (!(!(x2 < 0 || x2 > obj.size.X) && !(y2 < 0 || y2 > obj.size.Y))) continue; if (obj.col[(int)(x2 + y2 * obj.size.X)%(obj.size.x*obj.size.y)].A > 0) return true; } return false; }