The SubGeometry class is a collections of geometric data that describes a triangle mesh. It is owned by a Geometry instance, and wrapped by a SubMesh in the scene graph. Several SubGeometries are grouped so they can be rendered with different materials, but still represent a single object.

See also:

  • away3d.core.base.Geometry

  • away3d.core.base.SubMesh

Constructor

new()

Creates a new SubGeometry object.

Variables

read onlynumVertices:Int

read onlysecondaryUVData:Vector<Float>

read onlysecondaryUVOffset:Int

read onlysecondaryUVStride:Int

Methods

activateSecondaryUVBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

@inheritDoc

activateUVBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

@inheritDoc

activateVertexBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

@inheritDoc

activateVertexNormalBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

Retrieves the VertexBuffer3D object that contains vertex normals.

Parameters:

context

The Context3D for which we request the buffer

Returns:

The VertexBuffer3D object that contains vertex normals.

activateVertexTangentBuffer(index:Int, stage3DProxy:Stage3DProxy):Void

Retrieves the VertexBuffer3D object that contains vertex tangents.

Parameters:

context

The Context3D for which we request the buffer

Returns:

The VertexBuffer3D object that contains vertex tangents.

clone():ISubGeometry

Clones the current object

Returns:

An exact duplicate of the current object.

dispose():Void

Clears all resources used by the SubGeometry object.

fromVectors(vertices:Vector<Float>, uvs:Vector<Float>, normals:Vector<Float>, tangents:Vector<Float>):Void

scale(scale:Float):Void

@inheritDoc

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

@inheritDoc

updateSecondaryUVData(uvs:Vector<Float>):Void

updateUVData(uvs:Vector<Float>):Void

Updates the uv coordinates of the SubGeometry.

Parameters:

uvs

The uv coordinates to upload.

updateVertexData(vertices:Vector<Float>):Void

Updates the vertex data of the SubGeometry.

Parameters:

vertices

The new vertex data to upload.

updateVertexNormalData(vertexNormals:Vector<Float>):Void

Updates the vertex normals of the SubGeometry. When updating the vertex normals like this, autoDeriveVertexNormals will be set to false and vertex normals will no longer be calculated automatically.

Parameters:

vertexNormals

The vertex normals to upload.

updateVertexTangentData(vertexTangents:Vector<Float>):Void

Updates the vertex tangents of the SubGeometry. When updating the vertex tangents like this, autoDeriveVertexTangents will be set to false and vertex tangents will no longer be calculated automatically.

Parameters:

vertexTangents

The vertex tangents to upload.

Inherited Variables

Defined by SubGeometryBase

read onlyUVData:Vector<Float>

read onlyUVOffset:Int

read onlyUVStride:Int

read onlynumTriangles:Int

read onlyscaleU:Float

read onlyscaleV:Float

read onlyvertexData:Vector<Float>

read onlyvertexNormalData:Vector<Float>

read onlyvertexNormalOffset:Int

read onlyvertexNormalStride:Int

read onlyvertexOffset:Int

read onlyvertexPositionData:Vector<Float>

read onlyvertexStride:Int

read onlyvertexTangentData:Vector<Float>

read onlyvertexTangentOffset:Int

read onlyvertexTangentStride:Int

Inherited Methods

Defined by SubGeometryBase

getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D

Retrieves the VertexBuffer3D object that contains triangle indices.

Parameters:

context

The Context3D for which we request the buffer

Returns:

The VertexBuffer3D object that contains triangle indices.

updateIndexData(indices:Vector<UInt>):Void

Updates the face indices of the SubGeometry.

Parameters:

indices

The face indices to upload.