Namespace for functions that get the centroid (the center) of a PhSimObject.
- Source:
Methods
-
<static> polygon(a)
-
Find Centroid of a polygon
Parameters:
Name Type Description aPolygon Path
- Source:
Returns:
- Type
- Vector
-
<static> rectangle(rectangle)
-
Get centroid of a rectangle
Parameters:
Name Type Description rectanglePhSim.Static.Rectangle - Source:
Returns:
- Type
- Vector
-
<static> shape(o)
-
Get centroid of any shape. If it is a circle or a regPolygon, then
ois returned because the propertiesxandyalready define the centroid of the object.Parameters:
Name Type Description oPhSimObject - Source:
Returns:
- Type
- Vector