Packageaway3d.core.base
Classpublic class SubMesh
InheritanceSubMesh Inheritance Object
Implements IRenderable

SubMesh wraps a SubGeometry as a scene graph instantiation. A SubMesh is owned by a Mesh object.

See also

away3d.core.base.SubGeometry
away3d.scenegraph.Mesh


Public Properties
 PropertyDefined By
  animator : IAnimator
[read-only] The animator object that provides the state for the SubMesh's animation.
SubMesh
  bounds : BoundingVolumeBase
[read-only]
SubMesh
  castsShadows : Boolean
[read-only]
SubMesh
  indexData : Vector.<uint>
[read-only]
SubMesh
  inverseSceneTransform : Matrix3D
[read-only] The inverse scene transform object that transforms from world to model space.
SubMesh
  material : MaterialBase
The material used to render the current SubMesh.
SubMesh
  modelViewProjection : Matrix3D
[read-only] The model-view-projection (MVP) matrix used to transform from model to homogeneous projection space.
SubMesh
  mouseEnabled : Boolean
[read-only] Indicates whether the SubMesh should trigger mouse events, and hence should be rendered for hit testing.
SubMesh
  normalBufferOffset : int
[read-only]
SubMesh
  numTriangles : uint
[read-only] The amount of triangles that make up this SubMesh.
SubMesh
  offsetU : Number
SubMesh
  offsetV : Number
SubMesh
  scaleU : Number
SubMesh
  scaleV : Number
SubMesh
  sceneTransform : Matrix3D
[read-only] The scene transform object that transforms from model to world space.
SubMesh
  secondaryUVBufferOffset : int
[read-only]
SubMesh
  shaderPickingDetails : Boolean
[read-only]
SubMesh
  sourceEntity : Entity
[read-only] The entity that that initially provided the IRenderable to the render pipeline (ie: the owning Mesh object).
SubMesh
  subGeometry : SubGeometry
The SubGeometry object which provides the geometry data for this SubMesh.
SubMesh
  tangentBufferOffset : int
[read-only]
SubMesh
  UVBufferOffset : int
[read-only]
SubMesh
  UVData : Vector.<Number>
[read-only]
SubMesh
  uvRotation : Number
SubMesh
  uvTransform : Matrix
[read-only]
SubMesh
  vertexBufferOffset : int
[read-only]
SubMesh
  vertexData : Vector.<Number>
[read-only]
SubMesh
  visible : Boolean
[read-only]
SubMesh
  zIndex : Number
[read-only] The distance of the SubMesh object to the view, used to sort per object.
SubMesh
Public Methods
 MethodDefined By
  
SubMesh(subGeometry:SubGeometry, parentMesh:Mesh, material:MaterialBase = null)
Creates a new SubMesh object
SubMesh
  
dispose():void
SubMesh
  
getCustomBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
SubMesh
  
getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D
Retrieves the VertexBuffer3D object that contains triangle indices.
SubMesh
  
getSecondaryUVBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
SubMesh
  
getUVBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains texture coordinates.
SubMesh
  
getVertexBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex positions.
SubMesh
  
getVertexNormalBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex normals.
SubMesh
  
getVertexTangentBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex tangents.
SubMesh
Property Detail
_indexproperty
arcane var _index:uint

_materialproperty 
arcane var _material:MaterialBase

animatorproperty 
animator:IAnimator  [read-only]

The animator object that provides the state for the SubMesh's animation.


Implementation
    public function get animator():IAnimator
boundsproperty 
bounds:BoundingVolumeBase  [read-only]


Implementation
    public function get bounds():BoundingVolumeBase
castsShadowsproperty 
castsShadows:Boolean  [read-only]


Implementation
    public function get castsShadows():Boolean
indexDataproperty 
indexData:Vector.<uint>  [read-only]


Implementation
    public function get indexData():Vector.<uint>
inverseSceneTransformproperty 
inverseSceneTransform:Matrix3D  [read-only]

The inverse scene transform object that transforms from world to model space.


Implementation
    public function get inverseSceneTransform():Matrix3D
materialproperty 
material:MaterialBase

The material used to render the current SubMesh. If set to null, its parent Mesh's material will be used instead.


Implementation
    public function get material():MaterialBase
    public function set material(value:MaterialBase):void
