示例#1
0
            public ProductShape2(IExplicitShape <GridPoint2> shape1, IImplicitShape <GridPoint2> shape2, GridPoint2 scaleFactor)
            {
                var translationShapes = shape1.Points
                                        .Select(point => shape2.Translate(point.Mul(scaleFactor)));

                unionShape = new UnionShape <GridPoint2>(translationShapes);
            }
示例#2
0
 public ExclusiveOrShape(Shape2D first, Shape2D second)
 {
     First   = first;
     Second  = second;
     Union   = new UnionShape(first, second);
     Overlap = new IntersectionShape(first, second);
 }
示例#3
0
 public PlaneCityShape()
 {
     UnionShape buildingShape = new UnionShape();
     buildingShape.children.Add(new BoxShape(new Vector3(4, 50, 4)));
     UnionShape compositeShape = new UnionShape();
     compositeShape.children.Add(new RotateShape(new RepeatShape(buildingShape, new Vector3(10, 0, 10)), Quaternion.Euler(0, 30, 0)));
     rootShape = compositeShape;
 }
示例#4
0
            public ProductShape1(IExplicitShape <int> shape1, IImplicitShape <int> shape2, int scaleFactor)
            {
                var translationShapes = shape1.Points.Select(point => shape2.Translate(point * scaleFactor));

                unionShape = new UnionShape <int>(translationShapes);
            }