public class PhysicsPolygon extends AbstractPhysicsObject
AbstractPhysicsObject.
Note: all dimensions and positions are in pixels.f, name| Constructor and Description |
|---|
PhysicsPolygon(String name,
Vector2[] vertices,
boolean dynamic)
Create a physics polygon.
|
PhysicsPolygon(String name,
Vector2[] vertices,
float density,
float restitution,
float friction,
boolean dynamic)
Create a physics polygon.
|
| Modifier and Type | Method and Description |
|---|---|
Polygon |
getPolygon() |
applyBodyAngularImpulse, applyBodyForce, applyBodyForce, applyBodyForceToCenter, applyBodyForceToCenter, applyBodyLinearImpulse, applyBodyLinearImpulse, applyBodyTorque, beginContact, collision, createFixture, destroy, enableCollisionListener, endContact, getBody, getBodyAngle, getBodyAngleDeg, getBodyAngularDamping, getBodyAngularVelocity, getBodyFixtureList, getBodyGravityScale, getBodyInertia, getBodyLinearDamping, getBodyLinearVelocity, getBodyLinearVelocityFromLocalPoint, getBodyLinearVelocityFromWorldPoint, getBodyLinearVelocityPixels, getBodyLocalCenter, getBodyLocalPoint, getBodyLocalVector, getBodyMass, getBodyMassData, getBodyPosition, getBodyRadius, getBodyTransform, getBodyWorld, getBodyWorldCenter, getBodyWorldPoint, getBodyWorldVector, isBodyActive, isBodyAwake, isBodyBullet, isBodyFixedRotation, isBodySleepingAllowed, postSolve, preSolve, setBodyActive, setBodyAngularDamping, setBodyAwake, setBodyLinearDamping, setBodyLinearVelocity, setBodyLinearVelocity, setCollisionGroup, setSensorpublic PhysicsPolygon(String name, Vector2[] vertices, float density, float restitution, float friction, boolean dynamic)
name - An optional name for the object (for debug)vertices - The polygon verticesdensity - The density of the object, in kg/ms2restitution - The restitution factor (energy given back on collision). 1 means all the energy is restored, 0 means no energy is given backfriction - The friction factor (between 0 and 1)public Polygon getPolygon()
Copyright © 2014-2016 gdx2d - https://github.com/hevs-isi/gdx2d