Determines the physical nature of a shape and how it is simulated and how it responds to forces. TODO elaborate
Enum Values | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ShapeMotion | DYNAMIC | Dynamic shapes are fully simulated in the physics simulation. | |||||||||
ShapeMotion | KINEMATIC | Kinematic shapes move under the physics simulation according to their velocity but do not respond to forces. |
|||||||||
ShapeMotion | STATIC | Static shapes do not move under the physics simulation, behave as if they have infinite mass, and have zero velocity. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static
ShapeMotion
|
fromB2BodyType(BodyType type)
This method is for internal and advanced use only.
| ||||||||||
BodyType
|
getB2BodyType()
This method is for internal and advanced use only.
| ||||||||||
static
ShapeMotion
|
valueOf(String name)
| ||||||||||
final
static
ShapeMotion[]
|
values()
|
Methods inherited from
class
java.lang.Enum
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final
Object
|
clone()
| ||||||||||
int
|
compareTo(Object arg0)
| ||||||||||
final
int
|
compareTo(E arg0)
| ||||||||||
final
boolean
|
equals(Object arg0)
| ||||||||||
final
void
|
finalize()
| ||||||||||
final
Class<E>
|
getDeclaringClass()
| ||||||||||
final
int
|
hashCode()
| ||||||||||
final
String
|
name()
| ||||||||||
final
int
|
ordinal()
| ||||||||||
String
|
toString()
| ||||||||||
static
<T extends Enum<T>>
T
|
valueOf(Class<T> arg0, String arg1)
|
Methods inherited from
class
java.lang.Object
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Object
|
clone()
| ||||||||||
boolean
|
equals(Object arg0)
| ||||||||||
void
|
finalize()
| ||||||||||
final
Class<?>
|
getClass()
| ||||||||||
int
|
hashCode()
| ||||||||||
final
void
|
notify()
| ||||||||||
final
void
|
notifyAll()
| ||||||||||
String
|
toString()
| ||||||||||
final
void
|
wait()
| ||||||||||
final
void
|
wait(long arg0, int arg1)
| ||||||||||
final
void
|
wait(long arg0)
|
Methods inherited from
interface
java.lang.Comparable
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract
int
|
compareTo(T arg0)
|
Dynamic shapes are fully simulated in the physics simulation. They have non-zero mass, move according to forces, and can collide with all other shape types (static, dynamic, and kinematic).
Kinematic shapes move under the physics simulation according to their velocity but do not respond to forces. They behave as if they have infinite mass. Kinematic shapes do not collide with static shapes or other kinematic shapes, but they can be involved in collisions with dynamic shapes.
An example of a kinematic shape in a game would be a moving platform that slides back and forth in a predetermined way.
Static shapes do not move under the physics simulation, behave as if they have infinite mass, and have zero velocity. Static shapes also do not collide with other static or kinematic shapes, but they can be involved in collisions with dynamic shapes.
In a game, for example, static shapes are best used to represent things like the ground, walls, and other immovable, impenetrable obstacles.
This is the default motion type for newly created shapes.
This method is for internal and advanced use only.
Gets the value that corresponds to the specified JBox2D
BodyType
.
BodyType
the value corresponding to the specified JBox2D
BodyType
This method is for internal and advanced use only.
Gets the JBox2D BodyType
that this value represents.
the JBox2D {code BodyType} that this value represents