Packageaway3d.primitives
Classpublic class TorusGeometry
InheritanceTorusGeometry Inheritance PrimitiveBase Inheritance Geometry Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

A UV Cylinder 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 torus.
TorusGeometry
  segmentsR : uint
Defines the number of horizontal segments that make up the torus.
TorusGeometry
  segmentsT : uint
Defines the number of vertical segments that make up the torus.
TorusGeometry
 InheritedsubGeometries : Vector.<SubGeometry>
[override] [read-only] A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.
PrimitiveBase
  tubeRadius : Number
The radius of the inner tube of the torus.
TorusGeometry
  yUp : Boolean
Defines whether the torus poles should lay on the Y-axis (true) or on the Z-axis (false).
TorusGeometry
Protected Properties
 PropertyDefined By
 Inherited_geomDirty : Boolean = true
PrimitiveBase
  _radius : Number
TorusGeometry
  _segmentsR : uint
TorusGeometry
  _segmentsT : uint
TorusGeometry
  _tubeRadius : Number
TorusGeometry
 Inherited_uvDirty : Boolean = true
PrimitiveBase
  _yUp : Boolean
TorusGeometry
Public Methods
 MethodDefined By
  
TorusGeometry(radius:Number = 50, tubeRadius:Number = 50, segmentsR:uint = 16, segmentsT:uint = 8, yUp:Boolean = true)
Creates a new Torus object.
TorusGeometry
 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.
TorusGeometry
  
buildUVs(target:SubGeometry):void
[override] Builds the primitive's uv coordinates when invalid.
TorusGeometry
 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
protected var _radius:Number

_segmentsRproperty 
protected var _segmentsR:uint

_segmentsTproperty 
protected var _segmentsT:uint

_tubeRadiusproperty 
protected var _tubeRadius:Number

_yUpproperty 
protected var _yUp:Boolean

radiusproperty 
radius:Number

The radius of the torus.


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
segmentsRproperty 
segmentsR:uint

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


Implementation
    public function get segmentsR():uint
    public function set segmentsR(value:uint):void
segmentsTproperty 
segmentsT:uint

Defines the number of vertical segments that make up the torus. Defaults to 8.


Implementation
    public function get segmentsT():uint
    public function set segmentsT(value:uint):void
tubeRadiusproperty 
tubeRadius:Number

The radius of the inner tube of the torus.


Implementation
    public function get tubeRadius():Number
    public function set tubeRadius(value:Number):void
yUpproperty 
yUp:Boolean

Defines whether the torus 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
TorusGeometry()Constructor
public function TorusGeometry(radius:Number = 50, tubeRadius:Number = 50, segmentsR:uint = 16, segmentsT:uint = 8, yUp:Boolean = true)

Creates a new Torus object.

Parameters
radius:Number (default = 50) — The radius of the torus.
 
tubeRadius:Number (default = 50) — The radius of the inner tube of the torus.
 
segmentsR:uint (default = 16) — Defines the number of horizontal segments that make up the torus.
 
segmentsT:uint (default = 8) — Defines the number of vertical segments that make up the torus.
 
yUp:Boolean (default = true) — Defines whether the torus 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