modelViewProjectionproperty 
modelViewProjection:Matrix3D  [read-only]

The model-view-projection (MVP) matrix used to transform from model to homogeneous projection space.


Implementation
    public function get modelViewProjection():Matrix3D
mouseEnabledproperty 
mouseEnabled:Boolean  [read-only]

Indicates whether the SubMesh should trigger mouse events, and hence should be rendered for hit testing.


Implementation
    public function get mouseEnabled():Boolean
normalBufferOffsetproperty 
normalBufferOffset:int  [read-only]


Implementation
    public function get normalBufferOffset():int
numTrianglesproperty 
numTriangles:uint  [read-only]

The amount of triangles that make up this SubMesh.


Implementation
    public function get numTriangles():uint
offsetUproperty 
offsetU:Number


Implementation
    public function get offsetU():Number
    public function set offsetU(value:Number):void
offsetVproperty 
offsetV:Number


Implementation
    public function get offsetV():Number
    public function set offsetV(value:Number):void
parentMeshproperty 
parentMesh:Mesh


Implementation
    arcane function get parentMesh():Mesh
    arcane function set parentMesh(value:Mesh):void
scaleUproperty 
scaleU:Number


Implementation
    public function get scaleU():Number
    public function set scaleU(value:Number):void
scaleVproperty 
scaleV:Number


Implementation
    public function get scaleV():Number
    public function set scaleV(value:Number):void
sceneTransformproperty 
sceneTransform:Matrix3D  [read-only]

The scene transform object that transforms from model to world space.


Implementation
    public function get sceneTransform():Matrix3D
secondaryUVBufferOffsetproperty 
secondaryUVBufferOffset:int  [read-only]


Implementation
    public function get secondaryUVBufferOffset():int
shaderPickingDetailsproperty 
shaderPickingDetails:Boolean  [read-only]


Implementation
    public function get shaderPickingDetails():Boolean
sourceEntityproperty 
sourceEntity:Entity  [read-only]

The entity that that initially provided the IRenderable to the render pipeline (ie: the owning Mesh object).


Implementation
    public function get sourceEntity():Entity
subGeometryproperty 
subGeometry:SubGeometry

The SubGeometry object which provides the geometry data for this SubMesh.


Implementation
    public function get subGeometry():SubGeometry
    public function set subGeometry(value:SubGeometry):void
tangentBufferOffsetproperty 
tangentBufferOffset:int  [read-only]


Implementation
    public function get tangentBufferOffset():int
UVBufferOffsetproperty 
UVBufferOffset:int  [read-only]


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


Implementation
    public function get UVData():Vector.<Number>
uvRotationproperty 
uvRotation:Number


Implementation
    public function get uvRotation():Number
    public function set uvRotation(value:Number):void
uvTransformproperty 
uvTransform:Matrix  [read-only]


Implementation
    public function get uvTransform():Matrix
vertexBufferOffsetproperty 
vertexBufferOffset:int  [read-only]


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


Implementation
    public function get vertexData():Vector.<Number>
visibleproperty 
visible:Boolean  [read-only]


Implementation
    public function get visible():Boolean
zIndexproperty 
zIndex:Number  [read-only]

The distance of the SubMesh object to the view, used to sort per object.


Implementation
    public function get zIndex():Number
Constructor Detail
SubMesh()Constructor
public function SubMesh(subGeometry:SubGeometry, parentMesh:Mesh, material:MaterialBase = null)

Creates a new SubMesh object

Parameters
subGeometry:SubGeometry — The SubGeometry object which provides the geometry data for this SubMesh.
 
parentMesh:Mesh — The Mesh object to which this SubMesh belongs.
 
material:MaterialBase (default = null) — An optional material used to render this SubMesh.
Method Detail
dispose()method
public function dispose():void

getCustomBuffer()method 
public function getCustomBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D

Parameters

stage3DProxy:Stage3DProxy

Returns
VertexBuffer3D
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.
getSecondaryUVBuffer()method 
public function getSecondaryUVBuffer(stage3DProxy:Stage3DProxy):VertexBuffer3D

Parameters

stage3DProxy:Stage3DProxy

Returns
VertexBuffer3D
getUVBuffer()method 
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.
getVertexBuffer()method 
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.
getVertexNormalBuffer()method 
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.
getVertexTangentBuffer()method 
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.