Packageaway3d.core.base
Classpublic class SubGeometry
InheritanceSubGeometry Inheritance SubGeometryBase Inheritance Object
Implements ISubGeometry

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


Public Properties
 PropertyDefined By
 InheritedautoDeriveVertexNormals : Boolean
True if the vertex normals should be derived from the geometry, false if the vertex normals are set explicitly.
SubGeometryBase
 InheritedautoDeriveVertexTangents : Boolean
True if the vertex tangents should be derived from the geometry, false if the vertex normals are set explicitly.
SubGeometryBase
 InheritedautoGenerateDummyUVs : Boolean
Defines whether a UV buffer should be automatically generated to contain dummy UV coordinates.
SubGeometryBase
 InheritednumTriangles : uint
[read-only] The total amount of triangles in the SubGeometry.
SubGeometryBase
  numVertices : uint
[read-only] The total amount of vertices in the SubGeometry.
SubGeometry
 InheritedparentGeometry : Geometry
SubGeometryBase
 InheritedscaleU : Number
[read-only] Scales the uv coordinates
SubGeometryBase
 InheritedscaleV : Number
[read-only]
SubGeometryBase
  secondaryUVData : Vector.<Number>
[read-only]
SubGeometry
  secondaryUVOffset : int
[read-only]
SubGeometry
  secondaryUVStride : uint
[read-only]
SubGeometry
 InheriteduseFaceWeights : Boolean
Indicates whether or not to take the size of faces into account when auto-deriving vertex normals and tangents.
SubGeometryBase
  UVData : Vector.<Number>
[override] [read-only] The raw texture coordinate data.
SubGeometry
  UVOffset : int
[override] [read-only]
SubGeometry
  UVStride : uint
[override] [read-only]
SubGeometry
  vertexData : Vector.<Number>
[override] [read-only] The raw vertex position data.
SubGeometry
  vertexNormalData : Vector.<Number>
[override] [read-only] The raw vertex normal data.
SubGeometry
  vertexNormalOffset : int
[override] [read-only]
SubGeometry
  vertexNormalStride : uint
[override] [read-only]
SubGeometry
  vertexOffset : int
[override] [read-only]
SubGeometry
  vertexPositionData : Vector.<Number>
[override] [read-only]
SubGeometry
  vertexStride : uint
[override] [read-only]
SubGeometry
 InheritedvertexTangentData : Vector.<Number>
[read-only]
SubGeometryBase
  vertexTangentOffset : int
[override] [read-only]
SubGeometry
  vertexTangentStride : uint
[override] [read-only]
SubGeometry
Protected Properties
 PropertyDefined By
 Inherited_autoDeriveVertexNormals : Boolean = true
SubGeometryBase
 Inherited_autoDeriveVertexTangents : Boolean = true
SubGeometryBase
 Inherited_autoGenerateUVs : Boolean = false
SubGeometryBase
 Inherited_faceNormals : Vector.<Number>
SubGeometryBase
 Inherited_faceNormalsDirty : Boolean = true
SubGeometryBase
 Inherited_faceTangents : Vector.<Number>
SubGeometryBase
 Inherited_faceTangentsDirty : Boolean = true
SubGeometryBase
 Inherited_faceWeights : Vector.<Number>
SubGeometryBase
 Inherited_indexBuffer : Vector.<IndexBuffer3D>
SubGeometryBase
 Inherited_indexBufferContext : Vector.<Context3D>
SubGeometryBase
 Inherited_indices : Vector.<uint>
SubGeometryBase
 Inherited_indicesInvalid : Vector.<Boolean>
SubGeometryBase
  _normalsInvalid : Vector.<Boolean>
SubGeometry
 Inherited_numIndices : uint
SubGeometryBase
 Inherited_numTriangles : uint
SubGeometryBase
  _numVertices : uint
SubGeometry
  _secondaryUvBuffer : Vector.<VertexBuffer3D>
SubGeometry
  _secondaryUvBufferContext : Vector.<Context3D>
SubGeometry
  _secondaryUvs : Vector.<Number>
SubGeometry
  _secondaryUvsInvalid : Vector.<Boolean>
SubGeometry
  _tangentsInvalid : Vector.<Boolean>
SubGeometry
  _uvBuffer : Vector.<VertexBuffer3D>
SubGeometry
  _uvBufferContext : Vector.<Context3D>
