Пример #1
0
 /// <summary>
 /// Constructor for an OrbiterWithOrbiter
 /// </summary>
 /// <param name="dispatcher">The Dispatcher that will dispatch timer events</param>
 /// <param name="canvas">The Canvas to draw on</param>
 /// <param name="parent">The ellipse representing the parent Orbiter</param>
 /// <param name="rotationCenter">The Point that the parent Orbiter rotates around</param>
 /// <param name="orbitRadius">The radius of the parent Orbiter</param>
 /// <param name="child">The ellipse represeting the child Orbiter</param>
 /// <param name="speed">Indicates how many times faster the child orbits the parent than the parent orbits its center</param>
 public OrbiterWithChild(Dispatcher dispatcher, Canvas canvas, Ellipse parent, Point rotationCenter, double orbitRadius, Ellipse child, int speed)
     : base(dispatcher, canvas, parent, rotationCenter, orbitRadius)
 {
     _child           = new Orbiter(dispatcher, canvas, child, _centerReference, Radius);
     ThetaDecrementer = ThetaDecrementer / speed;
 }
Пример #2
0
 /// <summary>
 /// Constructor for an OrbiterWithOrbiter
 /// </summary>
 /// <param name="dispatcher">The Dispatcher that will dispatch timer events</param>
 /// <param name="canvas">The Canvas to draw on</param>
 /// <param name="parent">The ellipse representing the parent Orbiter</param>
 /// <param name="rotationCenter">The Point that the parent Orbiter rotates around</param>
 /// <param name="orbitRadius">The radius of the parent Orbiter</param>
 /// <param name="child">The ellipse represeting the child Orbiter</param>
 /// <param name="speed">Indicates how many times faster the child orbits the parent than the parent orbits its center</param>
 public OrbiterWithChild(Dispatcher dispatcher, Canvas canvas, Ellipse parent, Point rotationCenter, double orbitRadius, Ellipse child, int speed)
     : base(dispatcher, canvas, parent, rotationCenter, orbitRadius)
 {
     _child = new Orbiter(dispatcher, canvas, child, _centerReference, Radius);
     ThetaDecrementer = ThetaDecrementer/speed;
 }