C# Класс Duality.Components.Camera

Наследование: Component, ICmpInitializable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddEditorRendererFilter void
CollectDrawcalls void
ICmpInitializable void
NotifyCollectDrawcalls void
OnFrameRendered void
ReleaseDevice void
RemoveEditorRendererFilter void
RenderSinglePass void
SetupDevice void
SetupPickingRT void
UpdateDeviceConfig void

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

Метод Описание
Camera ( ) : System
GetScaleAtZ ( float z ) : float

Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.

GetScreenCoord ( System.Vector2 spacePos ) : Vector3

Transforms world space coordinates to screen space coordinates.

GetScreenCoord ( Vector3 spacePos ) : Vector3

Transforms world space coordinates to screen space coordinates.

GetSpaceCoord ( System.Vector2 screenPos ) : Vector3

Transforms screen space coordinates to world space coordinates.

GetSpaceCoord ( Vector3 screenPos ) : Vector3

Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.

IsCoordInView ( Vector3 c, float boundRad = 1.0f ) : bool

Returns whether the specified world-space position is visible in the Cameras view space.

MakeAvailable ( ) : void
OnPassRendered ( Pass pass ) : void
PickRendererAt ( Rect viewportRect, int x, int y ) : ICmpRenderer

Picks the Duality.ICmpRenderer that owns the pixel at the specified position.

PickRendererAt ( int x, int y ) : ICmpRenderer

Picks the Duality.ICmpRenderer that owns the pixel at the specified position.

PickRenderersIn ( Rect viewportRect, int x, int y, int w, int h ) : HashSet

Picks all ICmpRenderers contained within the specified rectangular area.

PickRenderersIn ( int x, int y, int w, int h ) : HashSet

Picks all ICmpRenderers contained within the specified rectangular area.

Render ( Rect viewportRect ) : void

Renders the current Duality.Resources.Scene.

RenderPickingMap ( System.Vector2 viewportSize ) : bool

Renders a picking map of the current Duality.Resources.Scene. If picking is required, this will be (automatically) done each frame a picking operation needs to be performed.

ScreenToViewportCoord ( System.Vector2 screenPos ) : System.Vector2

Transforms screen space coordinates to viewport coordinates.

ToString ( ) : string

Защищенные методы

Метод Описание
OnCopyTo ( Component target, Duality provider ) : void

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

Метод Описание
AddEditorRendererFilter ( Predicate filter ) : void
CollectDrawcalls ( ) : void
ICmpInitializable ( Component context ) : void
NotifyCollectDrawcalls ( IDrawDevice device ) : void
OnFrameRendered ( ) : void
ReleaseDevice ( ) : void
RemoveEditorRendererFilter ( Predicate filter ) : void
RenderSinglePass ( Rect viewportRect, Pass p ) : void
SetupDevice ( ) : void
SetupPickingRT ( System.Vector2 size ) : void
UpdateDeviceConfig ( ) : void

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

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

public Camera ( ) : System
Результат System

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

Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
public GetScaleAtZ ( float z ) : float
z float
Результат float

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

Transforms world space coordinates to screen space coordinates.
public GetScreenCoord ( System.Vector2 spacePos ) : Vector3
spacePos System.Vector2
Результат Vector3

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

Transforms world space coordinates to screen space coordinates.
public GetScreenCoord ( Vector3 spacePos ) : Vector3
spacePos Vector3
Результат Vector3

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

Transforms screen space coordinates to world space coordinates.
public GetSpaceCoord ( System.Vector2 screenPos ) : Vector3
screenPos System.Vector2
Результат Vector3

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

Transforms screen space coordinates to world space coordinates. The screen positions Z coordinate is interpreted as the target world Z coordinate.
public GetSpaceCoord ( Vector3 screenPos ) : Vector3
screenPos Vector3
Результат Vector3

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

Returns whether the specified world-space position is visible in the Cameras view space.
public IsCoordInView ( Vector3 c, float boundRad = 1.0f ) : bool
c Vector3 The position to test.
boundRad float The visual bounding radius to assume for the specified position.
Результат bool

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

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

OnCopyTo() защищенный Метод

protected OnCopyTo ( Component target, Duality provider ) : void
target Component
provider Duality
Результат void

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

public OnPassRendered ( Pass pass ) : void
pass Pass
Результат void

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

Picks the Duality.ICmpRenderer that owns the pixel at the specified position.
public PickRendererAt ( Rect viewportRect, int x, int y ) : ICmpRenderer
viewportRect Rect The viewport area to which will be rendered.
x int x-Coordinate of the pixel to check.
y int y-Coordinate of the pixel to check.
Результат ICmpRenderer

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

Picks the Duality.ICmpRenderer that owns the pixel at the specified position.
public PickRendererAt ( int x, int y ) : ICmpRenderer
x int x-Coordinate of the pixel to check.
y int y-Coordinate of the pixel to check.
Результат ICmpRenderer

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

Picks all ICmpRenderers contained within the specified rectangular area.
public PickRenderersIn ( Rect viewportRect, int x, int y, int w, int h ) : HashSet
viewportRect Rect The viewport area to which will be rendered.
x int x-Coordinate of the Rect.
y int y-Coordinate of the Rect.
w int Width of the Rect.
h int Height of the Rect.
Результат HashSet

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

Picks all ICmpRenderers contained within the specified rectangular area.
public PickRenderersIn ( int x, int y, int w, int h ) : HashSet
x int x-Coordinate of the Rect.
y int y-Coordinate of the Rect.
w int Width of the Rect.
h int Height of the Rect.
Результат HashSet

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

Renders the current Duality.Resources.Scene.
public Render ( Rect viewportRect ) : void
viewportRect Rect The viewport area to which will be rendered.
Результат void

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

Renders a picking map of the current Duality.Resources.Scene. If picking is required, this will be (automatically) done each frame a picking operation needs to be performed.
public RenderPickingMap ( System.Vector2 viewportSize ) : bool
viewportSize System.Vector2 Sife of the viewport area to which will be rendered.
Результат bool

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

Transforms screen space coordinates to viewport coordinates.
public ScreenToViewportCoord ( System.Vector2 screenPos ) : System.Vector2
screenPos System.Vector2
Результат System.Vector2

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

public ToString ( ) : string
Результат string