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,
IItem representation,
MassReference mass,
com.jme3.math.Vector2f position,
com.jme3.math.Vector2f velocity)
Instantiates a new body.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Gets the name.
|
com.jme3.math.Vector2f |
getPosition()
Gets the position.
|
IItem |
getRepresentation()
Gets the representation.
|
void |
setPosition(float x,
float y)
Sets the position.
|
void |
setPosition(com.jme3.math.Vector2f pos)
Sets the position.
|
java.lang.String |
toString() |
public MassReference mass
public com.jme3.math.Vector2f velocity
public Body(java.lang.String name, IItem representation, MassReference mass, com.jme3.math.Vector2f position, com.jme3.math.Vector2f velocity)
name
- the namerepresentation
- the representationmass
- the massposition
- the positionvelocity
- the velocitypublic java.lang.String getName()
public com.jme3.math.Vector2f getPosition()
public IItem getRepresentation()
public void setPosition(float x, float y)
x
- the xy
- the ypublic void setPosition(com.jme3.math.Vector2f pos)
pos
- the new positionpublic java.lang.String toString()
toString
in class java.lang.Object