Package | fl.ik |
Class | public class IKJoint |
Inheritance | IKJoint Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
More examples
Related API Elements
Property | Defined By | ||
---|---|---|---|
bone : IKBone [read-only]
The head bone associated with the IKJoint object. | IKJoint | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
DOF_ROTATION : int = 1 [static]
Static constant for the rotation degree of freedom. | IKJoint | ||
DOF_XTRANS : int = 2 [static]
Static constant for the x-translation degree of freedom. | IKJoint | ||
DOF_YTRANS : int = 4 [static]
Static constant for the y-translation degree of freedom. | IKJoint | ||
name : String
The IKJoint instance's name. | IKJoint | ||
numChildren : int [read-only]
Returns the number of IKJoint objects branching from the specified IKJoint. | IKJoint | ||
parent : IKJoint
The parent IKJoint object. | IKJoint | ||
position : Point [read-only]
The IKJoint's coordinates. | IKJoint | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
rotation : Number [read-only]
The current rotation value. | IKJoint | ||
rotationConstrained : Boolean
Returns if the rotation is constrained. | IKJoint | ||
rotationEnabled : Boolean
Specifies if the rotation is enabled. | IKJoint | ||
rotationMax : Number
The maximum rotation value. | IKJoint | ||
rotationMin : Number
The minimum rotation value. | IKJoint | ||
speed : Number
The rotation speed degree of freedom; the xTranslation and
yTranslation properties respect the same speed setting. | IKJoint | ||
springDamping : Number
The spring damping value. | IKJoint | ||
springPosition : Number
The spring position (for translational joints) or angle (for rotational joints). | IKJoint | ||
springStrength : Number
The spring strength value. | IKJoint | ||
xTranslation : Number [read-only]
The current x-translation value. | IKJoint | ||
xTranslationConstrained : Boolean
Returns if the x-translation is constrained. | IKJoint | ||
xTranslationEnabled : Boolean
Specifies if the x-translation is enabled. | IKJoint | ||
xTranslationMax : Number
The maximum x-translation value. | IKJoint | ||
xTranslationMin : Number
The minimum x-translation value. | IKJoint | ||
yTranslation : Number [read-only]
The current y-translation value. | IKJoint | ||
yTranslationConstrained : Boolean
Returns if the y-translation is constrained. | IKJoint | ||
yTranslationEnabled : Boolean
Specifies if the y-translation is enabled. | IKJoint | ||
yTranslationMax : Number
The maximum y-translation value. | IKJoint | ||
yTranslationMin : Number
The minimum y-translation value. | IKJoint |
Method | Defined By | ||
---|---|---|---|
Clears the current spring angle. | IKJoint | ||
Clears the current spring point. | IKJoint | ||
Returns the child IKJoint object at the specified index value. | IKJoint | ||
Returns the index value of the specified IKJoint object. | IKJoint | ||
Retrieves the current value of the specified type of degree of freedom. | IKJoint | ||
Returns the current spring angle. | IKJoint | ||
Returns the current spring point. | IKJoint | ||
Indicates whether an object has a specified property defined. | Object | ||
Returns whether the sub-tree (children) of the joint has physics applied. | IKJoint | ||
Returns whether the current spring angle is set. | IKJoint | ||
Returns whether a spring point is currently set. | IKJoint | ||
Returns if the type of degree of freedom is constrained. | IKJoint | ||
Returns if the specified type of degree of freedom is enabled. | IKJoint | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the constraint of the specified type of degree of freedom. | IKJoint | ||
Enables or disables the specified type of degree of freedom. | IKJoint | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Sets the current spring angle. | IKJoint | ||
Sets the current spring point. | IKJoint | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
bone | property |
DOF_ROTATION | property |
public static var DOF_ROTATION:int = 1
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Static constant for the rotation degree of freedom.
DOF_XTRANS | property |
public static var DOF_XTRANS:int = 2
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Static constant for the x-translation degree of freedom.
DOF_YTRANS | property |
public static var DOF_YTRANS:int = 4
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Static constant for the y-translation degree of freedom.
name | property |
numChildren | property |
numChildren:int
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the number of IKJoint objects branching from the specified IKJoint. This method does not account for sub-branches. Traverse each child branch to traverse the whole IKArmature object.
Implementation
public function get numChildren():int
parent | property |
position | property |
rotation | property |
rotation:Number
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The current rotation value. This value is read-only. The IKMover object udpates this value automatically during an IK movement.
Implementation
public function get rotation():Number
rotationConstrained | property |
rotationEnabled | property |
rotationMax | property |
rotationMin | property |
speed | property |
speed:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The rotation speed degree of freedom; the xTranslation
and
yTranslation
properties respect the same speed setting.
Implementation
public function get speed():Number
public function set speed(value:Number):void
springDamping | property |
springDamping:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The spring damping value. Damping adds spring resistance when used in conjunction
with the strength
property. It affects the rate of decay for the
spring, which is the amount of time between the initial movement and when the bones connected to the
joint return to their rest position. The range is from 0 (no resistance, the default) to 100
(highly damped). A maximum damping value does not negate strength With damping at 100 and strength
at 1, there is still an effect. Because of the rigidity of the joint, it may be difficult to notice,
but there is a physics-based reaction nonetheless.
Implementation
public function get springDamping():Number
public function set springDamping(value:Number):void
Example ( How to use this example )
IKJoint.springStrength
and IKJoint.springDamping
values for each joint of the first armature on the stage. This example comes from Mike Welsh.
import fl.ik.*; var armature:IKArmature = IKManager.getArmatureAt(0); armature.springsEnabled = true; var joint:IKJoint = armature.rootJoint; while(joint) { joint.springStrength = Math.random() * 10; joint.springDamping = Math.random() * 100; if(joint.numChildren > 0)joint = joint.getChildAt(0); else joint = null; }
springPosition | property |
springPosition:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The spring position (for translational joints) or angle (for rotational joints).
Implementation
public function get springPosition():Number
public function set springPosition(value:Number):void
springStrength | property |
springStrength:Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The spring strength value. This is the amount of spring in the joint. The range is from 1-100, with 0 being rigid (the default Flash behavior) and 100 being a very loose spring that is mostly controlled by physics.
Implementation
public function get springStrength():Number
public function set springStrength(value:Number):void
Example ( How to use this example )
IKJoint.springStrength
and IKJoint.springDamping
values for each joint of the first armature on the stage. This example comes from Mike Welsh.
import fl.ik.*; var armature:IKArmature = IKManager.getArmatureAt(0); armature.springsEnabled = true; var joint:IKJoint = armature.rootJoint; while(joint) { joint.springStrength = Math.random() * 10; joint.springDamping = Math.random() * 100; if(joint.numChildren > 0)joint = joint.getChildAt(0); else joint = null; }
xTranslation | property |
xTranslation:Number
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The current x-translation value. This value is read-only. The IKMover object udpates this value automatically during an IK movement.
Implementation
public function get xTranslation():Number
xTranslationConstrained | property |
xTranslationConstrained:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns if the x-translation is constrained.
Implementation
public function get xTranslationConstrained():Boolean
public function set xTranslationConstrained(value:Boolean):void
xTranslationEnabled | property |
xTranslationMax | property |
xTranslationMin | property |
yTranslation | property |
yTranslation:Number
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The current y-translation value. This value is read-only. The IKMover object udpates this value automatically during an IK movement.
Implementation
public function get yTranslation():Number
yTranslationConstrained | property |
yTranslationConstrained:Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns if the y-translation is constrained.
Implementation
public function get yTranslationConstrained():Boolean
public function set yTranslationConstrained(value:Boolean):void
yTranslationEnabled | property |
yTranslationMax | property |
yTranslationMin | property |
clearSpringAngle | () | method |
public function clearSpringAngle():void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Clears the current spring angle.
clearSpringPoint | () | method |
public function clearSpringPoint():void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Clears the current spring point.
getChildAt | () | method |
public function getChildAt(iChild:int):IKJoint
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the child IKJoint object at the specified index value.
Parameters
iChild:int — The zero-based index number of the joint to retrieve.
|
IKJoint — Returns the IKJoint instance at the specified index value.
|
getChildIndex | () | method |
public function getChildIndex(child:IKJoint):int
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the index value of the specified IKJoint object.
Parameters
child:IKJoint — The targeted child joint.
|
int — Returns the zero-based index value of the specified IKJoint object.
|
getJointValue | () | method |
public function getJointValue(dof:int):Number
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Retrieves the current value of the specified type of degree of freedom.
Parameters
dof:int — An integer specifying a type of degree of freedom. This value can be
1 (rotation), 2 (x-translation), or 4 (y-translation).
|
Number |
getSpringAngle | () | method |
getSpringPt | () | method |
hasPhysics | () | method |
hasSpringAngle | () | method |
hasSpringPoint | () | method |
isConstrained | () | method |
public function isConstrained(dof:int):Boolean
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns if the type of degree of freedom is constrained.
Parameters
dof:int — An integer specifying a type of degree of freedom. This value can be
1 (rotation), 2 (x-translation), or 4 (y-translation).
|
Boolean |
isEnabled | () | method |
public function isEnabled(dof:int):*
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns if the specified type of degree of freedom is enabled.
Parameters
dof:int — An integer specifying a type of degree of freedom. This value can be
1 (rotation), 2 (x-translation), or 4 (y-translation).
|
* — A Boolean value indicating whether the specific degree of freedom is
enabled (true ), or not (false ).
|
setConstrained | () | method |
public function setConstrained(dof:int, constrained:Boolean):void
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Sets the constraint of the specified type of degree of freedom.
Parameters
dof:int — An integer specifying a type of degree of freedom. This value can be
1 (rotation), 2 (x-translation), or 4 (y-translation).
| |
constrained:Boolean — Use true to constrain the specified degree of
freedom, otherwise use false .
|
setEnabled | () | method |
public function setEnabled(dof:int, enable:Boolean):*
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Enables or disables the specified type of degree of freedom.
Parameters
dof:int — An integer specifying a type of degree of freedom. This value can be
1 (rotation), 2 (x-translation), or 4 (y-translation).
| |
enable:Boolean — If set to true the specified degree of freedom
is enabled.
|
* |
setSpringAngle | () | method |
setSpringPt | () | method |
Mon Nov 28 2011, 06:48 AM -08:00