Tool: Polygon Editor

PreviousNext

Display Modes

There are two possible display modes, which can be changed with a button in the menu.

Vertex Mode []

In vertex mode, single vertices of the objects can be dragged by left clicking on a vertex. Objects cannot be deleted in vertex mode, that can only be done in object mode, also image panes can not be modified in this mode.

Object Mode []

Objects and image panes can be moved in object mode. Image panes can be selected by clicking on the pane - a selection will be marked with a blinking yellow border. If an image pane is selected, its transparency and z-index may be changed. Pressing "t" while selected, will reduce an images transparency by 10% and pressing "r" will increase its transparency again by the same amount. Pressing the "Page Up" or "Page Down" button will result in changing the z-index of the selected image, which determines which image pane will be displayed on top of which. Both objects or image panes may be deleted by pressing the "delete" button on the keyboard. Multiple image panes and objects may be selected by pressing the "control" button while selecting.

Grid []

The grid may be toggled on and off by pressing on the grid button. The unit of the values are pixels.

File Options

Save File []

The current scene may be saved by pressing the save button.

Open File []

Saved file can be loaded later on, or for new scenes.

Export File []

Currently there is only one type of exporting, but writing a new exporting class should be pretty straightforward, similar to EXPORT_TO_EIFFEL_COLLISION_DETECTION.

Import Image []

By pressing the import image pane button, a image is loaded into the scene, which can be moved if in object mode.

Tools

Selection Tool []

This tool is used for selecting and controlling elements of the scene. Depending on which display mode is activated it acts differently. See the Display Mode section for more information.

Circle Creation Tool []

A circle will be created by pressing the left mouse button down and dragging the mouse, to set the radius of the circle.

Rectangle Creation Tool []

Similar to creating a circle, with the rectangle creation tool the mouse has to be dragged from one corner of the intended rectangle to the other one.

Polygon Creation Tool []

Creation starts by left clicking on the scene. After that every click will add a new vertex, until the polygon is closed. Polygons may be closed by either clicking on the first or last vertex - this will be marked by a small square on the cursor.

Polygon Editing Tool []

The polygon editing tool is used to edit existing polygons. In vertex mode, you can add vertices by left clicking on a border line and remove vertices by right clicking on an existing vertex. By left clicking and dragging a vertex, a splitting line may be dragged to another vertex. This splitting line separates the polygon into multiple sub-polygons. For Collision detection these sub-polygons must all be convex. Contour of the polygon will change from red to blue, as soon, as all sub-polygons are convex and the polygon is valid. Please note, that splitting lines may not cross. They may be removed by using the polygon editing tool and left or right clicking on them.

Known Bugs

Sometimes the scene selection is not promoted correctly, which results in tools beeing applied to scenes, that are not currently viewed.