SubGeometry
  _uvs : Vector.<Number>
SubGeometry
 Inherited_uvsDirty : Boolean = true
SubGeometryBase
  _uvsInvalid : Vector.<Boolean>
SubGeometry
  _vertexBuffer : Vector.<VertexBuffer3D>
SubGeometry
  _vertexBufferContext : Vector.<Context3D>
SubGeometry
 Inherited_vertexData : Vector.<Number>
SubGeometryBase
  _vertexNormalBuffer : Vector.<VertexBuffer3D>
SubGeometry
  _vertexNormalBufferContext : Vector.<Context3D>
SubGeometry
  _vertexNormals : Vector.<Number>
SubGeometry
 Inherited_vertexNormalsDirty : Boolean = true
SubGeometryBase
  _vertexTangentBuffer : Vector.<VertexBuffer3D>
SubGeometry
  _vertexTangentBufferContext : Vector.<Context3D>
SubGeometry
  _vertexTangents : Vector.<Number>
SubGeometry
 Inherited_vertexTangentsDirty : Boolean = true
SubGeometryBase
  _verticesInvalid : Vector.<Boolean>
SubGeometry
Public Methods
 MethodDefined By
  
Creates a new SubGeometry object.
SubGeometry
  
activateSecondaryUVBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for a secondary set of UV coordinates
SubGeometry
  
activateUVBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for UV coordinates
SubGeometry
  
activateVertexBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for vertex positions.
SubGeometry
  
activateVertexNormalBuffer(index:int, stage3DProxy:Stage3DProxy):void
Retrieves the VertexBuffer3D object that contains vertex normals.
SubGeometry
  
activateVertexTangentBuffer(index:int, stage3DProxy:Stage3DProxy):void
Retrieves the VertexBuffer3D object that contains vertex tangents.
SubGeometry
  
applyTransformation(transform:Matrix3D):void
[override]
SubGeometry
  
Clones the current object
SubGeometry
  
SubGeometry
  
dispose():void
[override] Clears all resources used by the SubGeometry object.
SubGeometry
  
fromVectors(vertices:Vector.<Number>, uvs:Vector.<Number>, normals:Vector.<Number>, tangents:Vector.<Number>):void
SubGeometry
 Inherited
getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D
Retrieves the VertexBuffer3D object that contains triangle indices.
SubGeometryBase
  
scale(scale:Number):void
[override]
SubGeometry
  
scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
[override]
SubGeometry
 Inherited
updateIndexData(indices:Vector.<uint>):void
Updates the face indices of the SubGeometry.
SubGeometryBase
  
updateSecondaryUVData(uvs:Vector.<Number>):void
SubGeometry
  
updateUVData(uvs:Vector.<Number>):void
Updates the uv coordinates of the SubGeometry.
SubGeometry
  
updateVertexData(vertices:Vector.<Number>):void
Updates the vertex data of the SubGeometry.
SubGeometry
  
updateVertexNormalData(vertexNormals:Vector.<Number>):void
Updates the vertex normals of the SubGeometry.
SubGeometry
  
updateVertexTangentData(vertexTangents:Vector.<Number>):void
Updates the vertex tangents of the SubGeometry.
SubGeometry
Protected Methods
 MethodDefined By
  
SubGeometry
  
disposeForStage3D(stage3DProxy:Stage3DProxy):void
SubGeometry
 Inherited
disposeIndexBuffers(buffers:Vector.<IndexBuffer3D>):void
Disposes all buffers in a given vector.
SubGeometryBase
 Inherited
disposeVertexBuffers(buffers:Vector.<VertexBuffer3D>):void
Disposes all buffers in a given vector.
SubGeometryBase
 Inherited
SubGeometryBase
 Inherited
invalidateBuffers(invalid:Vector.<Boolean>):void
Invalidates all buffers in a vector, causing them the update when they are first requested.
SubGeometryBase
  
updateDummyUVs(target:Vector.<Number>):Vector.<Number>
[override]
SubGeometry
 Inherited
Updates the tangents for each face.
SubGeometryBase
  
updateVertexNormals(target:Vector.<Number>):Vector.<Number>
[override]
SubGeometry
  
updateVertexTangents(target:Vector.<Number>):Vector.<Number>
[override]
SubGeometry
Property Detail
_normalsInvalidproperty
protected var _normalsInvalid:Vector.<Boolean>

