C# Класс VoxelTerrain.Camera

Allows observing the scene with the mouse and keyboard.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Camera ( Device graphicsDevice, System.Vector3 position, System.Vector3 look, float nearPlane, float farPlane ) : System

Creates a camera with specified values.

FixVectors ( ) : void

Fixes camera sphere point and look vector. Sphere point is fixed by camera look vector spherical unmapping. Look vector is fixed by putting it at a distance of one unit away from position vector.

MoveLook ( System.Vector2 mousePositionDelta, float speed ) : void

Moves camera look vector around a sphere.

MovePosition ( MoveDirection moveDirection, double deltaTime ) : void

Moves a camera position vector.

UpdateProjection ( ) : void

Updates camera projection matrix.

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

Метод Описание
ExtractPlanesFromFrustum ( ) : void

Computes plane equations used in frustum culling.

UpdateView ( ) : void

Updates camera view matrix.

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

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

Creates a camera with specified values.
public Camera ( Device graphicsDevice, System.Vector3 position, System.Vector3 look, float nearPlane, float farPlane ) : System
graphicsDevice Device Virtual adapter used to perform rendering.
position System.Vector3 Position of a camera.
look System.Vector3 A point the camera look at.
nearPlane float A near plane of a camera frustum.
farPlane float A far plane of a camera frustum.
Результат System

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

Fixes camera sphere point and look vector. Sphere point is fixed by camera look vector spherical unmapping. Look vector is fixed by putting it at a distance of one unit away from position vector.
public FixVectors ( ) : void
Результат void

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

Moves camera look vector around a sphere.
public MoveLook ( System.Vector2 mousePositionDelta, float speed ) : void
mousePositionDelta System.Vector2 Mouse position change.
speed float Desired moving speed.
Результат void

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

Moves a camera position vector.
public MovePosition ( MoveDirection moveDirection, double deltaTime ) : void
moveDirection MoveDirection Movement direction.
deltaTime double Performance timer delta time.
Результат void

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

Updates camera projection matrix.
public UpdateProjection ( ) : void
Результат void