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

            return(new Line(a, b));
        }
Esempio n. 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;
        }
Esempio n. 5
0
 public ImageTransform(Vector2 position, AngleF rotation, Vector2?scale = null)
 {
     Position = position;
     Rotation = rotation;
     Scale    = scale ?? Vector2.One;
 }
Esempio n. 6
0
 public SectorF GetSector(AngleF offset, AngleF theta)
 => new SectorF(Origin, Radius, offset, theta);
Esempio n. 7
0
 public SectorF GetSector(AngleF length)
 => new SectorF(Origin, Radius, length);
Esempio n. 8
0
 public float GetArcLength(AngleF theta)
 => Radius * theta.Radians;
Esempio n. 9
0
 public Line LineFromAngle(AngleF angle)
 => new Line(Origin, PointFromAngle(angle));
Esempio n. 10
0
 public Vector2 PointFromAngle(AngleF angle)
 => new Vector2(Origin.X + Radius * MathF.Cos(angle.Radians),
                Origin.Y + Radius * MathF.Sin(angle.Radians));
Esempio n. 11
0
 public Keyframe(long tick, float opacity, Vector2 position, AngleF rotation, Vector2 scale)
 {
     Tick       = tick;
     Opacity    = opacity;
     _transform = new ImageTransform(position, rotation, scale);
 }