Пример #1
0
        public static Bowl CreateFlatRimmedBowl(double innerRadius,
                                                double outerRadius,
                                                IMaterial material)
        {
            ConvexPartSphere o = new ConvexPartSphere(new Vec3(),
                                                      outerRadius,
                                                      0, 360, 90, 180);
            ConvexPartSphere i = new ConvexPartSphere(new Vec3(),
                                                      innerRadius,
                                                      0, 360, 90, 180);
            Annulus a = new Annulus(new Vec3(),
                                    new Vec3(0, 1, 0),
                                    innerRadius,
                                    outerRadius);

            Bowl b = new Bowl();

            b.AddObject(o);
            b.AddObject(i);
            b.AddObject(a);

            b.bbox = new BBox(-outerRadius, outerRadius,
                              -outerRadius, outerRadius,
                              -outerRadius, outerRadius);

            b.Material = material;

            return(b);
        }
Пример #2
0
        public static Bowl CreateRoundRimmedBowl(double innerRadius,
                                                 double outerRadius,
                                                 IMaterial material)
        {
            ConvexPartSphere o = new ConvexPartSphere(new Vec3(),
                                                      outerRadius,
                                                      0, 360, 90, 180);
            ConvexPartSphere i = new ConvexPartSphere(new Vec3(),
                                                      innerRadius,
                                                      0, 360, 90, 180);
            Torus t = new Torus((outerRadius + innerRadius) / 2,
                                (outerRadius - innerRadius) / 2);

            Bowl b = new Bowl();

            b.AddObject(o);
            b.AddObject(i);
            b.AddObject(t);

            b.bbox = new BBox(-outerRadius, outerRadius,
                              -outerRadius, outerRadius,
                              -outerRadius, outerRadius);

            b.Material = material;

            return(b);
        }
Пример #3
0
        public static Bowl Create(double innerRadius,
                                  double outerRadius,
                                  bool roundRimmedBowl,
                                  IMaterial material)
        {
            ConvexPartSphere o = new ConvexPartSphere(new Vec3(),
                                                      outerRadius,
                                                      0, 360, 90, 180);
            ConvexPartSphere i = new ConvexPartSphere(new Vec3(),
                                                      innerRadius,
                                                      0, 360, 90, 180);

            Bowl b = new Bowl();

            b.AddObject(o);
            b.AddObject(i);

            if (roundRimmedBowl)
            {
                Torus t = new Torus((outerRadius + innerRadius) / 2,
                                    (outerRadius - innerRadius) / 2);
                b.AddObject(t);
            }
            else
            {
                Annulus a = new Annulus(new Vec3(),
                                        new Vec3(0, 1, 0),
                                        innerRadius,
                                        outerRadius);
                b.AddObject(a);
            }

            b.bbox = new BBox(-outerRadius, outerRadius,
                              -outerRadius, outerRadius,
                              -outerRadius, outerRadius);

            b.Material = material;

            return(b);
        }