Example #1
0
        public VectorSet transform(Matrix m)
        {
            VectorSet s = new VectorSet();

            vecs.ForEach(v => s.add(Vector2.Transform(v, m)));
            return(s);
        }
Example #2
0
        public static VectorSet operator *(VectorSet vSet, float mag)
        {
            VectorSet oSet = new VectorSet();

            vSet.forEachVector(v =>
            {
                oSet.add(v * mag);
            });
            return(oSet);
        }
Example #3
0
        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);
        }