Commit b90c9ffb authored by Jakob Schöttl's avatar Jakob Schöttl

Implement setters for shape

parent a6fa6ecb
......@@ -44,6 +44,11 @@ public final class AgentWrapper extends ScenarioElement {
public void setAgentInitialStore(final Agent store) {
this.agent = store;
}
@Override
public void setShape(VShape newShape) {
agent.setShape(newShape);
}
@Override
public VShape getShape() {
......
......@@ -19,6 +19,10 @@ public class AttributesObstacle extends Attributes {
this.shape = shape;
}
public void setShape(VShape shape) {
this.shape = shape;
}
public VShape getShape() {
return shape;
}
......
......@@ -123,6 +123,10 @@ public class AttributesSource extends Attributes {
return id;
}
public void setShape(VShape shape) {
this.shape = shape;
}
public VShape getShape() {
return shape;
}
......
......@@ -42,6 +42,10 @@ public class AttributesStairs extends Attributes {
}
}
public void setShape(VShape shape) {
this.shape = shape;
}
public VShape getShape() {
return shape;
}
......
......@@ -99,6 +99,10 @@ public class AttributesTarget extends Attributes {
return id;
}
public void setShape(VShape shape) {
this.shape = shape;
}
public VShape getShape() {
return shape;
}
......
......@@ -98,6 +98,11 @@ public abstract class Agent extends DynamicElement {
public VPoint getPosition() {
return position;
}
@Override
public void setShape(VShape newShape) {
position = newShape.getCentroid();
}
@Override
public VShape getShape() {
......
......@@ -15,6 +15,11 @@ public class Obstacle extends ScenarioElement {
this.attributes = attributes;
}
@Override
public void setShape(VShape newShape) {
attributes.setShape(newShape);
}
@Override
public VShape getShape() {
......
......@@ -12,6 +12,11 @@ public class Source extends ScenarioElement {
this.attributes = attributes;
}
@Override
public void setShape(VShape newShape) {
attributes.setShape(newShape);
}
@Override
public VShape getShape() {
return attributes.getShape();
......
......@@ -64,6 +64,11 @@ public class Stairs extends ScenarioElement {
return treadsResult;
}
@Override
public void setShape(VShape newShape) {
attributes.setShape(newShape);
}
@Override
public VShape getShape() {
return attributes.getShape();
......
......@@ -63,6 +63,11 @@ public class Target extends ScenarioElement implements Comparable<Target> {
return attributes.getId();
}
@Override
public void setShape(VShape newShape) {
attributes.setShape(newShape);
}
@Override
public VShape getShape() {
return attributes.getShape();
......
......@@ -14,6 +14,11 @@ public class TargetPedestrian extends Target implements DynamicElementRemoveList
this.isDeleted = false;
}
@Override
public void setShape(VShape newShape) {
pedestrian.setShape(newShape);
}
@Override
public VShape getShape() {
return pedestrian.getShape();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment