Example #1
0
        private void CreateInternalGearScene()
        {
            this.speed = 0.05f;
            var radiusMax = InvoluteGearShape.RadiusMax(150, DiametralPitch, GearType.Internal);

            var shape = new InvoluteGearShape(150, DiametralPitch, radiusMax + 1.0f, this.PressureAngle, GearType.Internal);
            var gear  = new Gear(shape, this.GetRandomNamedColor());

            this.Gears.Add(gear);

            var axleRadius = InvoluteGearShape.RadiusMin(5, DiametralPitch, GearType.External) - 0.035f;
            var shape2     = new InvoluteGearShape(100, DiametralPitch, axleRadius, this.PressureAngle);
            var gear2      = new Gear(shape2, this.GetRandomNamedColor());

            this.Gears.Add(gear2);
            gear.AddChild(gear2, 0.0f);


            var shape3 = new InvoluteGearShape(38, DiametralPitch, axleRadius, this.PressureAngle);
            var gear3  = new Gear(shape3, this.GetRandomNamedColor());

            this.Gears.Add(gear3);
            gear2.AddChild(gear3, MathHelper.Pi + 0.5f);

            var shape4 = new InvoluteGearShape(5, DiametralPitch, axleRadius, this.PressureAngle);
            var gear4  = new Gear(shape4, this.GetRandomNamedColor());

            this.Gears.Add(gear4);
            gear3.AddChild(gear4, 1.9f);
        }