|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.util.force.Spring
public class Spring
Represents a spring in a force simulation.
| Nested Class Summary | |
|---|---|
static class |
Spring.SpringFactory
The SpringFactory is responsible for generating Spring instances and maintaining an object pool of Springs to reduce garbage collection overheads while force simulations are running. |
| Field Summary | |
|---|---|
float |
coeff
The spring tension co-efficient |
ForceItem |
item1
The first ForceItem endpoint |
ForceItem |
item2
The second ForceItem endpoint |
float |
length
The spring's resting length |
| Constructor Summary | |
|---|---|
Spring(ForceItem fi1,
ForceItem fi2,
float k,
float len)
Create a new Spring instance |
|
| Method Summary | |
|---|---|
static Spring.SpringFactory |
getFactory()
Retrieve the SpringFactory instance, which serves as an object pool for Spring instances. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ForceItem item1
public ForceItem item2
public float length
public float coeff
| Constructor Detail |
|---|
public Spring(ForceItem fi1,
ForceItem fi2,
float k,
float len)
fi1 - the first ForceItem endpointfi2 - the second ForceItem endpointk - the spring tension co-efficientlen - the spring's resting length| Method Detail |
|---|
public static Spring.SpringFactory getFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||