Back to class index
| Sphere::FitThroughPointsSyntaxSphere Sphere::FitThroughPoints(const float4 &a, const float4 &b); [1 line of code]Fits a sphere through the given two points. Two points do not uniquely define a sphere in 3D space. This function computes the minimal enclosing sphere for the given two points, which is uniquely defined. This function is identical to OptimalEnclosingSphere(a, b) and is simply an alias for that function. See AlsoSyntaxSphere Sphere::FitThroughPoints(const float4 &a, const float4 &b, const float4 &c); [27 lines of code]Fits a sphere through the given three points. For reference, see http://realtimecollisiondetection.net/blog/?p=20 . Three points do not uniquely define a sphere in 3D space. This function computes the sphere that goes through these three points and has the minimal volume. Note that this is not the same than the smallest sphere that encloses three given points, since the smallest enclosing sphere does not necessarily pass through all the three points. Note The three points that are passed in must not be collinear, because in that case a sphere cannot be fitted through these points. See AlsoSyntaxSphere Sphere::FitThroughPoints(const float4 &a, const float4 &b, const float4 &c, const float4 &d); [23 lines of code]Fits a sphere through the given four points. For reference, see http://realtimecollisiondetection.net/blog/?p=20 . Four points uniquely define a sphere in 3D space. This function computes the sphere that passes through these four points. Note that this is not the same than the smallest enclosing sphere for the four points, since the smallest enclosing sphere does not necessarily need to pass through all of these four points. Note The four points that are passed in must not be coplanar, because in that case a sphere cannot be fitted through these points. See Also |