Package ea.actor
Class Rectangle
java.lang.Object
ea.actor.Actor
ea.actor.Geometry
ea.actor.Rectangle
- All Implemented Interfaces:
FrameUpdateListenerContainer
,KeyListenerContainer
,MouseClickListenerContainer
,MouseWheelListenerContainer
Beschreibt ein Rechteck.
- Author:
- Michael Andonie, Niklas Keller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
float
float
getWidth()
void
render
(Graphics2D g, float pixelPerMeter) Rendert das Objekt am Ursprung.void
setBorderRadius
(float percent) void
setSize
(float width, float height) Setzt die Höhe und Breite des Rechtecks neu.Methods inherited from class ea.actor.Geometry
animateColor, getColor, setColor
Methods inherited from class ea.actor.Actor
addCollisionListener, addCollisionListener, addCollisionListener, addMountListener, addUnmountListener, animateOpacity, animateParticle, applyForce, applyForce, applyImpulse, applyImpulse, applyTorque, contains, createDistanceJoint, createPrismaticJoint, createRevoluteJoint, createRopeJoint, createWeldJoint, getAngularDamping, getAngularVelocity, getBodyType, getCenter, getCenterRelative, getCollisions, getDensity, getFrameUpdateListeners, getFriction, getGravityScale, getKeyListeners, getLayer, getLayerPosition, getLinearDamping, getMass, getMouseClickListeners, getMouseWheelListeners, getOpacity, getPhysicsHandler, getPosition, getRestitution, getRotation, getVelocity, getX, getY, isGrounded, isMounted, isRotationLocked, isVisible, moveBy, moveBy, overlaps, remove, removeMountListener, removeUnmountListener, renderBasic, resetMovement, rotateBy, setAngularDamping, setAngularVelocity, setBodyType, setCenter, setCenter, setDensity, setFixture, setFixtures, setFixtures, setFriction, setGravityScale, setLayerPosition, setLinearDamping, setOpacity, setPhysicsHandler, setPosition, setPosition, setRestitution, setRotation, setRotationLocked, setVelocity, setVisible, setX, setY
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ea.event.FrameUpdateListenerContainer
addFrameUpdateListener, defer, delay, removeFrameUpdateListener, repeat
Methods inherited from interface ea.event.KeyListenerContainer
addKeyListener, removeKeyListener
Methods inherited from interface ea.event.MouseClickListenerContainer
addMouseClickListener, removeMouseClickListener
Methods inherited from interface ea.event.MouseWheelListenerContainer
addMouseWheelListener, removeMouseWheelListener
-
Constructor Details
-
Rectangle
public Rectangle(float width, float height) Konstruktor.- Parameters:
width
- Die Breite des Rechtecksheight
- Die Höhe des Rechtecks
-
Rectangle
public Rectangle(float width, float height, Supplier<ea.internal.physics.FixtureData> shapeSupplier)
-
-
Method Details
-
getWidth
@API public float getWidth() -
getHeight
@API public float getHeight() -
setSize
@API public void setSize(float width, float height) Setzt die Höhe und Breite des Rechtecks neu. Ändert die physikalischen Eigenschaften (Masse etc.).- Parameters:
width
- Neue Breite für das Rechteck.height
- Neue Höhe für das Rechteck.
-
getBorderRadius
@API public float getBorderRadius() -
setBorderRadius
@API public void setBorderRadius(float percent) -
render
Rendert das Objekt am Ursprung.- Die Position ist (0|0).
- Die Roation ist 0.
-