1 2 3 4 5 6 7 8 9 | public Matrix get_transformation()
{
_transform =
Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *
Matrix.CreateRotationZ(Rotation) *
Matrix.CreateScale(Zoom,Zoom,Zoom)*
Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0));
return _transform;
}
|
1 2 3 4 5 6 7 8 9 | public Matrix get_transformation()
{
_transform =
Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *
Matrix.CreateRotationZ(Rotation) *
Matrix.CreateScale(Zoom,-Zoom,Zoom)*
Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0));
return _transform;
}
|
1 2 3 4 5 6 7 8 9 | public Matrix get_transformation()
{
_transform =
Matrix.CreateTranslation(new Vector3(-_pos.X, _pos.Y, 0)) *
Matrix.CreateRotationZ(Rotation) *
Matrix.CreateScale(Zoom,Zoom,1.0f)*
Matrix.CreateTranslation(new Vector3(graphicsDevice.Viewport.Width * 0.5f, graphicsDevice.Viewport.Height * 0.5f, 0));
return _transform;
}
|
1 2 3 4 5 6 | public Vector2 WorldtoScreen(Vector2 In)
{
Vector2 Result = In;
Result.Y = -In.Y;
return Result;
}
|