artofillusion.animation
Class Joint.DOF

java.lang.Object
  extended by artofillusion.animation.Joint.DOF
Enclosing class:
Joint

public class Joint.DOF
extends java.lang.Object

This is an inner class for storing information about the properties of a particular degree of freedom.


Field Summary
 boolean comfort
           
 boolean fixed
           
 boolean loop
           
 double max
           
 double maxComfort
           
 double min
           
 double minComfort
           
 double pos
           
 double stiffness
           
 
Constructor Summary
Joint.DOF(java.io.DataInputStream in)
          Reconstruct a DOF from its serialized representation.
Joint.DOF(double min, double max, double pos)
           
 
Method Summary
 void copy(Joint.DOF d)
           
 Joint.DOF duplicate()
           
 boolean equals(Joint.DOF d)
          Determine if this DOF is identical to another one.
 double getClippedForce(double f)
          Given a force applied to the degree of freedom, return a new force which is clipped so as not to move it beyond the allowed range.
 double getForceScale(double f)
          Given a force applied to the degree of freedom, return a scale factor based on the stiffness, the direction of the force, and whether it is inside its comfort range.
 double getScaledForce(double f)
          Given a force applied to the degree of freedom, return a new force which is scaled based on the stiffness, the direction of the force, and whether it is inside its comfort range.
 void set(double val)
           
 void writeToStream(java.io.DataOutputStream out)
          Write a serialized representation of this DOF to a stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

min

public double min

max

public double max

minComfort

public double minComfort

maxComfort

public double maxComfort

stiffness

public double stiffness

pos

public double pos

fixed

public boolean fixed

comfort

public boolean comfort

loop

public boolean loop
Constructor Detail

Joint.DOF

public Joint.DOF(double min,
                 double max,
                 double pos)

Joint.DOF

public Joint.DOF(java.io.DataInputStream in)
          throws java.io.IOException
Reconstruct a DOF from its serialized representation.

Throws:
java.io.IOException
Method Detail

duplicate

public Joint.DOF duplicate()

copy

public void copy(Joint.DOF d)

equals

public boolean equals(Joint.DOF d)
Determine if this DOF is identical to another one.


set

public void set(double val)

getScaledForce

public double getScaledForce(double f)
Given a force applied to the degree of freedom, return a new force which is scaled based on the stiffness, the direction of the force, and whether it is inside its comfort range.


getForceScale

public double getForceScale(double f)
Given a force applied to the degree of freedom, return a scale factor based on the stiffness, the direction of the force, and whether it is inside its comfort range.


getClippedForce

public double getClippedForce(double f)
Given a force applied to the degree of freedom, return a new force which is clipped so as not to move it beyond the allowed range.


writeToStream

public void writeToStream(java.io.DataOutputStream out)
                   throws java.io.IOException
Write a serialized representation of this DOF to a stream.

Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.