public VectorSet transform(Matrix m) { VectorSet s = new VectorSet(); vecs.ForEach(v => s.add(Vector2.Transform(v, m))); return(s); }
public static VectorSet operator *(VectorSet vSet, float mag) { VectorSet oSet = new VectorSet(); vSet.forEachVector(v => { oSet.add(v * mag); }); return(oSet); }
private VectorSet calculateTrans() { Matrix mat = Matrix.Identity; mat *= Matrix.CreateRotationZ(Rotation); mat *= Matrix.CreateTranslation(Origin.X, Origin.Y, 0); VectorSet tSet = new VectorSet(); Vectors.forEachVector(v => { Vector tV = Vector2.Transform(v, mat); tSet.add(tV); }); return(tSet); }