Sphere
References[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 136)]
[Serializable]
public struct Sphere : IEpsilonComparable<Sphere>
Represents the plane and radius values of a sphere.
Constructors
Initializes a new sphere given the plane of the equator circle and radius.
Properties
Gets the world aligned bounding box for this Sphere. If the Sphere is Invalid, an empty box is returned.
Gets or sets the Equatorial plane for this sphere.
obsoleteThis property has been replaced by Equ*A*torialPlane.
Gets or sets the Equatorial plane for this sphere.
Gets a value that indicates whether the sphere is valid.
Gets the point at the North Pole of the sphere.
This is the parameterization singularity that can be obtained, at V value +Math.Pi/2.
Gets the point at the South Pole of the sphere.
This is the parameterization singularity that can be obtained, at V value -Math.Pi/2.
Methods
[ConstOperation]
public bool ClosestParameter(Point3d testPoint, out double longitudeRadians, out double latitudeRadians)
Finds the angle parameters on this sphere that are closest to a test point.
Parameters:
| testPoint (Point3d) | Point to project onto the sphere. |
| longitudeRadians (out double) | The longitudinal angle (in radians; 0.0 to 2pi) where the sphere approaches testPoint best. |
| latitudeRadians (out double) | The latitudinal angle (in radians; -0.5pi to +0.5pi) where the sphere approaches testPoint best. |
Returns: true on success, false on failure. This function will fail if the point it coincident with the sphere center.
Returns point on sphere that is closest to given point.
Parameters:
| testPoint (Point3d) | Point to project onto Sphere. |
Returns: Point on sphere surface closest to testPoint.
Check that all values in other are within epsilon of the values in this
Implements: EpsilonEquals
Attempts to fit a sphere to a collection of points.
Parameters:
| points (IEnumerable<Point3d>) | Points to fit. The collection must contain at least three points. |
Returns: The Sphere that best approximates the points or Sphere.Unset on failure.
Computes the parallel at a specific latitude angle.
The angle is specified in degrees.
Parameters:
| degrees (double) | An angle in degrees for the meridian. |
Returns: A circle.
Computes the parallel at a specific latitude angle.
The angle is specified in radians.
Parameters:
| radians (double) | An angle in radians for the parallel. |
Returns: A circle.
Computes the meridian at a specific longitude angle.
The angle is specified in degrees.
Parameters:
| degrees (double) | An angle in degrees. |
Returns: A circle.
Computes the meridian at a specific longitude angle.
The angle is specified in radians.
Parameters:
| radians (double) | An angle in radians. |
Returns: A circle.
Computes the normal at a specific angular location on the sphere.
Evaluates the sphere at specific longitude and latitude angles.
Rotates this sphere about a point and an axis.
Rotates the sphere about the center point.
public bool Rotate(double sinAngle, double cosAngle, Vector3d axisOfRotation, Point3d centerOfRotation)
Rotates this sphere about a point and an axis.
Rotates this sphere about the center point.
Converts this sphere is it Brep representation
Converts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().
Returns: A nurbs surface representation of this sphere or null.
Converts this Sphere to a RevSurface representation. This is synonymous with calling RevSurface.CreateFromSphere().
Returns: A surface of revolution representation of this sphere or null.
Transforms this sphere. Note that non-similarity preserving transformations cannot be applied to a sphere as that would result in an ellipsoid.
Parameters:
| xform (Transform) | Transformation matrix to apply. |
Returns: true on success, false on failure.