Sphere Class

A Sphere is

  • A unit sphere (but read on ....)
  • mapped by an arbitrary (possibly skewed, non-uniform scaled) transform
  • hence possibly the final geometry is ellipsoidal

Extends

Implements

Methods

Name Description
clone(): Sphere return a deep clone  
cloneCenter(): Point3d return (copy of) sphere center  
cloneLatitudeSweep(): AngleSweep return (a copy of) the sphere's angle sweep.  
cloneLocalToWorld(): Transform Return a (clone of) the sphere's local to world transformation.  
cloneTransformed(transform: Transform): undefined | Sphere Return a transformed clone.  
cloneVectorX(): Vector3d return the (full length, i.e.  
cloneVectorY(): Vector3d return the (full length, i.e.  
cloneVectorZ(): Vector3d return the (full length, i.e.  
constantVSection(vFraction: number): undefined | CurveCollection Return the Arc3d section at vFraction.  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleSphere(this)  
extendRange(range: Range3d, transform?: Transform): void Extend a range to contain this sphere.  
getConstructiveFrame(): undefined | Transform Return a coordinate frame (right handed, unit axes)  
isAlmostEqual(other: GeometryQuery): boolean Test for same geometry in other  
isSameGeometryClass(other: any): boolean Test if other is a Sphere  
maxAxisRadius(): number Return the largest of the primary xyz axis radii  
maxIsoParametricDistance(): Vector2d Directional distance query  
strokeConstantVSection(v: number, fixedStrokeCount: number, options?: StrokeOptions): LineString3d return strokes for a cross-section (elliptic arc) at specified fraction v along the axis.  
trueSphereRadius(): undefined | number Test if the geometry is a true sphere taking the transform (which might have nonuniform scaling) is applied.  
tryTransformInPlace(transform: Transform): boolean Transform the sphere in place.  
uFractionToRadians(u: number): number Return the longitude (in radians) all fractional u.  
uvFractionToPoint(uFraction: number, vFraction: number, result?: Point3d): Point3d Evaluate as a uv surface  
uvFractionToPointAndTangents(uFraction: number, vFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Evaluate as a uv surface, returning point and two vectors.  
vFractionToRadians(v: number): number Return the latitude (in radians) all fractional v.  
createCenterRadius(center: Point3d, radius: number, latitudeSweep?: AngleSweep): Sphere Static Create from center and radius, with optional restricted latitudes.  
createDgnSphere(center: Point3d, vectorX: Vector3d, vectorZ: Vector3d, radiusXY: number, radiusZ: number, latitudeSweep: AngleSweep, capped: boolean): undefined | Sphere Static Create a sphere from the typical parameters of the Dgn file  
createEllipsoid(localToWorld: Transform, latitudeSweep: AngleSweep, capped: boolean): undefined | Sphere Static Create an ellipsoid which is a unit sphere mapped to position by an (arbitrary, possibly skewed and scaled) transform.  
createFromAxesAndScales(center: Point3d, axes: Matrix3d, radiusX: number, radiusY: number, radiusZ: number, latitudeSweep: AngleSweep, capped: boolean): undefined | Sphere Static Create a sphere from the typical parameters of the Dgn file  

Inherited methods

Name Inherited from Description
range(transform?: Transform, result?: Range3d): Range3d SolidPrimitive Return the range of the entire GeometryQuery tree.
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean SolidPrimitive Try to move the geometry by dx,dy,dz.
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static SolidPrimitive Apply instance method isAlmostEqual if both are defined.

Properties

Name Type Description
isClosedVolume Accessor ReadOnly boolean * A sphere is can be closed two ways:  
latitudeSweepFraction Accessor ReadOnly number Return the latitude sweep as fraction of south pole to north pole.  
solidPrimitiveType Readonly "sphere" String name for schema properties  

Inherited properties

Name Type Inherited from Description
_capped Protected boolean SolidPrimitive flag indicating whether cap region is considered closed (i.e.
capped Accessor boolean SolidPrimitive Whether this is a capped solid
children Accessor ReadOnly undefined | GeometryQuery[] SolidPrimitive Return GeometryQuery children for recursive queries.
* leaf classes do not need to implement.
geometryCategory Readonly "solid" SolidPrimitive String name for schema properties

Defined in

Last Updated: 28 October, 2024