Packageorg.MARS.dynamics.force
Classpublic class Friction
InheritanceFriction Inheritance SimpleForceGenerator
ImplementsIForceGenerator

Applies a frictional force to an element

See also

ISimulatable.addForceGenerator
IForceGenerator


Protected Properties
 PropertyDefined by
  coefficient : Number
coefficient of friction
Friction
 Inherited_force : Vector
force to apply to element(s)
SimpleForceGenerator
Public Methods
 MethodDefined by
  
Friction(coefficient:Number = 0.1)
Creates a new frictional force generator
Friction
  
generate(element:ISimulatable):void
Generates frictional force based on simulatable's velocity and coefficient of friction
Friction
Property detail
coefficientproperty
protected var coefficient:Number

coefficient of friction

Constructor detail
Friction()constructor
public function Friction(coefficient:Number = 0.1)

Creates a new frictional force generator

Parameters
coefficient:Number (default = 0.1) — coefficient of friction
Method detail
generate()method
public override function generate(element:ISimulatable):void

Generates frictional force based on simulatable's velocity and coefficient of friction

Parameters
element:ISimulatable — element to apply a force to