User Guide

ADOBE ATMOSPHERE 367
User Guide
sphere.windStrength = 3;
sphere.windDirection = Vector( 0.0, 0.0, -1.0 );
sphere.windAction = sphere.solver.createSimpleRigidWindAction(sphere.physicalModel,
sphere.windDirection, sphere.windStrength);
sphere.solver.addAction(sphere.windAction);
removeAnimator(sphere);
}
addAnimator(sphere);
Constraints
BreakableConstraint
A breakable constraint is actually an arbitrator that determines if a given constraint should remain active. The
breakable contraint is created by a method of the “FastConstraintSolver”, and is passed a constraint name and values
for linear and angular strength. If the specifi ed constraint experiences stresses which are beyond the strength values
given, the constraint is abandoned, and the physical models will “break apart”.
Properties
angularStrength
Specifi es the value at which the constraint will fail for angular stresses (such as experienced at a pivot point).
breakableConstraint.angularStrength = 50;
linearStrength
Specifi es the value at which the constraint will fail for linear stresses (similar to tensile strength).
breakableConstraint.linearStrength = 50;
Code Sample
doorLeft = SceneGroup(“./resources/doorLeft.aer”).add();
doorLeft.anchor = theStage.getPrimitive(“doorLeft”);
doorLeft.position = doorLeft.anchor.position;
doorLeft.orientation = doorLeft.anchor.orientation;
doorLeft.pivot = doorLeft.anchor.position; // location of hinge
doorLeft.axis = Vector (0,1,0); // axis of hinge
hingeLeft = SceneGroup(“./resources/hingeLeft.aer”).add();
hingeLeft.anchor = stageModel.getSolidObject(0).rootPrimitive.fi nd(“.../hingeLeft”);
hingeLeft.position = hingeLeft.anchor.position;
hingeLeft.orientation = hingeLeft.anchor.orientation;
loader = new Object();
loader.solver = FastConstraintSolver();