Packageaway3d.primitives
Classpublic class SphereGeometry
InheritanceSphereGeometry Inheritance PrimitiveBase Inheritance Geometry Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

A UV Sphere primitive mesh.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
Geometry
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
  radius : Number
The radius of the sphere.
SphereGeometry
  segmentsH : uint
Defines the number of vertical segments that make up the sphere.
SphereGeometry
  segmentsW : uint
Defines the number of horizontal segments that make up the sphere.
SphereGeometry
 InheritedsubGeometries : Vector.<SubGeometry>
[override] [read-only] A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.
PrimitiveBase
  yUp : Boolean
Defines whether the sphere poles should lay on the Y-axis (true) or on the Z-axis (false).
SphereGeometry
Protected Properties
 PropertyDefined By
 Inherited_geomDirty : Boolean = true
PrimitiveBase
 Inherited_uvDirty : Boolean = true
PrimitiveBase
Public Methods
 MethodDefined By
  
SphereGeometry(radius:Number = 50, segmentsW:uint = 16, segmentsH:uint = 12, yUp:Boolean = true)
Creates a new Sphere object.
SphereGeometry
 Inherited
addSubGeometry(subGeometry:SubGeometry):void
Adds a new SubGeometry object to the list.
Geometry
 Inherited
applyTransformation(transform:Matrix3D):void
[override]
PrimitiveBase
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Clones the geometry.
PrimitiveBase
 Inherited
dispose():void
Clears all resources used by the Geometry object, including SubGeometries.
Geometry
 Inherited
removeSubGeometry(subGeometry:SubGeometry):void
Removes a new SubGeometry object from the list.
Geometry
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
 Inherited
scale(scale:Number):void
[override] Scales the geometry.
PrimitiveBase
 Inherited
scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
[override] Scales the uv coordinates (tiling)
PrimitiveBase
Protected Methods
 MethodDefined By
  
[override] Builds the primitive's geometry when invalid.
SphereGeometry
  
buildUVs(target:SubGeometry):void
[override] Builds the primitive's uv coordinates when invalid.
SphereGeometry
 Inherited
Invalidates the primitive's geometry, causing it to be updated when requested.
PrimitiveBase
 Inherited
Invalidates the primitive's uv coordinates, causing them to be updated when requested.
PrimitiveBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
radiusproperty
radius:Number

The radius of the sphere.


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
segmentsHproperty 
segmentsH:uint

Defines the number of vertical segments that make up the sphere. Defaults to 12.


Implementation
    public function get segmentsH():uint
    public function set segmentsH(value:uint):void
segmentsWproperty 
segmentsW:uint

Defines the number of horizontal segments that make up the sphere. Defaults to 16.


Implementation
    public function get segmentsW():uint
    public function set segmentsW(value:uint):void
yUpproperty 
yUp:Boolean

Defines whether the sphere poles should lay on the Y-axis (true) or on the Z-axis (false).


Implementation
    public function get yUp():Boolean
    public function set yUp(value:Boolean):void
Constructor Detail
SphereGeometry()Constructor
public function SphereGeometry(radius:Number = 50, segmentsW:uint = 16, segmentsH:uint = 12, yUp:Boolean = true)

Creates a new Sphere object.

Parameters
radius:Number (default = 50) — The radius of the sphere.
 
segmentsW:uint (default = 16) — Defines the number of horizontal segments that make up the sphere.
 
segmentsH:uint (default = 12) — Defines the number of vertical segments that make up the sphere.
 
yUp:Boolean (default = true) — Defines whether the sphere poles should lay on the Y-axis (true) or on the Z-axis (false).
Method Detail
buildGeometry()method
override protected function buildGeometry(target:SubGeometry):void

Builds the primitive's geometry when invalid. This method should not be called directly. The calling should be triggered by the invalidateGeometry method (and in turn by updateGeometry).

Parameters

target:SubGeometry

buildUVs()method 
override protected function buildUVs(target:SubGeometry):void

Builds the primitive's uv coordinates when invalid. This method should not be called directly. The calling should be triggered by the invalidateUVs method (and in turn by updateUVs).

Parameters

target:SubGeometry