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.
protected var _customBuffer:Vector.<VertexBuffer3D>
protected var _customBufferContext:Vector.<Context3D>
protected var _customData:Vector.<Number>
protected var _faceNormalsData:Vector.<Number>
protected var _faceNormalsDirty:Boolean = true
protected var _faceTangents:Vector.<Number>
protected var _faceTangentsDirty:Boolean = true
protected var _faceWeights:Vector.<Number>
protected var _indexBuffer:Vector.<IndexBuffer3D>
protected var _indexBufferContext:Vector.<Context3D>
protected var _indices:Vector.<uint>
protected var _numIndices:uint
protected var _numTriangles:uint
protected var _numVertices:uint
protected var _secondaryUvBuffer:Vector.<VertexBuffer3D>
protected var _secondaryUvBufferContext:Vector.<Context3D>
protected var _secondaryUvs:Vector.<Number>
protected var _uvBuffer:Vector.<VertexBuffer3D>
protected var _uvBufferContext:Vector.<Context3D>
protected var _uvs:Vector.<Number>
protected var _uvsDirty:Boolean = true
protected var _vertexBuffer:Vector.<VertexBuffer3D>
protected var _vertexBufferContext:Vector.<Context3D>
protected var _vertexNormalBuffer:Vector.<VertexBuffer3D>
protected var _vertexNormalBufferContext:Vector.<Context3D>
protected var _vertexNormals:Vector.<Number>
protected var _vertexNormalsDirty:Boolean = true
protected var _vertexTangentBuffer:Vector.<VertexBuffer3D>
protected var _vertexTangentBufferContext:Vector.<Context3D>
protected var _vertexTangents:Vector.<Number>
protected var _vertexTangentsDirty:Boolean = true
protected var _vertices:Vector.<Number>
autoDeriveVertexNormals:Boolean
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
autoDeriveVertexTangents:Boolean
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
autoGenerateDummyUVs:Boolean
Defines whether a UV buffer should be automatically generated to contain dummy UV coordinates.
Set to true if a geometry lacks UV data but uses a material that requires it, or leave as false
in cases where UV data is explicitly defined or the material does not require UV data.
Implementation public function get autoGenerateDummyUVs():Boolean
public function set autoGenerateDummyUVs(value:Boolean):void
normalBufferOffset:int
[read-only]
Implementation public function get normalBufferOffset():int
numTriangles:uint
[read-only]
The total amount of triangles in the SubGeometry.
Implementation public function get numTriangles():uint
numVertices:uint
[read-only]
The total amount of vertices in the SubGeometry.
Implementation public function get numVertices():uint
parentGeometry:Geometry
Implementation arcane function get parentGeometry():Geometry
arcane function set parentGeometry(value:Geometry):void
scaleU:Number
[read-only]
Implementation public function get scaleU():Number
scaleV:Number
[read-only]
Implementation public function get scaleV():Number
secondaryUVBufferOffset:int
[read-only]
Implementation public function get secondaryUVBufferOffset():int
secondaryUVData:Vector.<Number>
[read-only]
Implementation public function get secondaryUVData():Vector.<Number>
tangentBufferOffset:int
[read-only]
Implementation public function get tangentBufferOffset():int
useFaceWeights:Boolean
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
UVBufferOffset:int
[read-only]
Implementation public function get UVBufferOffset():int
UVData:Vector.<Number>
[read-only]
The raw texture coordinate data.
Implementation public function get UVData():Vector.<Number>
vertexBufferOffset:int
[read-only]
Implementation public function get vertexBufferOffset():int
vertexData:Vector.<Number>
[read-only]
The raw vertex position data.
Implementation public function get vertexData():Vector.<Number>
vertexNormalData:Vector.<Number>
[read-only]
The raw vertex normal data.
Implementation public function get vertexNormalData():Vector.<Number>
public function SubGeometry()
Creates a new SubGeometry object.
public function applyTransformation(transform:Matrix3D):void
Parameters
public function clone():SubGeometry
Clones the current object
Returns | SubGeometry — An exact duplicate of the current object.
|
public function dispose():void
Clears all resources used by the SubGeometry object.
protected function disposeAllVertexBuffers():void
protected function disposeForStage3D(stage3DProxy:Stage3DProxy):void
Parameters
protected function disposeIndexBuffers(buffers:Vector.<IndexBuffer3D>):void
Disposes all buffers in a given vector.
Parameters
| buffers:Vector.<IndexBuffer3D> — The vector of buffers to dispose.
|
protected function disposeVertexBuffers(buffers:Vector.<VertexBuffer3D>):void
Disposes all buffers in a given vector.
Parameters
| buffers:Vector.<VertexBuffer3D> — The vector of buffers to dispose.
|
public function getCustomBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
A buffer allowing you any sort of data. Needs to be initialized by calling initCustomBuffer
Parameters
Returns public function getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D
Retrieves the VertexBuffer3D object that contains triangle indices.
Parameters
| stage3DProxy:Stage3DProxy — The Context3D for which we request the buffer
|
Returns | IndexBuffer3D — The VertexBuffer3D object that contains triangle indices.
|
public function getSecondaryUVBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Parameters
Returns public function getUVBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains texture coordinates.
Parameters
| stage3DProxy:Stage3DProxy — The Context3D for which we request the buffer
|
Returns | VertexBuffer3D — The VertexBuffer3D object that contains texture coordinates.
|
public function getVertexBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex positions.
Parameters
| stage3DProxy:Stage3DProxy — The Context3D for which we request the buffer
|
Returns | VertexBuffer3D — The VertexBuffer3D object that contains vertex positions.
|
public function getVertexNormalBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex normals.
Parameters
| stage3DProxy:Stage3DProxy — The Context3D for which we request the buffer
|
Returns | VertexBuffer3D — The VertexBuffer3D object that contains vertex normals.
|
public function getVertexTangentBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex tangents.
Parameters
| stage3DProxy:Stage3DProxy — The Context3D for which we request the buffer
|
Returns | VertexBuffer3D — The VertexBuffer3D object that contains vertex tangents.
|
public function initCustomBuffer(numVertices:int, elementsPerVertex:int):void
Parameters
| numVertices:int |
|
| elementsPerVertex:int |
protected function invalidateBuffers(buffers:Vector.<Context3D>):void
Invalidates all buffers in a vector, causing them the update when they are first requested.
Parameters
| buffers:Vector.<Context3D> — The vector of buffers to invalidate.
|
public function scale(scale:Number):void
Scales the geometry.
Parameters
| scale:Number — The amount by which to scale.
|
public function scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
Parameters
| scaleU:Number (default = 1 )
|
|
| scaleV:Number (default = 1 )
|
public function updateCustomData(data:Vector.<Number>):void
Parameters
public function updateIndexData(indices:Vector.<uint>):void
Updates the face indices of the SubGeometry.
Parameters
| indices:Vector.<uint> — The face indices to upload.
|
public function updateSecondaryUVData(uvs:Vector.<Number>):void
Parameters
public function updateUVData(uvs:Vector.<Number>):void
Updates the uv coordinates of the SubGeometry.
Parameters
| uvs:Vector.<Number> — The uv coordinates to upload.
|
public function updateVertexData(vertices:Vector.<Number>):void
Updates the vertex data of the SubGeometry.
Parameters
| vertices:Vector.<Number> — The new vertex data to upload.
|
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.
|
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.
|
Tue Jul 17 2012, 10:37 AM +01:00