Sphere
Represents the plane and radius values of a sphere.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public struct Sphere : IEpsilonComparable<Sphere>
The Sphere type exposes the following members.
Constructors
Name
Description
Public Method
Sphere(Plane, Double)
Initializes a new sphere given the plane of the equator circle and radius.
Public Method
Code Example
Sphere(Point3d, Double)
Initializes a new sphere given center point and radius.
Properties
Name
Description
Public Property
BoundingBox
Gets the world aligned bounding box for this Sphere. If the Sphere is Invalid, an empty box is returned.
Public Property
Center
Gets or sets the center point of the sphere.
Public Property
Diameter
Gets or sets the diameter for this sphere.
Public Property
EquatorialPlane
Gets or sets the Equatorial plane for this sphere.
Public Property
IsValid
Gets a value that indicates whether the sphere is valid.
Public Property
NorthPole
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.
Public Property
Radius
Gets or sets the Radius for this sphere.
Public Property
SouthPole
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.
Public Property
Static Member
Unset
Gets a sphere with invalid members.
Methods
Name
Description
Public Method
ClosestParameter
Finds the angle parameters on this sphere that are closest to a test point.
Public Method
ClosestPoint
Returns point on sphere that is closest to given point.
Public Method
EpsilonEquals
Check that all values in other are within epsilon of the values in this
Public Method
Equals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public Method
Static Member
FitSphereToPoints
Attempts to fit a sphere to a collection of points.
Public Method
GetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
LatitudeDegrees
Computes the parallel at a specific latitude angle.
The angle is specified in degrees.
Public Method
LatitudeRadians
Computes the parallel at a specific latitude angle.
The angle is specified in radians.
Public Method
LongitudeDegrees
Computes the meridian at a specific longitude angle.
The angle is specified in degrees.
Public Method
LongitudeRadians
Computes the meridian at a specific longitude angle.
The angle is specified in radians.
Public Method
NormalAt
Computes the normal at a specific angular location on the sphere.
Public Method
PointAt
Evaluates the sphere at specific longitude and latitude angles.
Public Method
Rotate(Double, Vector3d)
Rotates the sphere about the center point.
Public Method
Rotate(Double, Vector3d, Point3d)
Rotates this sphere about a point and an axis.
Public Method
Rotate(Double, Double, Vector3d)
Rotates this sphere about the center point.
Public Method
Rotate(Double, Double, Vector3d, Point3d)
Rotates this sphere about a point and an axis.
Public Method
ToBrep
Converts this sphere is it Brep representation
Public Method
ToNurbsSurface
Converts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().
Public Method
ToRevSurface
Converts this Sphere to a RevSurface representation. This is synonymous with calling RevSurface.CreateFromSphere().
Public Method
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Public Method
Transform
Transforms this sphere. Note that non-similarity preserving transformations cannot be applied to a sphere as that would result in an ellipsoid.
Public Method
Translate
Moves this sphere along a motion vector.