Package | com.as3dmod |
Class | public class ModifierStack |
The Modifier Stack is the base of AS3Dmod. It hold a reference to the mesh being modified and an array of modifiers.
Author: Bartek Drozdz
Version: 0.1
Property | Defined by | ||
---|---|---|---|
meshInfo : IMeshInfo
[read-only]
Gives access to information about the modified mesh.
| ModifierStack |
Method | Defined by | ||
---|---|---|---|
ModifierStack(lib3d:Library3d, mesh:*)
| ModifierStack | ||
addModifier(mod:IModifier):void
The mesh that this stack is operating on.
| ModifierStack | ||
apply():void
Applies all the modifiers in the stack to the mesh.
| ModifierStack | ||
clear():void
Clears the stack.
| ModifierStack | ||
collapse():void
Collapses the stack.
| ModifierStack |
meshInfo | property |
meshInfo:IMeshInfo
[read-only]Gives access to information about the modified mesh.
Implementation public function get meshInfo():IMeshInfo
See also
ModifierStack | () | constructor |
public function ModifierStack(lib3d:Library3d, mesh:*)
Parameters
lib3d:Library3d — A instance of a class implementing com.as3dmod.plugins.Library3d for the specific engine
|
|
mesh:* — A mesh. The type of the mesh will be depending on the library used.
Example: for PV3D it should be an instance of com.as3dmod.plugins.pv3d.Pv3dMesh or of one of its subclasses.
|
addModifier | () | method |
public function addModifier(mod:IModifier):void
The mesh that this stack is operating on.
Parametersmod:IModifier |
See also
apply | () | method |
public function apply():void
Applies all the modifiers in the stack to the mesh.
Each time apply()
is invoked, all the changes to the mesh geometry made by a former
call to this method are cleared and the modifiers are applied again to the original mesh or the
mesh resulting from the last call of the collapse()
method.
See also
clear | () | method |
public function clear():void
Clears the stack. Removes all the elements from the stack.
collapse | () | method |
public function collapse():void
Collapses the stack. Collapsing means that all the modifiers are applied and then removed from the stack. The geometry of the mesh is thus modified permanently, and there is now way to get back to it's original shape.