Packageaway3d.core.base
Classpublic class SubGeometryBase
InheritanceSubGeometryBase Inheritance Object
Subclasses CompactSubGeometry, SubGeometry



Public Properties
 PropertyDefined By
  autoDeriveVertexNormals : Boolean
True if the vertex normals should be derived from the geometry, false if the vertex normals are set explicitly.
SubGeometryBase
  autoDeriveVertexTangents : Boolean
True if the vertex tangents should be derived from the geometry, false if the vertex normals are set explicitly.
SubGeometryBase
  autoGenerateDummyUVs : Boolean
Defines whether a UV buffer should be automatically generated to contain dummy UV coordinates.
SubGeometryBase
  numTriangles : uint
[read-only] The total amount of triangles in the SubGeometry.
SubGeometryBase
  parentGeometry : Geometry
SubGeometryBase
  scaleU : Number
[read-only] Scales the uv coordinates
SubGeometryBase
  scaleV : Number
[read-only]
SubGeometryBase
  useFaceWeights : Boolean
Indicates whether or not to take the size of faces into account when auto-deriving vertex normals and tangents.
SubGeometryBase
  UVData : Vector.<Number>
[read-only]
SubGeometryBase
  UVOffset : int
[read-only]
SubGeometryBase
  UVStride : uint
[read-only]
SubGeometryBase
  vertexData : Vector.<Number>
[read-only]
SubGeometryBase
  vertexNormalData : Vector.<Number>
[read-only]
SubGeometryBase
  vertexNormalOffset : int
[read-only]
SubGeometryBase
  vertexNormalStride : uint
[read-only]
SubGeometryBase
  vertexOffset : int
[read-only]
SubGeometryBase
  vertexStride : uint
[read-only]
SubGeometryBase
  vertexTangentData : Vector.<Number>
[read-only]
SubGeometryBase
  vertexTangentOffset : int
[read-only]
SubGeometryBase
  vertexTangentStride : uint
[read-only]
SubGeometryBase
Protected Properties
 PropertyDefined By
  _autoDeriveVertexNormals : Boolean = true
SubGeometryBase
  _autoDeriveVertexTangents : Boolean = true
SubGeometryBase
  _autoGenerateUVs : Boolean = false
SubGeometryBase
  _faceNormals : Vector.<Number>
SubGeometryBase
  _faceNormalsDirty : Boolean = true
SubGeometryBase
  _faceTangents : Vector.<Number>
SubGeometryBase
  _faceTangentsDirty : Boolean = true
SubGeometryBase
  _faceWeights : Vector.<Number>
SubGeometryBase
  _indexBuffer : Vector.<IndexBuffer3D>
SubGeometryBase
  _indexBufferContext : Vector.<Context3D>
SubGeometryBase
  _indices : Vector.<uint>
SubGeometryBase
  _indicesInvalid : Vector.<Boolean>
SubGeometryBase
  _numIndices : uint
SubGeometryBase
  _numTriangles : uint
SubGeometryBase
  _uvsDirty : Boolean = true
SubGeometryBase
  _vertexData : Vector.<Number>
SubGeometryBase
  _vertexNormalsDirty : Boolean = true
SubGeometryBase
  _vertexTangentsDirty : Boolean = true
SubGeometryBase
Public Methods
 MethodDefined By
  
SubGeometryBase
  
applyTransformation(transform:Matrix3D):void
SubGeometryBase
  
dispose():void
SubGeometryBase
  
getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D
Retrieves the VertexBuffer3D object that contains triangle indices.
SubGeometryBase
  
scale(scale:Number):void
Scales the geometry.
SubGeometryBase
  
scaleUV(scaleU:Number = 1, scaleV:Number = 1):void
SubGeometryBase
  
updateIndexData(indices:Vector.<uint>):void
Updates the face indices of the SubGeometry.
SubGeometryBase
Protected Methods
 MethodDefined By
  
disposeIndexBuffers(buffers:Vector.<IndexBuffer3D>):void
Disposes all buffers in a given vector.
SubGeometryBase
  
disposeVertexBuffers(buffers:Vector.<VertexBuffer3D>):void
Disposes all buffers in a given vector.
SubGeometryBase
  
SubGeometryBase
  
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>
SubGeometryBase
  
Updates the tangents for each face.
SubGeometryBase
  
updateVertexNormals(target:Vector.<Number>):Vector.<Number>
Updates the vertex normals based on the geometry.
SubGeometryBase
  
