C# Класс MoodSwingCoreComponents.MSCamera

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AdjustPitchAxis ( ) : void
BirdsEyeView ( ) : void
GetInstance ( ) : MSCamera
GetView ( ) : Matrix
Rotate ( Vector2 rotation ) : void

Rotates the camera.

Shift ( Vector2 dV, Vector2 dim ) : void

Shifts the camera position and camera target in a specific direction.

Zoom ( int direction ) : bool

Shifts the camera position closer to the camera target.

initialize ( Viewport viewport, Vector3 initialLookAt, float rotation ) : void

Initializes the position of the camera.

Приватные методы

Метод Описание
MSCamera ( ) : System

Описание методов

AdjustPitchAxis() публичный Метод

public AdjustPitchAxis ( ) : void
Результат void

BirdsEyeView() публичный Метод

public BirdsEyeView ( ) : void
Результат void

GetInstance() публичный статический Метод

public static GetInstance ( ) : MSCamera
Результат MSCamera

GetView() публичный Метод

public GetView ( ) : Matrix
Результат Matrix

Rotate() публичный Метод

Rotates the camera.
public Rotate ( Vector2 rotation ) : void
rotation Vector2 A Vector2D whose X coordinate represents the direction of the angle of the yaw rotation /// and whose Y coordinate represents the direction of the angle of the pitch rotation
Результат void

Shift() публичный Метод

Shifts the camera position and camera target in a specific direction.
public Shift ( Vector2 dV, Vector2 dim ) : void
dV Vector2 A Vector2D whose X coordinate represents the direction of the movements from left to right and /// whose Y coordinate represents the direction of the up and down movement.
dim Vector2 A Vector2D representing the dimension of the map. Used for clamping.
Результат void

Zoom() публичный Метод

Shifts the camera position closer to the camera target.
public Zoom ( int direction ) : bool
direction int 1 to zoom closer. -1 to zoom further.
Результат bool

initialize() публичный статический Метод

Initializes the position of the camera.
public static initialize ( Viewport viewport, Vector3 initialLookAt, float rotation ) : void
viewport Microsoft.Xna.Framework.Graphics.Viewport
initialLookAt Vector3
rotation float
Результат void