Packageaway3d.core.base
Classpublic class SubMesh
ImplementsIRenderable

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
  animation : AnimationBase
[read-only] The animation object which is used to transform the geometry.
SubMesh
  animationState : AnimationStateBase
[read-only] The AnimationStateBase object that provides the state for the SubMesh's animation.
SubMesh
  castsShadows : Boolean
[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
  mouseDetails : Boolean
[read-only] Indicates whether the SubMesh needs to provide mouse event details, such as position and uv coordinates.
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
  sceneTransform : Matrix3D
[read-only] The scene transform object that transforms from model to world space.
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
  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
  
getIndexBuffer(context:Context3D, contextIndex:uint):IndexBuffer3D
Retrieves the VertexBuffer3D object that contains triangle indices.
SubMesh
  
getUVBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains texture coordinates.
SubMesh
  
getVertexBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex positions.
SubMesh
  
getVertexNormalBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex normals.
SubMesh
  
getVertexTangentBuffer(context:Context3D, contextIndex:uint):VertexBuffer3D
Retrieves the VertexBuffer3D object that contains vertex tangents.
SubMesh
Property detail
animationproperty
animation:AnimationBase  [read-only]

The animation object which is used to transform the geometry.

Implementation
    public function get animation():AnimationBase
animationStateproperty 
animationState:AnimationStateBase  [read-only]

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

Implementation
    public function get animationState():AnimationStateBase
castsShadowsproperty 
castsShadows:Boolean  [read-only]Implementation
    public function get castsShadows():Boolean
_indexproperty 
arcane var _index: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 
arcane var _material:MaterialBase
materialproperty 
material:MaterialBase  [read-write]

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
mouseDetailsproperty 
mouseDetails:Boolean  [read-only]

Indicates whether the SubMesh needs to provide mouse event details, such as position and uv coordinates.

Implementation
    public function get mouseDetails():Boolean
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
parentMeshproperty 
parentMesh:Mesh  [read-write]Implementation
    arcane function get parentMesh():Mesh
    arcane function set parentMesh(value:Mesh):void
sceneTransformproperty 
sceneTransform:Matrix3D  [read-only]

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

Implementation
    public function get sceneTransform():Matrix3D
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  [read-write]

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

Implementation
    public function get subGeometry():SubGeometry
    public function set subGeometry(value:SubGeometry):void
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)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.
Init Parameters
Method detail
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.
Wiki link
Click to go to the wiki page for 'away3d.core.base.SubMesh'

Code examples

Comments