_numVerticesproperty 
protected var _numVertices:uint

_secondaryUvBufferproperty 
protected var _secondaryUvBuffer:Vector.<VertexBuffer3D>

_secondaryUvBufferContextproperty 
protected var _secondaryUvBufferContext:Vector.<Context3D>

_secondaryUvsproperty 
protected var _secondaryUvs:Vector.<Number>

_secondaryUvsInvalidproperty 
protected var _secondaryUvsInvalid:Vector.<Boolean>

_tangentsInvalidproperty 
protected var _tangentsInvalid:Vector.<Boolean>

_uvBufferproperty 
protected var _uvBuffer:Vector.<VertexBuffer3D>

_uvBufferContextproperty 
protected var _uvBufferContext:Vector.<Context3D>

_uvsproperty 
protected var _uvs:Vector.<Number>

_uvsInvalidproperty 
protected var _uvsInvalid:Vector.<Boolean>

_vertexBufferproperty 
protected var _vertexBuffer:Vector.<VertexBuffer3D>

_vertexBufferContextproperty 
protected var _vertexBufferContext:Vector.<Context3D>

_vertexNormalBufferproperty 
protected var _vertexNormalBuffer:Vector.<VertexBuffer3D>

_vertexNormalBufferContextproperty 
protected var _vertexNormalBufferContext:Vector.<Context3D>

_vertexNormalsproperty 
protected var _vertexNormals:Vector.<Number>

_vertexTangentBufferproperty 
protected var _vertexTangentBuffer:Vector.<VertexBuffer3D>

_vertexTangentBufferContextproperty 
protected var _vertexTangentBufferContext:Vector.<Context3D>

_vertexTangentsproperty 
protected var _vertexTangents:Vector.<Number>

_verticesInvalidproperty 
protected var _verticesInvalid:Vector.<Boolean>

numVerticesproperty 
numVertices:uint  [read-only]

The total amount of vertices in the SubGeometry.


Implementation
    public function get numVertices():uint
secondaryUVDataproperty 
secondaryUVData:Vector.<Number>  [read-only]


Implementation
    public function get secondaryUVData():Vector.<Number>
secondaryUVOffsetproperty 
secondaryUVOffset:int  [read-only]


Implementation
    public function get secondaryUVOffset():int
secondaryUVStrideproperty 
secondaryUVStride:uint  [read-only]


Implementation
    public function get secondaryUVStride():uint
UVDataproperty 
UVData:Vector.<Number>  [read-only] [override]

The raw texture coordinate data.


Implementation
    public function get UVData():Vector.<Number>
UVOffsetproperty 
UVOffset:int  [read-only] [override]


Implementation
    public function get UVOffset():int
UVStrideproperty 
UVStride:uint  [read-only] [override]


Implementation
    public function get UVStride():uint
vertexDataproperty 
vertexData:Vector.<Number>  [read-only] [override]

The raw vertex position data.


Implementation
    public function get vertexData():Vector.<Number>
vertexNormalDataproperty 
vertexNormalData:Vector.<Number>  [read-only] [override]

The raw vertex normal data.


Implementation
    public function get vertexNormalData():Vector.<Number>
vertexNormalOffsetproperty 
vertexNormalOffset:int  [read-only] [override]


Implementation
    public function get vertexNormalOffset():int
vertexNormalStrideproperty 
vertexNormalStride:uint  [read-only] [override]


Implementation
    public function get vertexNormalStride():uint
vertexOffsetproperty 
vertexOffset:int  [read-only] [override]


Implementation
    public function get vertexOffset():int
vertexPositionDataproperty 
vertexPositionData:Vector.<Number>  [read-only] [override]


Implementation
    public function get vertexPositionData():Vector.<Number>
vertexStrideproperty 
vertexStride:uint  [read-only] [override]


Implementation
    public function get vertexStride():uint
vertexTangentOffsetproperty 
vertexTangentOffset:int  [read-only] [override]


Implementation
    public function get vertexTangentOffset():int
vertexTangentStrideproperty 
vertexTangentStride:uint  [read-only] [override]


Implementation
    public function get vertexTangentStride():uint
Constructor Detail
SubGeometry()Constructor
public function SubGeometry()

Creates a new SubGeometry object.

