C# Класс SFML.Graphics.ConvexShape

Specialized shape representing a convex polygon
Наследование: Shape
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

ConvexShape() публичный Метод

Default constructor
public ConvexShape ( ) : System
Результат System

ConvexShape() публичный Метод

Construct the shape from another shape
public ConvexShape ( ConvexShape copy ) : System
copy ConvexShape Shape to copy
Результат System

ConvexShape() публичный Метод

Construct the shape with an initial point count
public ConvexShape ( uint pointCount ) : System
pointCount uint Number of points of the shape
Результат System

GetPoint() публичный Метод

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]
Результат Vector2f

GetPointCount() публичный Метод

Get the total number of points of the polygon
public GetPointCount ( ) : uint
Результат uint

SetPoint() публичный Метод

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
Результат void

SetPointCount() публичный Метод

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
Результат void