|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.math.Spring
Spring defines a single spring connecting two SpringNodes
in a SpringSystem.
| Field Summary | |
SpringNode |
node1
First node connected by this Spring. |
SpringNode |
node2
Second node connected by this Spring. |
| Constructor Summary | |
Spring(SpringNode node1,
SpringNode node2,
float restLength)
Public constructor. |
|
| Method Summary | |
float |
getRestLength()
Return the rest length of this Spring. |
void |
setRestLength(float restLength)
Set the rest length of this Spring. |
void |
update()
Updates the positions of the nodes connected by this spring based on spring force calculations. |
void |
updateTotalMassFromNodes()
Computes the spring collective mass from the node using inverted masses for stability |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public SpringNode node1
public SpringNode node2
| Constructor Detail |
public Spring(SpringNode node1,
SpringNode node2,
float restLength)
node1 - SpringNodenode2 - SpringNoderestLength - float| Method Detail |
public void setRestLength(float restLength)
restLength - floatpublic float getRestLength()
public void updateTotalMassFromNodes()
public void update()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||