fi.utu.cs.physics
Class Friction

java.lang.Object
  |
  +--fi.utu.cs.physics.Tuple2
        |
        +--fi.utu.cs.physics.Friction
All Implemented Interfaces:
java.lang.Cloneable

public class Friction
extends Tuple2

A pair of static and kinetic friction coefficients.

Since:
1.1

Field Summary
static Friction ZERO
          A friction with a zero static and dynamic coefficients.
 
Constructor Summary
Friction(double s, double k)
          Creates a new friction object with static friction coefficient s and kinetic friction coefficient k.
 
Method Summary
 double getKineticCoefficient()
          Returns the kinetic friction coefficient.
 double getStaticCoefficient()
          Returns the static friction coefficient.
 void set(double s, double k)
          Sets the friction coefficients.
 void set(Friction other)
          Sets the friction coeffients to the same values as in other.
 void setKineticCoefficient(double k)
          Sets the kinetic friction coefficient to the value k.
 void setStaticCoefficient(double s)
          Sets the static friction coefficient to the value s.
 
Methods inherited from class fi.utu.cs.physics.Tuple2
add, add, clone, equals, firstElementSign, getFirstElement, getSecondElement, hashCode, max, min, multiply, negate, negateFirstElement, negateSecondElement, secondElementSign, set, setFirstElement, setSecondElement, swap, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Friction ZERO
A friction with a zero static and dynamic coefficients.

Constructor Detail

Friction

public Friction(double s,
                double k)
Creates a new friction object with static friction coefficient s and kinetic friction coefficient k.

Method Detail

getStaticCoefficient

public double getStaticCoefficient()
Returns the static friction coefficient.


getKineticCoefficient

public double getKineticCoefficient()
Returns the kinetic friction coefficient.


setStaticCoefficient

public void setStaticCoefficient(double s)
Sets the static friction coefficient to the value s.


setKineticCoefficient

public void setKineticCoefficient(double k)
Sets the kinetic friction coefficient to the value k.


set

public void set(double s,
                double k)
Sets the friction coefficients.

Overrides:
set in class Tuple2
Parameters:
s - The static friction coefficient.
k - The kinetic friction coefficient.
See Also:
set(Friction)

set

public void set(Friction other)
Sets the friction coeffients to the same values as in other.