Packageaway3d.primitives
Classpublic class CubeGeometry
InheritanceCubeGeometry Inheritance PrimitiveBase Inheritance Geometry Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

A Cube primitive mesh.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
Geometry
  depth : Number
The size of the cube along its Z-axis.
CubeGeometry
  height : Number
The size of the cube along its Y-axis.
CubeGeometry
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
  segmentsD : Number
The number of segments that make up the cube along the Z-axis.
CubeGeometry
  segmentsH : Number
The number of segments that make up the cube along the Y-axis.
CubeGeometry
  segmentsW : Number
The number of segments that make up the cube along the X-axis.
CubeGeometry
 InheritedsubGeometries : Vector.<SubGeometry>
[override] [read-only] A collection of SubGeometry objects, each of which contain geometrical data such as vertices, normals, etc.
PrimitiveBase
  tile6 : Boolean
The type of uv mapping to use.
CubeGeometry
  width : Number
The size of the cube along its X-axis.
CubeGeometry
Protected Properties
 PropertyDefined By
 Inherited_geomDirty : Boolean = true
PrimitiveBase
 Inherited_uvDirty : Boolean = true
PrimitiveBase
Public Methods
 MethodDefined By
  
CubeGeometry(width:Number = 100, height:Number = 100, depth:Number = 100, segmentsW:uint = 1, segmentsH:uint = 1, segmentsD:uint = 1, tile6:Boolean = true)
Creates a new Cube object.
CubeGeometry
 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.
CubeGeometry
  
buildUVs(target:SubGeometry):void
[override] Builds the primitive's uv coordinates when invalid.
CubeGeometry
 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
depthproperty
depth:Number

The size of the cube along its Z-axis.


Implementation
    public function get depth():Number
    public function set depth(value:Number):void
heightproperty 
height:Number

The size of the cube along its Y-axis.


Implementation
    public function get height():Number
    public function set height(value:Number):void
segmentsDproperty 
segmentsD:Number

The number of segments that make up the cube along the Z-axis. Defaults to 1.


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

The number of segments that make up the cube along the Y-axis. Defaults to 1.


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

The number of segments that make up the cube along the X-axis. Defaults to 1.


Implementation
    public function get segmentsW():Number
    public function set segmentsW(value:Number):void
tile6property 
tile6:Boolean

The type of uv mapping to use. When false, the entire image is mapped on each face. When true, a texture will be subdivided in a 3x2 grid, each used for a single face. Reading the tiles from left to right, top to bottom they represent the faces of the cube in the following order: bottom, top, back, left, front, right. This creates several shared edges (between the top, front, left and right faces) which simplifies texture painting.


Implementation
    public function get tile6():Boolean
    public function set tile6(value:Boolean):void
widthproperty 
width:Number

The size of the cube along its X-axis.


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
CubeGeometry()Constructor
public function CubeGeometry(width:Number = 100, height:Number = 100, depth:Number = 100, segmentsW:uint = 1, segmentsH:uint = 1, segmentsD:uint = 1, tile6:Boolean = true)

Creates a new Cube object.

Parameters
width:Number (default = 100) — The size of the cube along its X-axis.
 
height:Number (default = 100) — The size of the cube along its Y-axis.
 
depth:Number (default = 100) — The size of the cube along its Z-axis.
 
segmentsW:uint (default = 1) — The number of segments that make up the cube along the X-axis.
 
segmentsH:uint (default = 1) — The number of segments that make up the cube along the Y-axis.
 
segmentsD:uint (default = 1) — The number of segments that make up the cube along the Z-axis.
 
tile6:Boolean (default = true) — The type of uv mapping to use. When true, a texture will be subdivided in a 2x3 grid, each used for a single face. When false, the entire image is mapped on each face.
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