Packagecom.fileitup.fisixengine.materials
Classpublic class Material

Holds information about a specific material. To add a material to be used in the simulation, use MaterialFactory.addMaterial()

See also

MaterialFactory.addMaterial()


Public Properties
 PropertyDefined by
  bounce : Number
[read-only]Coefficient of reinstitution.
Material
  color : int
[read-only]Color to be used when rendering an object with this material.
Material
  friction : Number
[read-only]Coefficient of friction.
Material
  traction : Number
[read-only]The traction of wheels to the object.
Material
Public Methods
 MethodDefined by
  
Material(n:String, f:Number, b:Number, t:Number = 1, c:int = -1)
Material
Property detail
bounceproperty
bounce:Number  [read-only]

Coefficient of reinstitution. A number between 0 - 1. 0 represents a clay or rock-like material, and 1 a very bouncy, rubber-like once.

Implementation
    public function get bounce():Number
colorproperty 
color:int  [read-only]

Color to be used when rendering an object with this material.

Implementation
    public function get color():int
frictionproperty 
friction:Number  [read-only]

Coefficient of friction. A number between 0 - 1. 0 represents an icy surface, and 1 a surface with full friction.

Implementation
    public function get friction():Number
tractionproperty 
traction:Number  [read-only]

The traction of wheels to the object. 0 represents no traction and 1 full traction.

Implementation
    public function get traction():Number
Constructor detail
Material()constructor
public function Material(n:String, f:Number, b:Number, t:Number = 1, c:int = -1)

Parameters
n:String — The name of the material (ie. Wood, ice, metal, etc...).
 
f:Number — Coefficient of friction.
 
b:Number — The bounciness of the material.
 
t:Number (default = 1) — The material's traction (affects wheels only).
 
c:int (default = -1) — The color to be used when rendering the objects with this material using render(). Leave at default to use default object colors.