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 | |
---|---|---|
constructor(capped: boolean): Sphere Protected | ||
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): Sphere | undefined | 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): CurveCollection | undefined | 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(): Transform | undefined | Return a coordinate frame (right handed, unit axes) origin at sphere center equator in xy plane * z axis perpendicular |
|
isAlmostEqual(other: GeometryQuery): boolean | Test for same geometry in other |
|
isSameGeometryClass(other: any): boolean | Test if other is a Sphere |
|
maxIsoParametricDistance(): Vector2d | Directional distance query * u direction is around longitude circle at maximum distance from axis. |
|
strokeConstantVSection(v: number, fixedStrokeCount: number | undefined, options?: StrokeOptions): LineString3d | return strokes for a cross-section (elliptic arc) at specified fraction v along the axis. | |
trueSphereRadius(): number | undefined | 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): Sphere | undefined Static | Create a sphere from the typical parameters of the Dgn file | |
createEllipsoid(localToWorld: Transform, latitudeSweep: AngleSweep, capped: boolean): Sphere | undefined Static | Create an ellipsoid which is a unit sphere mapped to position by an (arbitrary, possibly skewed and scaled) transform. | |
createFromAxesAndScales(center: Point3d, axes: undefined | Matrix3d, radiusX: number, radiusY: number, radiusZ: number, latitudeSweep: AngleSweep | undefined, capped: boolean): Sphere | undefined Static | Create a sphere from the typical parameters of the Dgn file |
Inherited methods
Name | Inherited from | Description |
---|---|---|
range(transform?: Transform, result?: Range3d): Range3d | GeometryQuery | return the range of the entire (tree) GeometryQuery |
tryTranslateInPlace(dx: number, dy: number = 0, dz: number = 0): boolean | GeometryQuery | try to move the geometry by dx,dy,dz |
Properties
Name | Type | Description | |
---|---|---|---|
isClosedVolume Accessor ReadOnly | boolean | A sphere is can be closed two ways: full sphere (no caps needed for closure) * incomplete but with caps |
|
latitudeSweepFraction Accessor ReadOnly | number | Return the latitude sweep as fraction of south pole to north pole. | |
solidPrimitiveType | "sphere" = "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 | Ask if this is a capped solid |
children Accessor ReadOnly | GeometryQuery[] | undefined | GeometryQuery | return GeometryQuery children for recursive queries. * leaf classes do not need to implement. |
geometryCategory | "solid" = "solid" | SolidPrimitive | String name for schema properties |
Defined in
Last Updated: 08 January, 2020