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
  animationSubGeometry : AnimationSubGeometry
SubMesh
  animator : IAnimator
[read-only] The animator object that provides the state for the SubMesh's animation.
SubMesh
  animatorSubGeometry : AnimationSubGeometry
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
  numTriangles : uint
[read-only] The amount of triangles that make up this SubMesh.
SubMesh
  numVertices : uint
[read-only]
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
  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 : ISubGeometry
The SubGeometry object which provides the geometry data for this SubMesh.
SubMesh
  UVData : Vector.<Number>
[read-only]
SubMesh
  UVOffset : uint
[read-only]
SubMesh
  uvRotation : Number
SubMesh
  UVStride : uint
[read-only]
SubMesh
  uvTransform : Matrix
[read-only]
SubMesh
  vertexData : Vector.<Number>
[read-only]
SubMesh
  vertexNormalData : Vector.<Number>
[read-only]
SubMesh
  vertexNormalOffset : uint
[read-only]
SubMesh
  vertexOffset : uint
[read-only]
SubMesh
  vertexStride : uint
[read-only]
SubMesh
  vertexTangentData : Vector.<Number>
[read-only]
SubMesh
  vertexTangentOffset : uint
[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:ISubGeometry, parentMesh:Mesh, material:MaterialBase = null)
Creates a new SubMesh object
SubMesh
  
activateSecondaryUVBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for a secondary set of UV coordinates
SubMesh
  
activateUVBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for UV coordinates
SubMesh
  
activateVertexBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for vertex positions.
SubMesh
  
activateVertexNormalBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for vertex normals
SubMesh
  
activateVertexTangentBuffer(index:int, stage3DProxy:Stage3DProxy):void
Assigns the attribute stream for vertex tangents
SubMesh
  
dispose():void
SubMesh
  
getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D
Retrieves the IndexBuffer3D object that contains triangle indices.
SubMesh
Property Detail
_indexproperty
arcane var _index:uint

_materialproperty 
arcane var _material:MaterialBase

animationSubGeometryproperty 
public var animationSubGeometry:AnimationSubGeometry

animatorproperty 
animator:IAnimator  [read-only]

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


Implementation
    public function get animator():IAnimator
animatorSubGeometryproperty 
public var animatorSubGeometry:AnimationSubGeometry

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

The amount of triangles that make up this SubMesh.


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


Implementation
    public function get numVertices():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
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:ISubGeometry

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


Implementation
    public function get subGeometry():ISubGeometry
    public function set subGeometry(value:ISubGeometry):void
UVDataproperty 
UVData:Vector.<Number>  [read-only]


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


Implementation
    public function get UVOffset():uint
uvRotationproperty 
uvRotation:Number


Implementation
    public function get uvRotation():Number
    public function set uvRotation(value:Number):void
UVStrideproperty 
UVStride:uint  [read-only]


Implementation
    public function get UVStride():uint
uvTransformproperty 
uvTransform:Matrix  [read-only]


Implementation
    public function get uvTransform():Matrix
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:uint  [read-only]


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


Implementation
    public function get vertexOffset():uint
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:uint  [read-only]


Implementation
    public function get vertexTangentOffset():uint
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:ISubGeometry, parentMesh:Mesh, material:MaterialBase = null)

Creates a new SubMesh object

Parameters
subGeometry:ISubGeometry — 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
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

Assigns the attribute stream for vertex normals

Parameters

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

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

Assigns the attribute stream for vertex tangents

Parameters

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

dispose()method 
public function dispose():void

getIndexBuffer()method 
public function getIndexBuffer(stage3DProxy:Stage3DProxy):IndexBuffer3D

Retrieves the IndexBuffer3D 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.