Beispiel #1
0
 public SectorF(Vector2 origin, float radius, AngleF offset, AngleF length)
 {
     Origin    = origin;
     Radius    = radius;
     Offset    = offset;
     OffsetEnd = length + offset;
 }
Beispiel #2
0
 public SectorF(Vector2 origin, float radius, AngleF length)
 {
     Origin    = origin;
     Radius    = radius;
     Offset    = AngleF.Right;
     OffsetEnd = length;
 }
        public Line LineFromDiameter(AngleF offset)
        {
            Vector2 a = PointFromAngle(offset);
            Vector2 b = PointFromAngle(-offset);

            return(new Line(a, b));
        }
Beispiel #4
0
        public Line(Vector2 a, float length, AngleF direction)
        {
            Points = new Vector2[2];

            Vector2 b = new Vector2(a.X + (length * MathF.Cos(direction.Radians)),
                                    a.Y + (length * MathF.Sin(direction.Radians)));

            A = a;
            B = b;
        }
Beispiel #5
0
 public ImageTransform(Vector2 position, AngleF rotation, Vector2?scale = null)
 {
     Position = position;
     Rotation = rotation;
     Scale    = scale ?? Vector2.One;
 }
 public SectorF GetSector(AngleF offset, AngleF theta)
 => new SectorF(Origin, Radius, offset, theta);
 public SectorF GetSector(AngleF length)
 => new SectorF(Origin, Radius, length);
 public float GetArcLength(AngleF theta)
 => Radius * theta.Radians;
 public Line LineFromAngle(AngleF angle)
 => new Line(Origin, PointFromAngle(angle));
Beispiel #10
0
 public Vector2 PointFromAngle(AngleF angle)
 => new Vector2(Origin.X + Radius * MathF.Cos(angle.Radians),
                Origin.Y + Radius * MathF.Sin(angle.Radians));
Beispiel #11
0
 public Keyframe(long tick, float opacity, Vector2 position, AngleF rotation, Vector2 scale)
 {
     Tick       = tick;
     Opacity    = opacity;
     _transform = new ImageTransform(position, rotation, scale);
 }