Class: PolygonMarker

ROS2D. PolygonMarker

new PolygonMarker(options)

A polygon that can be edited by an end user
Parameters:
Name Type Description
options object with following keys: * pose (optional) - the first pose of the trace * lineSize (optional) - the width of the lines * lineColor (optional) - the createjs color of the lines * pointSize (optional) - the size of the points * pointColor (optional) - the createjs color of the points * fillColor (optional) - the createjs color to fill the polygon * lineCallBack (optional) - callback function for mouse interaction with a line * pointCallBack (optional) - callback function for mouse interaction with a point
Source:

Methods

addPoint(position)

Adds a point to the polygon
Parameters:
Name Type Description
position of type ROSLIB.Vector3
Source:

createLineShape()

Internal use only
Source:

createPointShape()

Internal use only
Source:

drawFill()

Internal use only
Source:

editLineShape()

Internal use only
Source:

movePoint(obj, position)

Moves a point of the polygon
Parameters:
Name Type Description
obj either an index (integer) or a point shape of the polygon
position of type ROSLIB.Vector3
Source:

remPoint(obj)

Removes a point from the polygon
Parameters:
Name Type Description
obj either an index (integer) or a point shape of the polygon
Source:

splitLine(obj)

Splits a line of the polygon: inserts a point at the center of the line
Parameters:
Name Type Description
obj either an index (integer) or a line shape of the polygon
Source: