Package | away3d.materials |
Class | public class BitmapMaterialContainer |
Inheritance | BitmapMaterialContainer ![]() ![]() |
Implements | ILayerMaterial, ITriangleMaterial |
Subclasses | Dot3BitmapMaterialCache, EnviroBitmapMaterialCache, PhongBitmapMaterialCache, PhongColorMaterialCache |
CompositeMaterial
.
See also
Property | Defined by | ||
---|---|---|---|
![]() | alpha : Number
Defines an alpha value for the texture bitmap.
| BitmapMaterial | |
![]() | bitmap : BitmapData
Returns the bitmapData object being used as the material texture.
| BitmapMaterial | |
![]() | blendMode : String
Defines a blendMode value for the texture bitmap.
| BitmapMaterial | |
![]() | color : uint
Defines a colored tint for the texture bitmap.
| BitmapMaterial | |
![]() | colorTransform : ColorTransform
Defines a colortransform for the texture bitmap.
| BitmapMaterial | |
![]() | debug : Boolean
Toggles debug mode: textured triangles are drawn with white outlines, precision correction triangles are drawn with blue outlines.
| BitmapMaterial | |
![]() | height : Number
Returns the height of the bitmapData being used as the material texture.
| BitmapMaterial | |
![]() | id : int
Unique identifier
| BitmapMaterial | |
![]() | precision : Number
Corrects distortion caused by the affine transformation (non-perspective) of textures.
| BitmapMaterial | |
![]() | repeat : Boolean
Determines if texture bitmap will tile in uv-space
| BitmapMaterial | |
![]() | showNormals : Boolean
Displays the normals per face in pink lines.
| BitmapMaterial | |
![]() | smooth : Boolean
Determines if texture bitmap is smoothed (bilinearly filtered) when drawn to screen.
| BitmapMaterial | |
transparent : Boolean
Defines whether the caching bitmapData objects are transparent
| BitmapMaterialContainer | ||
![]() | visible : Boolean
Indicates whether the material is visible
| BitmapMaterial | |
![]() | width : Number
Returns the width of the bitmapData being used as the material texture.
| BitmapMaterial |
Property | Defined by | ||
---|---|---|---|
![]() | ini : Init
Instance of the Init object used to hold and parse default property values
specified by the initialiser object in the 3d object constructor.
| BitmapMaterial | |
materials : Array
An array of bitmapmaterial objects to be overlayed sequentially.
| BitmapMaterialContainer |
Method | Defined by | ||
---|---|---|---|
BitmapMaterialContainer
(width:int, height:int, init:Object = null)
Creates a new
BitmapMaterialContainer object. | BitmapMaterialContainer | ||
BitmapMaterialContainer | |||
![]() |
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
| BitmapMaterial | |
![]() |
Clears facematerial value objects when bitmap requires updating
| BitmapMaterial | |
clearMaterials():void
| BitmapMaterialContainer | ||
![]() | BitmapMaterial | ||
![]() |
getPixel32(u:Number, v:Number):uint
Returns the argb value of the bitmapData pixel at the given u v coordinate.
| BitmapMaterial | |
![]() |
Invalidates facematerial value objects when texturemapping requires updating
| BitmapMaterial | |
BitmapMaterialContainer | |||
![]() |
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
| BitmapMaterial | |
![]() |
Sends data from the material coupled with data from the
DrawBillboard primitive to the render session. | BitmapMaterial | |
renderBitmapLayer(tri:DrawTriangle, containerRect:Rectangle, parentFaceMaterialVO:FaceMaterialVO):FaceMaterialVO
Renders a bitmapData surface object for the speficied face.
| BitmapMaterialContainer | ||
![]() |
Renders a material layer for the specified triangle.
| BitmapMaterial | |
![]() |
Sends data from the material coupled with data from the
DrawTriangle primitive to the render session. | BitmapMaterial | |
Creates a new
BitmapMaterialContainer object. | BitmapMaterialContainer |
Method | Defined by | ||
---|---|---|---|
Calculates the mapping matrix required to draw the triangle texture to screen.
| BitmapMaterialContainer | ||
![]() | BitmapMaterial | ||
![]() |
updateColorTransform():void
Updates the colortransform object applied to the texture from the
color and alpha properties. | BitmapMaterial | |
updateRenderBitmap():void
Updates the texture bitmapData with the colortransform determined from the
color and alpha properties. | BitmapMaterialContainer |
materials | property |
protected var materials:Array
An array of bitmapmaterial objects to be overlayed sequentially.
transparent | property |
public var transparent:Boolean
Defines whether the caching bitmapData objects are transparent
BitmapMaterialContainer | () | constructor |
public function BitmapMaterialContainer(width:int, height:int, init:Object = null)
Parameters
width:int — The containing width of the texture, applied to all child materials.
|
|
height:int — The containing height of the texture, applied to all child materials.
|
|
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
materials:Array | |
transparent:Boolean (default = true) |
addMaterial | () | method |
clearMaterials | () | method |
public function clearMaterials():void
getMapping | () | method |
protected override function getMapping(tri:DrawTriangle):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
Parameterstri:DrawTriangle — The data object holding all information about the triangle to be drawn.
|
Matrix — The required matrix object.
|
removeMaterial | () | method |
renderBitmapLayer | () | method |
public override function renderBitmapLayer(tri:DrawTriangle, containerRect:Rectangle, parentFaceMaterialVO:FaceMaterialVO):FaceMaterialVO
Renders a bitmapData surface object for the speficied face.
Parameterstri:DrawTriangle — The face object onto which the rendered sufrace is applied.
|
|
containerRect:Rectangle — The rectangle object defining the bounds of the face in uv-space.
|
|
parentFaceMaterialVO:FaceMaterialVO — The value object of the preceeding surface.
|
FaceMaterialVO |
updateMaterial | () | method |
public override function updateMaterial(source:Object3D, view:View3D):void
Creates a new BitmapMaterialContainer
object.
source:Object3D — The containing width of the texture, applied to all child materials.
|
|
view:View3D — The containing height of the texture, applied to all child materials.
|
updateRenderBitmap | () | method |
protected override function updateRenderBitmap():void
Updates the texture bitmapData with the colortransform determined from the color
and alpha
properties.