Packageaway3d.core.base
Classpublic class SubGeometry
SubclassesSkinnedSubGeometry

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
  animation : AnimationBase
[read-only] The animation that affects the geometry.
SubGeometry
  autoDeriveVertexNormals : Boolean
True if the vertex normals should be derived from the geometry, false if the vertex normals are set explicitly.
SubGeometry
  autoDeriveVertexTangents : Boolean
True if the vertex tangents should be derived from the geometry, false if the vertex normals are set explicitly.
SubGeometry
  numTriangles : uint
[read-only] The total amount of triangles in the SubGeometry.
SubGeometry
  numVertices : uint
[read-only] The total amount of vertices in the SubGeometry.
SubGeometry
  useFaceWeights : Boolean
Indicates whether or not to take the size of faces into account when auto-deriving vertex normals and tangents.
SubGeometry
  UVData : Vector
[read-only] The raw texture coordinate data.
SubGeometry
  vertexData : Vector
[read-only] The raw vertex position data.
SubGeometry
  vertexNormalData : Vector
[read-only] The raw vertex normal data.
SubGeometry
Protected Properties
 PropertyDefined by
  _faceNormalsData : Vector
SubGeometry
  _faceNormalsDirty : Boolean = true
SubGeometry
  _faceTangents : Vector
SubGeometry
  _faceTangentsDirty : Boolean = true
SubGeometry
  _faceWeights : Vector
SubGeometry
  _indexBuffer : Vector
SubGeometry
  _indexBufferDirty : Vector
SubGeometry
  _indices : Vector
SubGeometry
  _maxIndex : int = -1
SubGeometry
  _numIndices : uint
SubGeometry
  _numTriangles : uint
SubGeometry
  _numVertices : uint
SubGeometry
  _uvBuffer : Vector
SubGeometry
  _uvBufferDirty : Vector
SubGeometry
  _uvs : Vector
SubGeometry
  _vertexBuffer : Vector
SubGeometry
  _vertexBufferDirty : Vector
SubGeometry
  _vertexNormalBuffer : Vector
SubGeometry
  _vertexNormalBufferDirty : Vector
SubGeometry
  _vertexNormals : Vector
SubGeometry
  _vertexNormalsDirty : Boolean = true
SubGeometry
  _vertexTangentBuffer : Vector
SubGeometry
  _vertexTangentBufferDirty : Vector
SubGeometry
  _vertexTangents : Vector
SubGeometry
  _vertexTangentsDirty : Boolean = true
SubGeometry
  _vertices : Vector
SubGeometry
Public Methods
 MethodDefined by
  
Creates a new SubGeometry object.
SubGeometry
  
Clones the current object
SubGeometry
  
dispose():void
Clears all resources used by the SubGeometry object.
SubGeometry
  
getIndexBuffer(context:Context3D, contextIndex:uint):IndexBuffer3D
Retrieves the VertexBuffer3D object that contains triangle indices.
SubGeometry
  
getUVBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains texture coordinates.
SubGeometry
  
getVertexBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex positions.
SubGeometry
  
getVertexNormalBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex normals.
SubGeometry
  
getVertexTangentBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex tangents.
SubGeometry
  
scale(scale:Number):void
Scales the geometry.
SubGeometry
  
scaleUV(scale:Number):void
Scales the uv coordinates.
SubGeometry
  
updateIndexData(indices:Vector):void
Updates the face indices of the SubGeometry.
SubGeometry
  
updateUVData(uvs:Vector):void
Updates the uv coordinates of the SubGeometry.
SubGeometry
  
updateVertexData(vertices:Vector):void
Updates the vertex data of the SubGeometry.
SubGeometry
  
updateVertexNormalData(vertexNormals:Vector):void
Updates the vertex normals of the SubGeometry.
SubGeometry
  
updateVertexTangentData(vertexTangents:Vector):void
Updates the vertex tangents of the SubGeometry.
SubGeometry
Protected Methods
 MethodDefined by
  
