Package pi.actor
Class Grid
java.lang.Object
pi.actor.Actor
pi.actor.Grid
- All Implemented Interfaces:
FrameUpdateListenerRegistration,KeyStrokeListenerRegistration,MouseClickListenerRegistration,MouseScrollListenerRegistration
Beschreibt ein Gitter aus quadratischen Zellen.
- Author:
- Josef Friedrich
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbackground(Color color) Setzt die Hintergrundfarbe.voidsetLineThickness(double lineThickness) Setzt die Dicke der Linien in Pixelmeter.Methods inherited from class pi.actor.Actor
addCollisionListener, addCollisionListener, addCollisionListener, addMountListener, addUnmountListener, anchor, anchor, anchor, anchorformatted, angularDamping, angularDamping, angularVelocity, angularVelocity, animateOpacity, animateParticle, applyForce, applyForce, applyForce, applyImpulse, applyImpulse, applyImpulse, applyRotationImpulse, applyTorque, awake, bodyType, bodyType, center, center, center, centerRelative, collisions, color, color, color, complementaryColor, contains, createDistanceJoint, createPrismaticJoint, createRevoluteJoint, createRopeJoint, createWeldJoint, density, density, fixture, fixtures, fixtures, frameUpdateListeners, friction, friction, gravityScale, gravityScale, hide, isGrounded, isMounted, isRotationLocked, isVisible, keyStrokeListeners, layer, layerPosition, layerPosition, linearDamping, linearDamping, listenerBundle, lockRotation, makeDynamic, makeKinematic, makeParticle, makeSensor, makeStatic, mass, mouseClickListeners, mouseScrollListeners, moveBy, moveBy, opacity, opacity, overlaps, remove, removeMountListener, removeUnmountListener, resetMovement, restitution, restitution, rotateBy, rotation, rotation, rotationLocked, show, sleep, toggleVisible, velocity, velocity, visible, x, x, y, yMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pi.event.FrameUpdateListenerRegistration
addFrameUpdateListener, defer, delay, removeFrameUpdateListener, repeat, repeat, repeat, repeat, repeatMethods inherited from interface pi.event.KeyStrokeListenerRegistration
addKeyStrokeListener, removeKeyStrokeListenerMethods inherited from interface pi.event.MouseClickListenerRegistration
addMouseClickListener, removeMouseClickListenerMethods inherited from interface pi.event.MouseScrollListenerRegistration
addMouseScrollListener, removeMouseScrollListener
-
Constructor Details
-
Grid
public Grid(int cols, int rows, double size) - Parameters:
cols- Die Anzahl der Spalten in x-Richtung.rows- Die Anzahl der Reihen in y-Richtung.size- Die Größe einer Zelle bzw. eines Quadrats in Pixelmeter. Ist beispielsweise die Einheit Pixelmeter auf 60 Pixel und dieses Attribut auf 2 gesetzt, dann werden die vom Gitter eingeschlossenen Quadrate 120 auf 120 Pixel groß.
-
Grid
public Grid(int cols, int rows) Erstellt ein Gitter mit der Zellengröße von einem Pixelmeter.- Parameters:
cols- Die Anzahl der Spalten in x-Richtung.rows- Die Anzahl der Reihen in y-Richtung.
-
-
Method Details
-
setLineThickness
public void setLineThickness(double lineThickness) Setzt die Dicke der Linien in Pixelmeter.- Parameters:
lineThickness- Die Dicke der Linien in Pixelmeter.
-
background
Setzt die Hintergrundfarbe.- Parameters:
color- Die Hintergrundfarbe.
-