예제 #1
0
 /// <summary>
 /// Determines whether the specified cone is equal to the current instance of <see cref="ConeF"/>
 /// with a given precision.
 /// </summary>
 /// <param name="v">The cone to compare.</param>
 /// <param name="epsilon">The precision value.</param>
 /// <returns>True if the specified cone is equal to the current instance of <see cref="ConeF"/>; False otherwise.</returns>
 public bool Equals(ConeF v, float epsilon)
 {
     if (!Origin.Equals(ref v.Origin, epsilon))
     {
         return(false);
     }
     if (!Axis.Equals(ref v.Axis, epsilon))
     {
         return(false);
     }
     if (Math.Abs(Angle - v.Angle) > epsilon)
     {
         return(false);
     }
     return(true);
 }
예제 #2
0
        //

        /// <summary>
        /// Constructs a cone with another specified <see cref="ConeF"/> object.
        /// </summary>
        /// <param name="source">A specified cone.</param>
        public ConeF(ConeF source)
        {
            Origin = source.Origin;
            Axis   = source.Axis;
            Angle  = source.Angle;
        }
예제 #3
0
 public bool Intersects(ConeF cone)
 {
     return(cone.Intersects(this));
 }