A Cube primitive mesh.

Constructor

@:value({ tile6 : true, segmentsD : 1, segmentsH : 1, segmentsW : 1, depth : 100, height : 100, width : 100 })new(width:Float = 100, height:Float = 100, depth:Float = 100, segmentsW:Int = 1, segmentsH:Int = 1, segmentsD:Int = 1, tile6:Bool = true)

Creates a new Cube object.

Parameters:

width

The size of the cube along its X-axis.

height

The size of the cube along its Y-axis.

depth

The size of the cube along its Z-axis.

segmentsW

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

segmentsH

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

segmentsD

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

tile6

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.

Variables

depth:Float

height:Float

tile6:Bool

width:Float

Inherited Variables

Defined by Geometry

read onlyassetType:String

read onlysubGeometries:Vector<ISubGeometry>

Defined by NamedAssetBase

read onlyassetFullPath:Array<Dynamic>

read onlyassetNamespace:String

id:String

name:String

read onlyoriginalName:String

Inherited Methods

Defined by PrimitiveBase

applyTransformation(transform:Matrix3D):Void

@inheritDoc

clone():Geometry

@inheritDoc

scale(scale:Float):Void

@inheritDoc

@:value({ scaleV : 1, scaleU : 1 })scaleUV(scaleU:Float = 1, scaleV:Float = 1):Void

@inheritDoc

Defined by Geometry

addSubGeometry(subGeometry:ISubGeometry):Void

Adds a new SubGeometry object to the list.

Parameters:

subGeometry

The SubGeometry object to be added.

convertToSeparateBuffers():Void

Updates the SubGeometries so all vertex data is represented in different buffers. Use this for compatibility with Pixel Bender and PBPickingCollider

dispose():Void

Clears all resources used by the Geometry object, including SubGeometries.

removeSubGeometry(subGeometry:ISubGeometry):Void

Removes a new SubGeometry object from the list.

Parameters:

subGeometry

The SubGeometry object to be removed.

Defined by NamedAssetBase

assetPathEquals(name:String, ns:String):Bool

@:value({ overrideOriginal : true, ns : null })resetAssetPath(name:String, ?ns:String, overrideOriginal:Bool = true):Void