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

Object representing a region of 2D space to show on screen More...

Public Member Functions

 CameraView (Vector2 size)
 Create a new CameraView of as apecific size
void Move (Vector2 relativeOffset)
 Move the CameraView by a relative vector
float GetZoom ()
 Get the current Zoom level
void SetZoom (float zoom)
 Set the zoom level
Vector2 ConvertCoords (Vector2 position)
 Convert screen coordinates (such as mouse position) to View positions
void Dispose ()
 Used to explicitly free all resources currently in use by this object before destruction

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose any and all objects, either managed or unmanaged at the end of this objects lifespan

Properties

Vector2 Center [get, set]
 Position of the center of the View
Vector2 Size [get, set]
 Size of the view
float Rotation [get, set]
 Rotation of the view in degrees

Detailed Description

Object representing a region of 2D space to show on screen

Constructor & Destructor Documentation

MuGameFramework.CameraView.CameraView ( Vector2  size)

Create a new CameraView of as apecific size

Parameters
sizeSize of the CameraView

Member Function Documentation

Vector2 MuGameFramework.CameraView.ConvertCoords ( Vector2  position)

Convert screen coordinates (such as mouse position) to View positions

Parameters
positionScreen position
Returns
View position
virtual void MuGameFramework.CameraView.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.CameraView.Dispose ( )

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

float MuGameFramework.CameraView.GetZoom ( )

Get the current Zoom level

Returns
The current zoom level
void MuGameFramework.CameraView.Move ( Vector2  relativeOffset)

Move the CameraView by a relative vector

Parameters
relativeOffsetAmount to move
void MuGameFramework.CameraView.SetZoom ( float  zoom)

Set the zoom level

Parameters
zoomNew level of zoom

Property Documentation

Vector2 MuGameFramework.CameraView.Center
getset

Position of the center of the View

float MuGameFramework.CameraView.Rotation
getset

Rotation of the view in degrees

Vector2 MuGameFramework.CameraView.Size
getset

Size of the view


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