volatileprototypes.fvlib
Class Link

java.lang.Object
  extended by volatileprototypes.fvlib.Link

public class Link
extends java.lang.Object

Since:
0.2

Field Summary
 float C
           
 float L
           
 Point p1
           
 Point p2
           
 float S
           
 
Constructor Summary
Link(Point p1in, Point p2in, float st)
          Constructor.
 
Method Summary
 processing.core.PVector get()
          Get a PVector of the current coordinates.
 float getC()
          Get the rest length.
 float getL()
          Get the current (cached) length value.
 float getL(boolean update)
          Get the current (cached) length value.
 Point getP1()
          Get the bias value.
 Point getP2()
          Get the bias value.
 Link setC(float cin)
          Set the rest length to the specified value.
 Link setP1(Point p1in)
          Sets the 1st point.
 Link setP2(Point p2in)
          Sets the 2nd point.
 Link updateL()
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p1

public Point p1

p2

public Point p2

L

public float L

C

public float C

S

public float S
Constructor Detail

Link

public Link(Point p1in,
            Point p2in,
            float st)
Constructor. Constructor, generates a new class instance using point references and stiffness.

Parameters:
p1in - A Point object indicating the 1st point.
p2in - A Point object indicating the 2nd point.
st - A float value indicating stiffness.
Method Detail

setC

public final Link setC(float cin)
Set the rest length to the specified value.

Parameters:
cin - The new rest length value.
Returns:
The current object.

getC

public final float getC()
Get the rest length.

Returns:
The rest length.

getL

public final float getL()
Get the current (cached) length value.

Returns:
The current (cached) length value.

getL

public final float getL(boolean update)
Get the current (cached) length value.

Parameters:
update - Whether to update the cached length value.
Returns:
The current (cached) length value.

updateL

@Deprecated
public final Link updateL()
Deprecated. 


setP1

public final Link setP1(Point p1in)
Sets the 1st point.

Parameters:
p1in - The 1st point.

setP2

public final Link setP2(Point p2in)
Sets the 2nd point.

Parameters:
p2in - The 2nd point.

getP1

public final Point getP1()
Get the bias value.

Returns:
The current bias value.

getP2

public final Point getP2()
Get the bias value.

Returns:
The current bias value.

get

public final processing.core.PVector get()
Get a PVector of the current coordinates.

Returns:
The PVector of the current coordinates.