|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.math.spring.Spring
public class Spring
Spring defines a single spring connecting two SpringNodes
in a SpringSystem.
| Field Summary | |
|---|---|
SpringPoint |
node1
First node connected by this Spring. |
SpringPoint |
node2
Second node connected by this Spring. |
| Constructor Summary | |
|---|---|
Spring(SpringPoint node1,
SpringPoint node2,
float restLength)
Public constructor. |
|
| Method Summary | |
|---|---|
java.lang.Class |
getClassTag()
The peristed type for the object. |
float |
getRestLength()
Return the rest length of this Spring. |
void |
read(JMEImporter e)
|
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 |
void |
write(JMEExporter e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public SpringPoint node1
public SpringPoint node2
| Constructor Detail |
|---|
public Spring(SpringPoint node1,
SpringPoint node2,
float restLength)
node1 - SpringNodenode2 - SpringNoderestLength - float| Method Detail |
|---|
public void setRestLength(float restLength)
restLength - floatpublic float getRestLength()
public void updateTotalMassFromNodes()
public void update()
public void write(JMEExporter e)
throws java.io.IOException
write in interface Savablejava.io.IOException
public void read(JMEImporter e)
throws java.io.IOException
read in interface Savablejava.io.IOExceptionpublic java.lang.Class getClassTag()
Savable
getClassTag in interface Savable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||