C# 클래스 VoxelTerrain.Camera

Allows observing the scene with the mouse and keyboard.
파일 보기 프로젝트 열기: barograf/VoxelTerrain 1 사용 예제들

공개 메소드들

메소드 설명
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