Wall

Wall is the space markup shape used to define exterior and interior walls in pedestrian simulation models. To draw some closed areas inside, use Rectangular wall and Circular wall elements.

You can draw a wall of any form. Wall can contain either linear and curved segments.

 To draw a wall

  1. Double-click the  Wall element in the Space Markup section of the  Pedestrian Library palette.
  2. The icon of the element should turn into . It means that the drawing mode is activated and now you can draw wall in the graphical editor point by point.
  3. Click in the graphical editor to put the first point of the wall. Do more clicks to add more points. 
  4. To draw a curved segment, do not release the mouse button while clicking, but move the mouse with the left mouse button pressed. 
  5. Finally put the final point with the double-click.

Properties

General

Name – The name of the wall. The name is used to identify the wall.

Ignore – If selected, the wall is excluded from the model.

Visible on upper level – If selected, the wall is also visible on the upper level where this agent lives.

Lock – If selected, the wall shape is locked. Locked shapes do not react to mouse clicks - it is impossible to select them in the graphical editor until you unlock them.

Visible – Here you specify whether the shape is visible on animation at model runtime, or not. Using the control, choose yes or no

Closed – If selected, the wall is closed, i.e. its begin and end point are connected with extra segment.

Appearance

Color – Shape color. Used as the outline color. If the Fill type is other than No fill, also as the fill color. 

Line width – Wall width.

Fill type – Fill style. Choose from the drop-down list, whether you want No fill, Solid area, or Hatched area

Position and size

Ground – The ground this wall belongs to. 

X – X-coordinate of the wall's start point.

Y – Y-coordinate of the wall's start point.

Z – [Enabled if Show in 3D option is selected] Z-coordinate of the wall, in meters. The value is relative to the Z-coordinate of the wall's ground. 

Z-Height – [Enabled if Show in 3D option is selected] .  

Points

The table located in the Points property section enables users to view and adjust coordinates of wall corners.  

Here you define relative coordinates, not the absolute ones. The first point always has coordinates (0,0) that can not be changed.
Other rows of the table define relative coordinates of the successive points. Coordinates of each point are actually offsets of the corresponding point from the start point along X and Y axes correspondingly.

Advanced

Show in - Here you can choose whether you want the shape to be shown both In 2D and 3D animation, or in 2D only, or in 3D only.

Show name – If selected, the wall's name is displayed on the graphical diagram.

Drawing linear and curved segments

How-To video: Drawing curved walls

 To add a linear segment while drawing a wall

  1. Just make a click.

 To add a curved segment while drawing a wall

  1. Press the left mouse button and do not release it. Move the mouse with the button being pressed. 
  2. Release the left mouse button when you got the segment of the required form.

Functions

You can dynamically modify the wall properties at model runtime using the following API.
Size

Function

Description

double length()

Returns the length of the wall (in pixels) calculated in 3D space.

double getZHeight()

Returns the Z-height of the wall (in pixels).

void setZHeight (double zHeight)

Sets the Z-height of the wall.

Parameter:
zHeight - the new height of the wall (in pixels)

Points

Function

Description

double getNearestPoint(double x, double y, Point out)

Calculates the point in this wall nearest to the given (x, y) point and writes the result to the output Point object. Returns the square of the distance to the point. All calculations are performed in the horizontal XY-projection (i.e. z-coordinates are treated as zeros).

Parameters:
x - the x coordinate of the point.
y
- the y coordinate of the point.
out - the output point to write result to.

double getNearestPoint(double x, double y, double z, Point out)

Calculates the point in this wall nearest to the given (x, y, z) point and writes the result to the output Point object. Returns the square of the distance to the point.

Parameters:
x - the x coordinate of the point.
y
- the y coordinate of the point.
z
- the z coordinate of the point.
out - the output point to write result to.

Segments

Function

Description

int getSegmentCount()

Returns the number of the wall's segments.

MarkupSegment getSegment(int index)

Returns the segment by the provided index.

Parameters:
index
- the segment index, starting from zero up until the number of segments -1.

Visibility

Function

Description

boolean isVisible()

Returns true if the wall is visible; returns false otherwise.

void setVisible(boolean v)

Sets the visibility of the wall.

Parameter: v - visibility. If v is true - the wall is set to be visible, if it is false - not visible.

Сolor / texture

Function

Description

Color getColor()

Returns the color of the wall, or null if the wall has no color or uses a texture (in this case use getTexture() to get the wall's texture).

Texture getTexture()

Returns the texture of the wall or null if the wall has no texture but uses a color (in this case use getColor() to get the wall's color).

void setColor(Color color)

Sets the color of the wall.

Parameter: color - the new color

void setColor(Paint color)

Sets the color (or texture) of the wall.

Parameter: color - the new texture

Appearance

Function

Description

double getLineWidth()

Returns the width of the wall outline. 

void setLineWidth
(double width)

Sets the width of the wall outline; 0 means the thinnest possible outline.

Parameter: width - the new width of the wall outline.

WallFillingType getFillingType()

Returns the filling type of the wall.
Possible values: WallFillingType.WALL_FILL_NONE - No fill
                                WallFillingType.WALL_FILL_SOLID - Solid fill
                                 WallFillingType.WALL_FILL_HATCHED - Hatched area

void setFillingType(WallFillingType fillingType)

Sets the filling type of the wall.
Possible values: WallFillingType.WALL_FILL_NONE - No fill
                                WallFillingType.WALL_FILL_SOLID - Solid fill
                                 WallFillingType.WALL_FILL_HATCHED - Hatched area

Ground

Function

Description

Ground getGround()

Returns the ground where this wall is located, or null if the wall does not belong to any ground.