updateVertexTangents(target:Vector.<Number>):Vector.<Number>
Updates the vertex tangents based on the geometry.
SubGeometryBase
Property Detail
_autoDeriveVertexNormalsproperty
protected var _autoDeriveVertexNormals:Boolean = true

_autoDeriveVertexTangentsproperty 
protected var _autoDeriveVertexTangents:Boolean = true

_autoGenerateUVsproperty 
protected var _autoGenerateUVs:Boolean = false

_faceNormalsproperty 
protected var _faceNormals:Vector.<Number>

_faceNormalsDirtyproperty 
protected var _faceNormalsDirty:Boolean = true

_faceTangentsproperty 
protected var _faceTangents:Vector.<Number>

_faceTangentsDirtyproperty 
protected var _faceTangentsDirty:Boolean = true

_faceWeightsproperty 
protected var _faceWeights:Vector.<Number>

_indexBufferproperty 
protected var _indexBuffer:Vector.<IndexBuffer3D>

_indexBufferContextproperty 
protected var _indexBufferContext:Vector.<Context3D>

_indicesproperty 
protected var _indices:Vector.<uint>

_indicesInvalidproperty 
protected var _indicesInvalid:Vector.<Boolean>

_numIndicesproperty 
protected var _numIndices:uint

_numTrianglesproperty 
protected var _numTriangles:uint

_uvsDirtyproperty 
protected var _uvsDirty:Boolean = true

_vertexDataproperty 
protected var _vertexData:Vector.<Number>

_vertexNormalsDirtyproperty 
protected var _vertexNormalsDirty:Boolean = true

_vertexTangentsDirtyproperty 
protected var _vertexTangentsDirty:Boolean = true

autoDeriveVertexNormalsproperty 
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
autoDeriveVertexTangentsproperty 
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
autoGenerateDummyUVsproperty 
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
numTrianglesproperty 
numTriangles:uint  [read-only]

The total amount of triangles in the SubGeometry.


Implementation
    public function get numTriangles():uint
parentGeometryproperty 
parentGeometry:Geometry


Implementation
    public function get parentGeometry():Geometry
    public function set parentGeometry(value:Geometry):void
scaleUproperty 
scaleU:Number  [read-only]

Scales the uv coordinates


Implementation
    public function get scaleU():Number
scaleVproperty 
scaleV:Number  [read-only]


Implementation
    public function get scaleV():Number
useFaceWeightsproperty 
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
UVDataproperty 
UVData:Vector.<Number>  [read-only]


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


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


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


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


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


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


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


Implementation
    public function get vertexOffset():int
vertexStrideproperty 
vertexStride:uint  [read-only]


Implementation
    public function get vertexStride():uint
vertexTangentDataproperty 
vertexTangentData:Vector.<Number>  [read-only]


Implementation
    public function get vertexTangentData():Vector.<Number>
vertexTangentOffsetproperty 
vertexTangentOffset:int  [read-only]


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


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



Method Detail
applyTransformation()method
public function applyTransformation(transform:Matrix3D):void

Parameters

transform:Matrix3D

dispose()method 
public function dispose():void

disposeIndexBuffers()method 
protected function disposeIndexBuffers(buffers:Vector.<IndexBuffer3D>):void

Disposes all buffers in a given vector.

Parameters

buffers:Vector.<IndexBuffer3D> — The vector of buffers to dispose.

disposeVertexBuffers()method 
protected function disposeVertexBuffers(buffers:Vector.<VertexBuffer3D>):void

Disposes all buffers in a given vector.

Parameters

buffers:Vector.<VertexBuffer3D> — The vector of buffers to dispose.

getIndexBuffer()method 
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.
invalidateBounds()method 
protected function invalidateBounds():void

invalidateBuffers()method 
protected function invalidateBuffers(invalid:Vector.<Boolean>):void

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

Parameters

invalid:Vector.<Boolean> — 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(scaleU:Number = 1, scaleV:Number = 1):void

Parameters

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

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

Parameters

target:Vector.<Number>

Returns
Vector.<Number>
updateFaceTangents()method 
protected function updateFaceTangents():void

Updates the tangents for each face.

updateIndexData()method 
public function updateIndexData(indices:Vector.<uint>):void

Updates the face indices of the SubGeometry.

Parameters

indices:Vector.<uint> — The face indices to upload.

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

Updates the vertex normals based on the geometry.

Parameters

target:Vector.<Number>

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

Updates the vertex tangents based on the geometry.

Parameters

target:Vector.<Number>

Returns
Vector.<Number>