Méthode | Description | |
---|---|---|
ConvexShape ( ) : System |
Default constructor
|
|
ConvexShape ( |
Construct the shape from another shape
|
|
ConvexShape ( uint pointCount ) : System |
Construct the shape with an initial point count
|
|
GetPoint ( uint index ) : Vector2f |
Get the position of a point The returned point is in local coordinates, that is, the shape's transforms (position, rotation, scale) are not taken into account. The result is undefined if index is out of the valid range.
|
|
GetPointCount ( ) : uint |
Get the total number of points of the polygon
|
|
SetPoint ( uint index, Vector2f point ) : void |
Set the position of a point. Don't forget that the polygon must remain convex, and the points need to stay ordered! PointCount must be set first in order to set the total number of points. The result is undefined if index is out of the valid range.
|
|
SetPointCount ( uint count ) : void |
Set the number of points of the polygon. The count must be greater than 2 to define a valid shape.
|
public ConvexShape ( |
||
copy | Shape to copy | |
Résultat | System |
public ConvexShape ( uint pointCount ) : System | ||
pointCount | uint | Number of points of the shape |
Résultat | System |
public GetPoint ( uint index ) : Vector2f | ||
index | uint | Index of the point to get, in range [0 .. PointCount - 1] |
Résultat | Vector2f |
public SetPoint ( uint index, Vector2f point ) : void | ||
index | uint | Index of the point to change, in range [0 .. PointCount - 1] |
point | Vector2f | New position of the point |
Résultat | void |
public SetPointCount ( uint count ) : void | ||
count | uint | New number of points of the polygon |
Résultat | void |