| Package | away3d.primitives |
| Class | public class CubeGeometry |
| Inheritance | CubeGeometry PrimitiveBase Geometry NamedAssetBase flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
![]() | assetFullPath : Array [read-only] | NamedAssetBase | |
![]() | assetNamespace : String [read-only] | NamedAssetBase | |
![]() | assetType : 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 | ||
![]() | name : String | NamedAssetBase | |
![]() | originalName : 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 | ||
![]() | subGeometries : Vector.<ISubGeometry> [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 | ||
| Method | Defined 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 | ||
![]() | 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. | CubeGeometry | ||
buildUVs(target:CompactSubGeometry):void [override]
Builds the primitive's uv coordinates when invalid. | CubeGeometry | ||
![]() | 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 | |
| depth | property |
depth:NumberThe size of the cube along its Z-axis.
public function get depth():Number public function set depth(value:Number):void| height | property |
height:NumberThe size of the cube along its Y-axis.
public function get height():Number public function set height(value:Number):void| segmentsD | property |
segmentsD:NumberThe number of segments that make up the cube along the Z-axis. Defaults to 1.
public function get segmentsD():Number public function set segmentsD(value:Number):void| segmentsH | property |
segmentsH:NumberThe number of segments that make up the cube along the Y-axis. Defaults to 1.
public function get segmentsH():Number public function set segmentsH(value:Number):void| segmentsW | property |
segmentsW:NumberThe number of segments that make up the cube along the X-axis. Defaults to 1.
public function get segmentsW():Number public function set segmentsW(value:Number):void| tile6 | property |
tile6:BooleanThe 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.
public function get tile6():Boolean public function set tile6(value:Boolean):void| width | property |
width:NumberThe size of the cube along its X-axis.
public function get width():Number public function set width(value:Number):void| 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.
Parameterswidth: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.
|
| 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 |