- Source:
Methods
-
<static> chkWidgetType(widget)
-
Check widget type and return the widget type
Parameters:
Name Type Description widgetWidgetOptions - Source:
-
<static> deepClone(o)
-
Deep clone a JavaScript object.
Parameters:
Name Type Description oObject - Source:
-
<static> getCollidingSensorObjects(phSim, dynObject)
-
Get objects colliding some object that share the same sensor classes.
Parameters:
Name Type Description phSimPhSim PhSim instance
dynObjectPhSim.DynObject Object to check for colliding sensor objects
- Source:
Returns:
- Type
- Array.<PhSim.DynObject>
-
<static> getCollisionClasses(dynObject)
-
Get collision classes
Parameters:
Name Type Description dynObjectPhSim.DynObject Dynamic Object
- Source:
Returns:
- Type
- Array.<String>
-
<static> getObjectByName(o, str)
-
Get Object By Name
Parameters:
Name Type Description oSimulation | Layer | Array.<PhSimObject> strstring Name of Object
- Source:
-
<static> getSensorClasses(dynObject)
-
Get senor classes
Parameters:
Name Type Description dynObjectPhSim.DynObject - Source:
Returns:
- Type
- Array.<String>
-
<static> getSpecialRectanglePoints(rectangle)
-
Get the special points of a rectangle
Parameters:
Name Type Description rectangleObject - Source:
-
<static> getStatusStr(dynObject)
-
Get the status string of a PhSim instance.
Parameters:
Name Type Description dynObjectPhSim - Source:
-
<static> intersectionExists(array1, array2)
-
Sees if
array1andarray2share at least one element.Parameters:
Name Type Description array1Array array2Array - Source:
Returns:
- Type
- Boolean
-
<static> isPointInRawRectangle(cx, cy, cw, ch, px, py)
-
Parameters:
Name Type Description cxNumber x-coordinate of upper left corner.
cyNumber y-coordinate of upper left corner.
cwNumber width of rectangle
chNumber height of rectangle
pxNumber x-coordinate of point to be checked.
pyNumber y-coordinate of point to be checked.
- Source:
Returns:
- Type
- Boolean
-
<static> pointInObject(dynObject, x, y)
-
Check if a point (x,y) is in a dynamic object
Parameters:
Name Type Description dynObjectPhSim.DynObject Dynamic Object
xNumber x-coordinate
yNumber y-coordinate
- Source:
Returns:
- Type
- Boolean
-
<static> pointInRectangle(o, x, y)
-
Parameters:
Name Type Description o* x* y* - Source:
-
<static> pointInVerts(a, v)
-
See if point is contained in shape defined by vertices set.
Parameters:
Name Type Description aArray.<Vector> Set of vertices
vVector The vertex to be checked.
- Source:
Returns:
- Returns true if
vis contained in the shape defined byaand false if otherwise.
- Type
- Boolean
-
<static> pointInVertsBorder(a, v, width)
-
See if point is in vertices border
Parameters:
Name Type Description aArray.<Vector> Vertices to check
vVector Point to check.
widthNumber Width of vertices border
- Source:
Returns:
- Returns
trueifvis in the border of the polygon defined byaand false otherwise.
- Type
- Boolean
-
<static> sameSensorClasses(dynObjectA, dynObjectB)
-
Check if two objects share at least one sensor class
Parameters:
Name Type Description dynObjectAPhSim.DynObject dynObjectBPhSim.DynObject - Source:
Returns:
- Type
- Boolean