ConvexShape

Specialized shape representing a convex polygon.

Constructors

this
this(uint thePointCount)

Default constructor.

Destructor

~this
~this()

Destructor.

Members

Functions

addPoint
void addPoint(Vector2f point)

Add a point to the polygon.

getPoint
Vector2f getPoint(uint index)

Get the position of a point.

setPoint
void setPoint(uint index, Vector2f point)

Set the position of a point.

Properties

pointCount
uint pointCount [@property setter]
uint pointCount [@property getter]

The number of points on the polygon

Inherited Members

From Shape

__anonymous
mixin NormalTransformable
Undocumented in source.
textureRect
IntRect textureRect [@property setter]
IntRect textureRect [@property getter]

The sub-rectangle of the texture that the shape will display.

fillColor
Color fillColor [@property setter]
Color fillColor [@property getter]

The fill color of the shape.

outlineColor
Color outlineColor [@property setter]
Color outlineColor [@property getter]

The outline color of the shape.

outlineThickness
float outlineThickness [@property setter]
float outlineThickness [@property getter]

The thickness of the shape's outline.

pointCount
uint pointCount [@property getter]

The total number of points in the shape.

getGlobalBounds
FloatRect getGlobalBounds()

Get the global bounding rectangle of the entity.

getLocalBounds
FloatRect getLocalBounds()

Get the local bounding rectangle of the entity.

getPoint
Vector2f getPoint(uint index)

Get a point of the shape.

getTexture
const(Texture) getTexture()

Get the source texture of the shape.

setTexture
void setTexture(const(Texture) texture, bool resetRect)

Change the source texture of the shape.

draw
void draw(RenderTarget renderTarget, RenderStates renderStates)

Draw the shape to a render target.

update
void update()

Recompute the internal geometry of the shape.

Meta