/// <summary> /// Determines whether the specified triangle is equal to the current instance of <see cref="TriangleF"/> /// with a given precision. /// </summary> /// <param name="v">The triangle to compare.</param> /// <param name="epsilon">The precision value.</param> /// <returns>True if the specified triangle is equal to the current instance of <see cref="TriangleF"/>; False otherwise.</returns> public bool Equals(TriangleF v, float epsilon) { if (!A.Equals(ref v.A, epsilon)) { return(false); } if (!B.Equals(ref v.B, epsilon)) { return(false); } if (!C.Equals(ref v.C, epsilon)) { return(false); } return(true); }
public bool Equals( Line3F v, float epsilon ) { if( !Start.Equals( v.Start, epsilon ) ) return false; if( !End.Equals( v.End, epsilon ) ) return false; return true; }
public bool Equals(RayF v, float epsilon) { if (!Origin.Equals(v.Origin, epsilon)) { return(false); } if (!Direction.Equals(v.Direction, epsilon)) { return(false); } return(true); }
public bool Equals(SphereF v, float epsilon) { if (!Origin.Equals(ref v.Origin, epsilon)) { return(false); } if (Math.Abs(Radius - v.Radius) > epsilon) { return(false); } return(true); }
public bool Equals(BoundsF v, float epsilon) { if (!Minimum.Equals(ref v.Minimum, epsilon)) { return(false); } if (!Maximum.Equals(ref v.Maximum, epsilon)) { return(false); } return(true); }
/// <summary> /// Determines whether the specified plane is equal to the current instance of <see cref="PlaneF"/> /// with the given normal and distance precisions. /// </summary> /// <param name="p">The plane to compare.</param> /// <param name="normalEpsilon">The precision value for the plane normal.</param> /// <param name="distanceEpsilon">The precision value for the distance component of the plane.</param> /// <returns>True if the specified plane is equal to the current instance of <see cref="PlaneF"/>; False otherwise.</returns> public bool Equals(ref PlaneF p, float normalEpsilon, float distanceEpsilon) { if (Math.Abs(D - p.D) > distanceEpsilon) { return(false); } Vector3F n = Normal; Vector3F pn = p.Normal; if (!n.Equals(ref pn, normalEpsilon)) { return(false); } return(true); }
/// <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); }
public bool Equals(CylinderF v, float epsilon) { if (!Point1.Equals(ref v.Point1, epsilon)) { return(false); } if (!Point2.Equals(ref v.Point2, epsilon)) { return(false); } if (Math.Abs(Radius - v.Radius) > epsilon) { return(false); } return(true); }
public bool Equals(ref StandardVertex v, float epsilon) { if (!Position.Equals(ref v.Position, epsilon)) { return(false); } if (!Normal.Equals(ref v.Normal, epsilon)) { return(false); } if (!Tangent.Equals(ref v.Tangent, epsilon)) { return(false); } if (!Color.Equals(ref v.Color, epsilon)) { return(false); } if (!TexCoord0.Equals(ref v.TexCoord0, epsilon)) { return(false); } if (!TexCoord1.Equals(ref v.TexCoord1, epsilon)) { return(false); } if (!TexCoord2.Equals(ref v.TexCoord2, epsilon)) { return(false); } if (!TexCoord3.Equals(ref v.TexCoord3, epsilon)) { return(false); } if (BlendIndices != v.BlendIndices) { return(false); } if (!BlendWeights.Equals(ref v.BlendWeights, epsilon)) { return(false); } return(true); }
public bool Equals(RangeVector3F v, float epsilon) { return(Minimum.Equals(v.Minimum, epsilon) && Maximum.Equals(v.Maximum, epsilon)); }