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.Shape Class Reference

Abstract Shape representing the generic methods all shapes have More...

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

Public Member Functions

 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?

Public Attributes

SpriteEffects Effects = SpriteEffects.None
 Effects to apply to the shape

Protected Member Functions

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

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

Abstract Shape representing the generic methods all shapes have

Constructor & Destructor Documentation

MuGameFramework.Graphics.Shapes.Shape.Shape ( )

Constructor for the general section of the shape

Member Function Documentation

void MuGameFramework.Graphics.Shapes.Shape.CalculateRectangle ( )
protected

Calculate the size of the containing bounding rectangle

virtual void MuGameFramework.Graphics.Shapes.Shape.Dispose ( bool  disposing)
protectedvirtual

Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan

Parameters
disposingDispose of Managed objects?
void MuGameFramework.Graphics.Shapes.Shape.Dispose ( )

Used to explicitly free all resources currently in use by this object before destruction

Rectangle MuGameFramework.Graphics.Shapes.Shape.GetFullRectangle ( )

Get the fully modified positioned rectangle for this shape. Scale, Rotation and SpriteEffects are applied

Returns
Fully modified positioned rectangle
Vector2 MuGameFramework.Graphics.Shapes.Shape.GetPoint ( uint  index)

Get the position of a point in the shape

Parameters
indexIndex of the point to get
Returns
Position of a point
Rectangle MuGameFramework.Graphics.Shapes.Shape.GetRectangle ( )

Get the simple positioned rectangle for this shape. Neither Scale, Rotation or SpriteEffects are applied

Returns
Simple positioned rectangle for this shape
Rectangle MuGameFramework.Graphics.Shapes.Shape.GetScaledRectangle ( )

Get the simple positioned rectangle for this shape. Scale is applied, but Rotation and SpriteEffects are not

Returns
Simple positioned rectangle w. Scale
void MuGameFramework.Graphics.Shapes.Shape.Initialize ( SFMLShape  shape)
protected

Initialize the general section of the shape

Parameters
shapeShape that has been created
bool MuGameFramework.Graphics.Shapes.Shape.IsDisposed ( )

Is this Shape disposed?

Returns
Is this Shape disposed?

Member Data Documentation

SpriteEffects MuGameFramework.Graphics.Shapes.Shape.Effects = SpriteEffects.None

Effects to apply to the shape

Property Documentation

bool MuGameFramework.Graphics.Shapes.Shape.Disposed
getset

Is this Texture disposed?

Color MuGameFramework.Graphics.Shapes.Shape.FillColor
getset

Color of the body of the shape

Rectangle MuGameFramework.Graphics.Shapes.Shape.FullRectangle
getset

Full rectangle containing the shape

Vector2 MuGameFramework.Graphics.Shapes.Shape.Origin
getset

Origin to draw the shape from

Color MuGameFramework.Graphics.Shapes.Shape.OutlineColor
getset

Color of the outline of the shape

float MuGameFramework.Graphics.Shapes.Shape.OutlineThickness
getset

Thickness of the outline of the shape

int MuGameFramework.Graphics.Shapes.Shape.PointCount
get

Get the number of points contained in the shape

Vector2 MuGameFramework.Graphics.Shapes.Shape.Position
getset

Position of the shape on screen

float MuGameFramework.Graphics.Shapes.Shape.Rotation
getset

Rotation of the shape in degrees

Vector2 MuGameFramework.Graphics.Shapes.Shape.Scale
getset

Scale of the sprite

Rectangle MuGameFramework.Graphics.Shapes.Shape.SourceRectangle
getset

Rectangle of the shape to draw on screen

Texture2D MuGameFramework.Graphics.Shapes.Shape.Texture
getset

Texture to apply to the shape


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