Method Detail
activateSecondaryUVBuffer()method
public function activateSecondaryUVBuffer(index:int, stage3DProxy:Stage3DProxy):void

Assigns the attribute stream for a secondary set of UV coordinates

Parameters

index:int — The attribute stream index for the vertex shader
 
stage3DProxy:Stage3DProxy — The Stage3DProxy to assign the stream to

activateUVBuffer()method 
public function activateUVBuffer(index:int, stage3DProxy:Stage3DProxy):void

Assigns the attribute stream for UV coordinates

Parameters

index:int — The attribute stream index for the vertex shader
 
stage3DProxy:Stage3DProxy — The Stage3DProxy to assign the stream to

activateVertexBuffer()method 
public function activateVertexBuffer(index:int, stage3DProxy:Stage3DProxy):void

Assigns the attribute stream for vertex positions.

Parameters

index:int — The attribute stream index for the vertex shader
 
stage3DProxy:Stage3DProxy — The Stage3DProxy to assign the stream to

activateVertexNormalBuffer()method 
public function activateVertexNormalBuffer(index:int, stage3DProxy:Stage3DProxy):void

Retrieves the VertexBuffer3D object that contains vertex normals.

Parameters

index:int — The Context3D for which we request the buffer
 
stage3DProxy:Stage3DProxy

activateVertexTangentBuffer()method 
public function activateVertexTangentBuffer(index:int, stage3DProxy:Stage3DProxy):void

Retrieves the VertexBuffer3D object that contains vertex tangents.

Parameters

index:int — The Context3D for which we request the buffer
 
stage3DProxy:Stage3DProxy

applyTransformation()method 
override public function applyTransformation(transform:Matrix3D):void

Parameters

transform:Matrix3D

clone()method 
public function clone():ISubGeometry

Clones the current object

Returns
ISubGeometry — An exact duplicate of the current object.
cloneWithSeperateBuffers()method 
public function cloneWithSeperateBuffers():SubGeometry

Returns
SubGeometry
dispose()method 
override public function dispose():void

Clears all resources used by the SubGeometry object.

disposeAllVertexBuffers()method 
protected function disposeAllVertexBuffers():void

disposeForStage3D()method 
protected function disposeForStage3D(stage3DProxy:Stage3DProxy):void

Parameters

stage3DProxy:Stage3DProxy

fromVectors()method 
public function fromVectors(vertices:Vector.<Number>, uvs:Vector.<Number>, normals:Vector.<Number>, tangents:Vector.<Number>):void

Parameters

vertices:Vector.<Number>
 
uvs:Vector.<Number>
 
normals:Vector.<Number>
 
tangents:Vector.<Number>

scale()method 
override public function scale(scale:Number):void

Parameters

scale:Number

scaleUV()method 
override public function scaleUV(scaleU:Number = 1, scaleV:Number = 1):void

Parameters

scaleU:Number (default = 1)
 
scaleV:Number (default = 1)

updateDummyUVs()method 
override protected function updateDummyUVs(target:Vector.<Number>):Vector.<Number>

Parameters

target:Vector.<Number>

Returns
Vector.<Number>
updateSecondaryUVData()method 
public function updateSecondaryUVData(uvs:Vector.<Number>):void

Parameters

uvs:Vector.<Number>

updateUVData()method 
public function updateUVData(uvs:Vector.<Number>):void

Updates the uv coordinates of the SubGeometry.

Parameters

uvs:Vector.<Number> — The uv coordinates to upload.

updateVertexData()method 
public function updateVertexData(vertices:Vector.<Number>):void

Updates the vertex data of the SubGeometry.

Parameters

vertices:Vector.<Number> — The new vertex data to upload.

updateVertexNormalData()method 
public function updateVertexNormalData(vertexNormals:Vector.<Number>):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:Vector.<Number> — The vertex normals to upload.

updateVertexNormals()method 
override protected function updateVertexNormals(target:Vector.<Number>):Vector.<Number>

Parameters

target:Vector.<Number>

Returns
Vector.<Number>
updateVertexTangentData()method 
public function updateVertexTangentData(vertexTangents:Vector.<Number>):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:Vector.<Number> — The vertex tangents to upload.

updateVertexTangents()method 
override protected function updateVertexTangents(target:Vector.<Number>):Vector.<Number>

Parameters

target:Vector.<Number>

Returns
Vector.<Number>