Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
polygon.hpp File Reference

Convex polygon component. More...

Go to the source code of this file.

Classes

class  wze::polygon
 

Namespaces

namespace  wze
 Wizard Engine.
 

Detailed Description

Convex polygon component.

Returns the state of the collision with another polygon.

Returns whether a point is inside the polygon.

Constructs a polygon instance.

Sets whether the y position is affected by the angle.

Returns whether the y position is affected by the angle.

Sets whether the x position is affected by the angle.

Returns whether the x position is affected by the angle.

Sets whether the angle is attached to entities.

Returns whether the angle is attached to entities.

Sets whether the y position is attached to entities.

Returns whether the y position is attached to entities.

Sets whether the x position is attached to entities.

Returns whether the x position is attached to entities.

Sets the angle offset of the polygon.

Returns the angle offset of the polygon.

Sets the y offset of the polygon.

Returns the y offset of the polygon.

Sets the x offset of the polygon.

Returns the x offset of the polygon.

Returns the transformation matrix of the polygon.

Sets the scale of the polygon.

Returns the scale of the polygon.

Sets the angle of the polygon.

Returns the angle of the polygon.

Sets the y position of the polygon.

Returns the y position of the polygon.

Sets the x position of the polygon.

Returns the x position of the polygon.

Returns the radius of the points of the polygon.

Returns the points of the polygon.

Returns the radius of the shape of the polygon.

Returns the shape of the polygon.

Returns the projection of the polygon on a vector.

Returns the circumradius of the shape of the polygon.

Updates the y positions of the points of the polygon.

Updates the x positions of the points of the polygon.

Author
Zana Domán
Zana Domán
Returns
Circumradius of the shape of the polygon.
Author
Zana Domán
Parameters
vectorVector to project on.
Returns
Projection of the polygon on the vector.
Author
Zana Domán
Returns
Shape of the polygon.
Warning
Shape should be convex with at least 3 vertices.
Author
Zana Domán
Returns
Radius of the shape of the polygon.
Author
Zana Domán
Returns
Points of the polygon.
Author
Zana Domán
Returns
Radius of the points of the polygon.
Author
Zana Domán
Returns
X position of the polygon.
Author
Zana Domán
Parameters
xX position of the polygon.
Author
Zana Domán
Returns
Y position of the polygon.
Author
Zana Domán
Parameters
yY position of the polygon.
Author
Zana Domán
Returns
Angle of the polygon.
Author
Zana Domán
Parameters
angleAngle of the polygon.
Author
Zana Domán
Returns
Scale of the polygon.
Author
Zana Domán
Parameters
scaleScale of the polygon.
Author
Zana Domán
Returns
Transformation matrix of the polygon.
Author
Zana Domán
Returns
X offset of the polygon.
Author
Zana Domán
Parameters
x_offsetX offset of the polygon.
Author
Zana Domán
Returns
Y offset of the polygon.
Author
Zana Domán
Parameters
y_offsetY offset of the polygon.
Author
Zana Domán
Returns
Angle offset of the polygon.
Author
Zana Domán
Parameters
angle_offsetAngle offset of the polygon.
Author
Zana Domán
Returns
Whether the x position is attached to entities.
Author
Zana Domán
Parameters
attach_xWhether the x position is attached to entities.
Author
Zana Domán
Returns
Whether the y position is attached to entities.
Author
Zana Domán
Parameters
attach_yWhether the y position is attached to entities.
Author
Zana Domán
Returns
Whether the angle is attached to entities.
Author
Zana Domán
Parameters
attach_angleWhether the angle is attached to entities.
Author
Zana Domán
Returns
Whether the x position is affected by the angle.
Author
Zana Domán
Parameters
x_angle_lockWhether the x position is affected by the angle.
Author
Zana Domán
Returns
Whether the y position is affected by the angle.
Author
Zana Domán
Parameters
y_angle_lockWhether the y position is affected by the angle.
Author
Zana Domán
Parameters
shapeShape of the polygon.
xX position of the polygon.
yY position of the polygon.
angleAngle of the polygon.
scaleScale of the polygon.
x_offsetX offset of the polygon.
y_offsetY offset of the polygon.
angle_offsetAngle offset of the polygon.
attach_xWhether the x position is attached to entities.
attach_yWhether the y position is attached to entities.
attach_angleWhether the angle is attached to entities.
x_angle_lockWhether the x position is affected by the angle.
y_angle_lockWhether the y position is affected by the angle.
Warning
Shape should be convex with at least 3 vertices.
Author
Zana Domán
Parameters
xX position of the point.
yY position of the point.
Returns
Whether the point is inside the polygon.
Author
Zana Domán
Parameters
TBool for simple overlap check, float for advanced depth check.
otherOther polygon instance.
Returns
State of the collision with the other polygon.

Definition in file polygon.hpp.