Clone() public method

public Clone ( ) : Shape
return Shape
Exemplo n.º 1
0
        public Body(Shape shape, float mass)
        {
            this.base_shape = shape;
            this.curr_shape = shape.Clone();
            this.count = shape.count;

            this.pointmass_list = new PointMass[shape.count];
            for (int i = 0; i < shape.count; i++)
                pointmass_list[i] = new PointMass(shape.points[i], mass);

            this.bitmaskx = new Bitmask();
            this.bitmasky = new Bitmask();
        }
Exemplo n.º 2
0
        public Body(Shape shape, float mass)
        {
            this.base_shape = shape;
            this.curr_shape = shape.Clone();
            this.count      = shape.count;

            this.pointmass_list = new PointMass[shape.count];
            for (int i = 0; i < shape.count; i++)
            {
                pointmass_list[i] = new PointMass(shape.points[i], mass);
            }

            this.bitmaskx = new Bitmask();
            this.bitmasky = new Bitmask();
        }