C# 클래스 Nez.Camera

상속: Component
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
farClipPlane3D float
nearClipPlane3D float
positionZ3D float

공개 메소드들

메소드 설명
Camera ( ) : System
forceMatrixUpdate ( ) : void

this forces the matrix and bounds dirty

onEntityTransformChanged ( Transform comp ) : void
screenToWorldPoint ( Point screenPosition ) : Vector2

converts a point from screen coordinates to world

screenToWorldPoint ( Vector2 screenPosition ) : Vector2

converts a point from screen coordinates to world

setMaximumZoom ( float maxZoom ) : Camera

maximum non-scaled value (0 - float.Max) that the camera zoom can be. Defaults to 3

setMinimumZoom ( float minZoom ) : Camera

minimum non-scaled value (0 - float.Max) that the camera zoom can be. Defaults to 0.3

setPosition ( Vector2 position ) : Camera

shortcut to entity.transform.setPosition

setRotation ( float radians ) : Camera

shortcut to entity.transform.setRotation

setRotationDegrees ( float degrees ) : Camera

shortcut to entity.transform.setRotationDegrees

setZoom ( float zoom ) : Camera

sets the the zoom value which should be between -1 and 1. This value is then translated to be from minimumZoom to maximumZoom. This lets you set appropriate minimum/maximum values then use a more intuitive -1 to 1 mapping to change the zoom.

worldToScreenPoint ( Vector2 worldPosition ) : Vector2

converts a point from world coordinates to screen

zoomIn ( float deltaZoom ) : void
zoomOut ( float deltaZoom ) : void

보호된 메소드들

메소드 설명
updateMatrixes ( ) : void

비공개 메소드들

메소드 설명
onSceneRenderTargetSizeChanged ( int newWidth, int newHeight ) : void

when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was

메소드 상세

Camera() 공개 메소드

public Camera ( ) : System
리턴 System

forceMatrixUpdate() 공개 메소드

this forces the matrix and bounds dirty
public forceMatrixUpdate ( ) : void
리턴 void

onEntityTransformChanged() 공개 메소드

public onEntityTransformChanged ( Transform comp ) : void
comp Transform
리턴 void

screenToWorldPoint() 공개 메소드

converts a point from screen coordinates to world
public screenToWorldPoint ( Point screenPosition ) : Vector2
screenPosition Point Screen position.
리턴 Vector2

screenToWorldPoint() 공개 메소드

converts a point from screen coordinates to world
public screenToWorldPoint ( Vector2 screenPosition ) : Vector2
screenPosition Vector2 Screen position.
리턴 Vector2

setMaximumZoom() 공개 메소드

maximum non-scaled value (0 - float.Max) that the camera zoom can be. Defaults to 3
public setMaximumZoom ( float maxZoom ) : Camera
maxZoom float Max zoom.
리턴 Camera

setMinimumZoom() 공개 메소드

minimum non-scaled value (0 - float.Max) that the camera zoom can be. Defaults to 0.3
public setMinimumZoom ( float minZoom ) : Camera
minZoom float
리턴 Camera

setPosition() 공개 메소드

shortcut to entity.transform.setPosition
public setPosition ( Vector2 position ) : Camera
position Vector2
리턴 Camera

setRotation() 공개 메소드

shortcut to entity.transform.setRotation
public setRotation ( float radians ) : Camera
radians float Radians.
리턴 Camera

setRotationDegrees() 공개 메소드

shortcut to entity.transform.setRotationDegrees
public setRotationDegrees ( float degrees ) : Camera
degrees float Degrees.
리턴 Camera

setZoom() 공개 메소드

sets the the zoom value which should be between -1 and 1. This value is then translated to be from minimumZoom to maximumZoom. This lets you set appropriate minimum/maximum values then use a more intuitive -1 to 1 mapping to change the zoom.
public setZoom ( float zoom ) : Camera
zoom float Zoom.
리턴 Camera

updateMatrixes() 보호된 메소드

protected updateMatrixes ( ) : void
리턴 void

worldToScreenPoint() 공개 메소드

converts a point from world coordinates to screen
public worldToScreenPoint ( Vector2 worldPosition ) : Vector2
worldPosition Vector2 World position.
리턴 Vector2

zoomIn() 공개 메소드

public zoomIn ( float deltaZoom ) : void
deltaZoom float
리턴 void

zoomOut() 공개 메소드

public zoomOut ( float deltaZoom ) : void
deltaZoom float
리턴 void

프로퍼티 상세

farClipPlane3D 공개적으로 프로퍼티

far clip plane of the 3D camera projection
public float farClipPlane3D
리턴 float

nearClipPlane3D 공개적으로 프로퍼티

near clip plane of the 3D camera projection
public float nearClipPlane3D
리턴 float

positionZ3D 공개적으로 프로퍼티

z-position of the 3D camera projections. Affects the fov greatly. Lower values make the objects appear very long in the z-direction.
public float positionZ3D
리턴 float