示例#1
0
 /// <summary>
 /// Is this arc clockwise with respect to the specified coordinate system?
 /// The coordinate system specified should have its origin at the centre of
 /// this arc's circle.
 /// </summary>
 /// <param name="cSystem"></param>
 /// <returns></returns>
 public bool IsClockwiseIn(CylindricalCoordinateSystem cSystem)
 {
     if (Vertices.Count >= 3 && cSystem != null)
     {
         Angle toStart = cSystem.Azimuth(Vertices.First().Position);
         Angle toEnd   = cSystem.Azimuth(Vertices.Last().Position).NormalizeTo2PI();
         Angle toMid   = cSystem.Azimuth(Vertices[1].Position).NormalizeTo2PI();
         return(toEnd > toMid);
     }
     return(false);
 }
 /// <summary>
 /// Duplication constructor, moving the origin of the coordinat system to a new position
 /// </summary>
 /// <param name="other"></param>
 /// <param name="origin"></param>
 public CylindricalCoordinateSystem(CylindricalCoordinateSystem other, Vector origin)
 {
     Origin = origin;
     L      = other.L;
     A      = other.A;
 }
 /// <summary>
 /// Duplication constructor.
 /// </summary>
 /// <param name="other"></param>
 public CylindricalCoordinateSystem(CylindricalCoordinateSystem other)
 {
     Origin = other.Origin;
     L      = other.L;
     A      = other.A;
 }
示例#4
0
 /// <summary>
 /// Radius, coordinatesystem constructor.
 /// Creates a circle lying on the reference plane and centred on the origin
 /// of the specified coordinate system.
 /// </summary>
 /// <param name="radius">The radius of the circle</param>
 /// <param name="cSystem">The coordinate system on which the circle will be placed</param>
 public Circle(double radius, CylindricalCoordinateSystem cSystem) : base(cSystem)
 {
     Radius = radius;
 }
示例#5
0
 /// <summary>
 /// Radius, coordinatesystem, origin constructor.
 /// Creates a circle orientated to the given coordinate system but with a new origin
 /// </summary>
 /// <param name="radius">The radius of the circle</param>
 /// <param name="cSystem">The coordinate system on which the circle will be placed</param>
 public Circle(double radius, CylindricalCoordinateSystem cSystem, Vector origin) : base(cSystem, origin)
 {
     Radius = radius;
 }