|
||||||||||
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()
|
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
- floatMethod 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 Savable
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
java.io.IOException
public java.lang.Class getClassTag()
getClassTag
in interface Savable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |