C# Class SFML.Graphics.ConvexShape

Specialized shape representing a convex polygon
Inheritance: Shape
Afficher le fichier Open project: SFML/SFML.Net Class Usage Examples

Méthodes publiques

Méthode Description
ConvexShape ( ) : System

Default constructor

ConvexShape ( ConvexShape copy ) : System

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.

Method Details

ConvexShape() public méthode

Default constructor
public ConvexShape ( ) : System
Résultat System

ConvexShape() public méthode

Construct the shape from another shape
public ConvexShape ( ConvexShape copy ) : System
copy ConvexShape Shape to copy
Résultat System

ConvexShape() public méthode

Construct the shape with an initial point count
public ConvexShape ( uint pointCount ) : System
pointCount uint Number of points of the shape
Résultat System

GetPoint() public méthode

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.
public GetPoint ( uint index ) : Vector2f
index uint Index of the point to get, in range [0 .. PointCount - 1]
Résultat Vector2f

GetPointCount() public méthode

Get the total number of points of the polygon
public GetPointCount ( ) : uint
Résultat uint

SetPoint() public méthode

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.
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

SetPointCount() public méthode

Set the number of points of the polygon. The count must be greater than 2 to define a valid shape.
public SetPointCount ( uint count ) : void
count uint New number of points of the polygon
Résultat void