public class Body
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
MassReference |
mass
The mass.
|
com.jme3.math.Vector2f |
velocity
The velocity.
|
Constructor and Description |
---|
Body(java.lang.String name,
MassReference mass,
com.jme3.math.Vector2f position,
com.jme3.math.Vector2f velocity)
Instantiates a new body.
|
Modifier and Type | Method and Description |
---|---|
int |
getId()
Gets the id.
|
java.lang.String |
getName()
Gets the name.
|
com.jme3.math.Vector2f |
getPosition()
Gets the position.
|
void |
setActive()
Sets the active.
|
void |
setIgnore()
Sets the ignore.
|
void |
setPosition(float x,
float y)
Sets the position.
|
void |
setPosition(com.jme3.math.Vector2f pos)
Sets the position.
|
void |
setVelocity(com.jme3.math.Vector2f v)
Sets the velocity.
|
boolean |
shouldIgnore()
Should ignore.
|
java.lang.String |
toString() |
public MassReference mass
public com.jme3.math.Vector2f velocity
public Body(java.lang.String name, MassReference mass, com.jme3.math.Vector2f position, com.jme3.math.Vector2f velocity)
name
- the namemass
- the massposition
- the positionvelocity
- the velocitypublic int getId()
public java.lang.String getName()
public com.jme3.math.Vector2f getPosition()
public void setActive()
public void setIgnore()
public void setPosition(float x, float y)
x
- the xy
- the ypublic void setPosition(com.jme3.math.Vector2f pos)
pos
- the new positionpublic void setVelocity(com.jme3.math.Vector2f v)
v
- the new velocitypublic boolean shouldIgnore()
public java.lang.String toString()
toString
in class java.lang.Object