disposeIndexBuffers(buffers:Vector):void
Disposes all buffers in a given vector.
SubGeometry
  
disposeVertexBuffers(buffers:Vector):void
Disposes all buffers in a given vector.
SubGeometry
  
invalidateBuffers(buffers:Vector):void
Invalidates all buffers in a vector, causing them the update when they are first requested.
SubGeometry
Property detail
animationproperty
animation:AnimationBase  [read-only]

The animation that affects the geometry.

Implementation
    public function get animation():AnimationBase
autoDeriveVertexNormalsproperty 
autoDeriveVertexNormals:Boolean  [read-write]

True if the vertex normals should be derived from the geometry, false if the vertex normals are set explicitly.

Implementation
    public function get autoDeriveVertexNormals():Boolean
    public function set autoDeriveVertexNormals(value:Boolean):void
autoDeriveVertexTangentsproperty 
autoDeriveVertexTangents:Boolean  [read-write]

True if the vertex tangents should be derived from the geometry, false if the vertex normals are set explicitly.

Implementation
    public function get autoDeriveVertexTangents():Boolean
    public function set autoDeriveVertexTangents(value:Boolean):void
_faceNormalsDataproperty 
protected var _faceNormalsData:Vector
_faceNormalsDirtyproperty 
protected var _faceNormalsDirty:Boolean = true
_faceTangentsproperty 
protected var _faceTangents:Vector
_faceTangentsDirtyproperty 
protected var _faceTangentsDirty:Boolean = true
_faceWeightsproperty 
protected var _faceWeights:Vector
_indexBufferproperty 
protected var _indexBuffer:Vector
_indexBufferDirtyproperty 
protected var _indexBufferDirty:Vector
_indicesproperty 
protected var _indices:Vector
_maxIndexproperty 
protected var _maxIndex:int = -1
_numIndicesproperty 
protected var _numIndices:uint
_numTrianglesproperty 
protected var _numTriangles:uint
numTrianglesproperty 
numTriangles:uint  [read-only]

The total amount of triangles in the SubGeometry.

Implementation
    public function get numTriangles():uint
_numVerticesproperty 
protected var _numVertices:uint
numVerticesproperty 
numVertices:uint  [read-only]

The total amount of vertices in the SubGeometry.

Implementation
    public function get numVertices():uint
parentGeometryproperty 
parentGeometry:Geometry  [read-write]Implementation
    arcane function get parentGeometry():Geometry
    arcane function set parentGeometry(value:Geometry):void
useFaceWeightsproperty 
useFaceWeights:Boolean  [read-write]

Indicates whether or not to take the size of faces into account when auto-deriving vertex normals and tangents.

Implementation
    public function get useFaceWeights():Boolean
    public function set useFaceWeights(value:Boolean):void
_uvBufferproperty 
protected var _uvBuffer:Vector
_uvBufferDirtyproperty 
protected var _uvBufferDirty:Vector
UVDataproperty 
UVData:Vector  [read-only]

The raw texture coordinate data.

Implementation
    public function get UVData():Vector
_uvsproperty 
protected var _uvs:Vector
_vertexBufferproperty 
protected var _vertexBuffer:Vector
_vertexBufferDirtyproperty 
protected var _vertexBufferDirty:Vector
vertexDataproperty 
vertexData:Vector  [read-only]

The raw vertex position data.

Implementation
    public function get vertexData():Vector
_vertexNormalBufferproperty 
protected var _vertexNormalBuffer:Vector
_vertexNormalBufferDirtyproperty 
protected var _vertexNormalBufferDirty:Vector
vertexNormalDataproperty 
vertexNormalData:Vector  [read-only]

The raw vertex normal data.

Implementation
    public function get vertexNormalData():Vector
