-
- All Implemented Interfaces:
-
de.chaffic.geometry.bodies.TranslatableBody
public interface PhysicalBodyInterface implements TranslatableBody
-
-
Method Summary
Modifier and Type Method Description abstract Unit
applyForce(Vec2 force, Vec2 contactPoint)
Applies force ot body. abstract Unit
applyForce(Vec2 force)
Apply force to the center of mass. abstract Unit
applyLinearImpulse(Vec2 impulse, Vec2 contactPoint)
Applies impulse to a point relative to the body's center of mass. abstract Unit
applyLinearImpulse(Vec2 impulse)
Applies impulse to body's center of mass. abstract Unit
setStatic()
Sets all mass and inertia variables to zero. abstract Vec2
getVelocity()
abstract Unit
setVelocity(Vec2 velocity)
abstract Vec2
getForce()
abstract Unit
setForce(Vec2 force)
abstract Double
getAngularVelocity()
abstract Unit
setAngularVelocity(Double angularVelocity)
abstract Double
getTorque()
abstract Unit
setTorque(Double torque)
abstract Double
getRestitution()
abstract Unit
setRestitution(Double restitution)
abstract Double
getDensity()
abstract Unit
setDensity(Double density)
abstract Double
getMass()
abstract Unit
setMass(Double mass)
abstract Double
getInvMass()
abstract Unit
setInvMass(Double invMass)
abstract Double
getInertia()
abstract Unit
setInertia(Double inertia)
abstract Double
getInvInertia()
abstract Unit
setInvInertia(Double invInertia)
abstract Double
getAngularDampening()
abstract Unit
setAngularDampening(Double angularDampening)
abstract Double
getLinearDampening()
abstract Unit
setLinearDampening(Double linearDampening)
abstract Boolean
getAffectedByGravity()
abstract Unit
setAffectedByGravity(Boolean affectedByGravity)
abstract Boolean
getParticle()
abstract Unit
setParticle(Boolean particle)
abstract Vec2
getPosition()
abstract Unit
setPosition(Vec2 position)
-
-
Method Detail
-
applyForce
abstract Unit applyForce(Vec2 force, Vec2 contactPoint)
Applies force ot body.
- Parameters:
force
- Force vector to apply.contactPoint
- The point to apply the force to relative to the body in object space.
-
applyForce
abstract Unit applyForce(Vec2 force)
Apply force to the center of mass.
- Parameters:
force
- Force vector to apply.
-
applyLinearImpulse
abstract Unit applyLinearImpulse(Vec2 impulse, Vec2 contactPoint)
Applies impulse to a point relative to the body's center of mass.
- Parameters:
impulse
- Magnitude of impulse vector.contactPoint
- The point to apply the force to relative to the body in object space.
-
applyLinearImpulse
abstract Unit applyLinearImpulse(Vec2 impulse)
Applies impulse to body's center of mass.
- Parameters:
impulse
- Magnitude of impulse vector.
-
setStatic
abstract Unit setStatic()
Sets all mass and inertia variables to zero. Object cannot be moved.
-
getVelocity
abstract Vec2 getVelocity()
-
setVelocity
abstract Unit setVelocity(Vec2 velocity)
-
getAngularVelocity
abstract Double getAngularVelocity()
-
setAngularVelocity
abstract Unit setAngularVelocity(Double angularVelocity)
-
getRestitution
abstract Double getRestitution()
-
setRestitution
abstract Unit setRestitution(Double restitution)
-
getDensity
abstract Double getDensity()
-
setDensity
abstract Unit setDensity(Double density)
-
getInvMass
abstract Double getInvMass()
-
setInvMass
abstract Unit setInvMass(Double invMass)
-
getInertia
abstract Double getInertia()
-
setInertia
abstract Unit setInertia(Double inertia)
-
getInvInertia
abstract Double getInvInertia()
-
setInvInertia
abstract Unit setInvInertia(Double invInertia)
-
getAngularDampening
abstract Double getAngularDampening()
-
setAngularDampening
abstract Unit setAngularDampening(Double angularDampening)
-
getLinearDampening
abstract Double getLinearDampening()
-
setLinearDampening
abstract Unit setLinearDampening(Double linearDampening)
-
getAffectedByGravity
abstract Boolean getAffectedByGravity()
-
setAffectedByGravity
abstract Unit setAffectedByGravity(Boolean affectedByGravity)
-
getParticle
abstract Boolean getParticle()
-
setParticle
abstract Unit setParticle(Boolean particle)
-
getPosition
abstract Vec2 getPosition()
-
setPosition
abstract Unit setPosition(Vec2 position)
-
-
-
-