| Package | away3d.primitives |
| Class | public class SphereGeometry |
| Inheritance | SphereGeometry PrimitiveBase Geometry NamedAssetBase flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
![]() | assetFullPath : Array [read-only] | NamedAssetBase | |
![]() | assetNamespace : String [read-only] | NamedAssetBase | |
![]() | assetType : String [read-only] | Geometry | |
![]() | name : String | NamedAssetBase | |
![]() | originalName : 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 | ||
![]() | subGeometries : Vector.<ISubGeometry> [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 | ||
| Method | Defined By | ||
|---|---|---|---|
SphereGeometry(radius:Number = 50, segmentsW:uint = 16, segmentsH:uint = 12, yUp:Boolean = true)
Creates a new Sphere object. | SphereGeometry | ||
![]() | addSubGeometry(subGeometry:ISubGeometry):void
Adds a new SubGeometry object to the list. | Geometry | |
![]() | applyTransformation(transform:Matrix3D):void [override]
| PrimitiveBase | |
![]() | assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | |
![]() | [override]
Clones the geometry. | PrimitiveBase | |
![]() | convertToSeparateBuffers():void
Updates the SubGeometries so all vertex data is represented in different buffers. | Geometry | |
![]() | dispose():void
Clears all resources used by the Geometry object, including SubGeometries. | Geometry | |
![]() | removeSubGeometry(subGeometry:ISubGeometry):void
Removes a new SubGeometry object from the list. | Geometry | |
![]() | resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase | |
![]() | scale(scale:Number):void [override]
Scales the geometry. | PrimitiveBase | |
![]() | scaleUV(scaleU:Number = 1, scaleV:Number = 1):void [override]
Scales the uv coordinates (tiling)
| PrimitiveBase | |
| Method | Defined By | ||
|---|---|---|---|
buildGeometry(target:CompactSubGeometry):void [override]
Builds the primitive's geometry when invalid. | SphereGeometry | ||
buildUVs(target:CompactSubGeometry):void [override]
Builds the primitive's uv coordinates when invalid. | SphereGeometry | ||
![]() | invalidateGeometry():void
Invalidates the primitive's geometry, causing it to be updated when requested. | PrimitiveBase | |
![]() | invalidateUVs():void
Invalidates the primitive's uv coordinates, causing them to be updated when requested. | PrimitiveBase | |
| radius | property |
radius:NumberThe radius of the sphere.
public function get radius():Number public function set radius(value:Number):void| segmentsH | property |
segmentsH:uintDefines the number of vertical segments that make up the sphere. Defaults to 12.
public function get segmentsH():uint public function set segmentsH(value:uint):void| segmentsW | property |
segmentsW:uintDefines the number of horizontal segments that make up the sphere. Defaults to 16.
public function get segmentsW():uint public function set segmentsW(value:uint):void| yUp | property |
yUp:BooleanDefines whether the sphere poles should lay on the Y-axis (true) or on the Z-axis (false).
public function get yUp():Boolean public function set yUp(value:Boolean):void| SphereGeometry | () | Constructor |
public function SphereGeometry(radius:Number = 50, segmentsW:uint = 16, segmentsH:uint = 12, yUp:Boolean = true)Creates a new Sphere object.
Parametersradius: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).
|
| buildGeometry | () | method |
override protected function buildGeometry(target:CompactSubGeometry):voidBuilds 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:CompactSubGeometry |
| buildUVs | () | method |
override protected function buildUVs(target:CompactSubGeometry):voidBuilds 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:CompactSubGeometry |