_vertexNormalsproperty 
protected var _vertexNormals:Vector
_vertexNormalsDirtyproperty 
protected var _vertexNormalsDirty:Boolean = true
_vertexTangentBufferproperty 
protected var _vertexTangentBuffer:Vector
_vertexTangentBufferDirtyproperty 
protected var _vertexTangentBufferDirty:Vector
_vertexTangentsproperty 
protected var _vertexTangents:Vector
_vertexTangentsDirtyproperty 
protected var _vertexTangentsDirty:Boolean = true
_verticesproperty 
protected var _vertices:Vector
Constructor detail
SubGeometry()constructor
public function SubGeometry() Init Parameters
Method detail
clone()method
public function clone():SubGeometry

Clones the current object

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

Clears all resources used by the SubGeometry object.

disposeIndexBuffers()method 
protected function disposeIndexBuffers(buffers:Vector):void

Disposes all buffers in a given vector.

Parameters
buffers:Vector — The vector of buffers to dispose.
disposeVertexBuffers()method 
protected function disposeVertexBuffers(buffers:Vector):void

Disposes all buffers in a given vector.

Parameters
buffers:Vector — The vector of buffers to dispose.
getIndexBuffer()method 
public function getIndexBuffer(context:Context3D, contextIndex:uint):IndexBuffer3D

Retrieves the VertexBuffer3D object that contains triangle indices.

Parameters
context:Context3D — The Context3D for which we request the buffer
 
contextIndex:uint

Returns
IndexBuffer3D — The VertexBuffer3D object that contains triangle indices.
getUVBuffer()method 
public function getUVBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D

Retrieves the VertexBuffer3D object that contains texture coordinates.

Parameters
context:Context3D — The Context3D for which we request the buffer
 
contextIndex:uint

Returns
VertexBuffer3D — The VertexBuffer3D object that contains texture coordinates.
getVertexBuffer()method 
public function getVertexBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D

Retrieves the VertexBuffer3D object that contains vertex positions.

Parameters
context:Context3D — The Context3D for which we request the buffer
 
contextIndex:uint

Returns
VertexBuffer3D — The VertexBuffer3D object that contains vertex positions.
getVertexNormalBuffer()method 
public function getVertexNormalBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D

Retrieves the VertexBuffer3D object that contains vertex normals.

Parameters
context:Context3D — The Context3D for which we request the buffer
 
contextIndex:uint

Returns
VertexBuffer3D — The VertexBuffer3D object that contains vertex normals.
getVertexTangentBuffer()method 
public function getVertexTangentBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D

Retrieves the VertexBuffer3D object that contains vertex tangents.

Parameters
context:Context3D — The Context3D for which we request the buffer
 
contextIndex:uint

Returns
VertexBuffer3D — The VertexBuffer3D object that contains vertex tangents.
invalidateBuffers()method 
protected function invalidateBuffers(buffers:Vector):void

Invalidates all buffers in a vector, causing them the update when they are first requested.

Parameters
buffers:Vector — The vector of buffers to invalidate.
scale()method 
public function scale(scale:Number):void

Scales the geometry.

Parameters
scale:Number — The amount by which to scale.
scaleUV()method 
public function scaleUV(scale:Number):void

Scales the uv coordinates.

Parameters
scale:Number — The amount by which to scale.
updateIndexData()method 
public function updateIndexData(indices:Vector):void

Updates the face indices of the SubGeometry.

Parameters
indices:Vector — The face indices to upload.
updateUVData()method 
public function updateUVData(uvs:Vector):void

Updates the uv coordinates of the SubGeometry.

Parameters
uvs:Vector — The uv coordinates to upload.
updateVertexData()method 
public function updateVertexData(vertices:Vector):void

Updates the vertex data of the SubGeometry.

Parameters
vertices:Vector — The new vertex data to upload.
updateVertexNormalData()method 
public function updateVertexNormalData(vertexNormals:Vector):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 — The vertex normals to upload.
updateVertexTangentData()method 
public function updateVertexTangentData(vertexTangents:Vector):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 — The vertex tangents to upload.
Wiki link
Click to go to the wiki page for 'away3d.core.base.SubGeometry'

Code examples

Comments