MuGameFramework  1.0
MuGameFramework is a 2D game framework built upon C# and SFML
 All Classes Namespaces Files Functions Variables Enumerations Properties
MuGameFramework.Graphics.Shapes.PolygonShape Class Reference

Create a visual Shape of many sides to show on screen More...

Inheritance diagram for MuGameFramework.Graphics.Shapes.PolygonShape:
MuGameFramework.Graphics.Shapes.Shape

Public Member Functions

 PolygonShape (Vector2[] pointArray)
 Initialize an instance of a drawable Polygon Shape
void Reinitialize (Vector2[] pointArray)
 ReInitialize this shape as another shape
void ChangePoint (uint index, Vector2 point)
 Change the relative position of a point in the shape
- Public Member Functions inherited from MuGameFramework.Graphics.Shapes.Shape
 Shape ()
 Constructor for the general section of the shape
Rectangle GetRectangle ()
 Get the simple positioned rectangle for this shape. Neither Scale, Rotation or SpriteEffects are applied
Rectangle GetScaledRectangle ()
 Get the simple positioned rectangle for this shape. Scale is applied, but Rotation and SpriteEffects are not
Rectangle GetFullRectangle ()
 Get the fully modified positioned rectangle for this shape. Scale, Rotation and SpriteEffects are applied
Vector2 GetPoint (uint index)
 Get the position of a point in the shape
void Dispose ()
 Used to explicitly free all resources currently in use by this object before destruction
bool IsDisposed ()
 Is this Shape disposed?

Additional Inherited Members

- Public Attributes inherited from MuGameFramework.Graphics.Shapes.Shape
SpriteEffects Effects = SpriteEffects.None
 Effects to apply to the shape
- Protected Member Functions inherited from MuGameFramework.Graphics.Shapes.Shape
void Initialize (SFMLShape shape)
 Initialize the general section of the shape
void CalculateRectangle ()
 Calculate the size of the containing bounding rectangle
virtual void Dispose (bool disposing)
 Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan
- Properties inherited from MuGameFramework.Graphics.Shapes.Shape
Vector2 Position [get, set]
 Position of the shape on screen
Vector2 Origin [get, set]
 Origin to draw the shape from
Color FillColor [get, set]
 Color of the body of the shape
Color OutlineColor [get, set]
 Color of the outline of the shape
float OutlineThickness [get, set]
 Thickness of the outline of the shape
float Rotation [get, set]
 Rotation of the shape in degrees
Vector2 Scale [get, set]
 Scale of the sprite
Texture2D Texture [get, set]
 Texture to apply to the shape
Rectangle SourceRectangle [get, set]
 Rectangle of the shape to draw on screen
int PointCount [get]
 Get the number of points contained in the shape
Rectangle FullRectangle [get, set]
 Full rectangle containing the shape
bool Disposed [get, set]
 Is this Texture disposed?

Detailed Description

Create a visual Shape of many sides to show on screen

Constructor & Destructor Documentation

MuGameFramework.Graphics.Shapes.PolygonShape.PolygonShape ( Vector2[]  pointArray)

Initialize an instance of a drawable Polygon Shape

Parameters
pointArrayArray of relative points that make up the PolygonShape

Member Function Documentation

void MuGameFramework.Graphics.Shapes.PolygonShape.ChangePoint ( uint  index,
Vector2  point 
)

Change the relative position of a point in the shape

Parameters
indexIndex of point to change
pointNew position of thus point
void MuGameFramework.Graphics.Shapes.PolygonShape.Reinitialize ( Vector2[]  pointArray)

ReInitialize this shape as another shape

Parameters
pointArrayArray of relative points that make up the PolygonShape

The documentation for this class was generated from the following file: