C# Class Duality.Components.Camera

Inheritance: Component, ICmpInitializable
Afficher le fichier Open project: BraveSirAndrew/duality Class Usage Examples

Private Properties

Свойство Type Description
AddEditorRendererFilter void
CollectDrawcalls void
ICmpInitializable void
NotifyCollectDrawcalls void
OnFrameRendered void
ReleaseDevice void
RemoveEditorRendererFilter void
RenderSinglePass void
SetupDevice void
SetupPickingRT void
UpdateDeviceConfig void

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
OnCopyTo ( Component target, Duality provider ) : void

Private Methods

Méthode Description
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

Method Details

Camera() public méthode

public Camera ( ) : System
Résultat System

GetScaleAtZ() public méthode

Returns the scale factor of objects that are located at the specified (world space) z-Coordinate.
public GetScaleAtZ ( float z ) : float
z float
Résultat float

GetScreenCoord() public méthode

Transforms world space coordinates to screen space coordinates.
public GetScreenCoord ( System.Vector2 spacePos ) : Vector3
spacePos System.Vector2
Résultat Vector3

GetScreenCoord() public méthode

Transforms world space coordinates to screen space coordinates.
public GetScreenCoord ( Vector3 spacePos ) : Vector3
spacePos Vector3
Résultat Vector3

GetSpaceCoord() public méthode

Transforms screen space coordinates to world space coordinates.
public GetSpaceCoord ( System.Vector2 screenPos ) : Vector3
screenPos System.Vector2
Résultat Vector3

GetSpaceCoord() public méthode

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
Résultat Vector3

IsCoordInView() public méthode

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.
Résultat bool

MakeAvailable() public méthode

public MakeAvailable ( ) : void
Résultat void

OnCopyTo() protected méthode

protected OnCopyTo ( Component target, Duality provider ) : void
target Component
provider Duality
Résultat void

OnPassRendered() public méthode

public OnPassRendered ( Pass pass ) : void
pass Pass
Résultat void

PickRendererAt() public méthode

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.
Résultat ICmpRenderer

PickRendererAt() public méthode

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.
Résultat ICmpRenderer

PickRenderersIn() public méthode

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.
Résultat HashSet

PickRenderersIn() public méthode

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.
Résultat HashSet

Render() public méthode

Renders the current Duality.Resources.Scene.
public Render ( Rect viewportRect ) : void
viewportRect Rect The viewport area to which will be rendered.
Résultat void

RenderPickingMap() public méthode

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.
Résultat bool

ScreenToViewportCoord() public méthode

Transforms screen space coordinates to viewport coordinates.
public ScreenToViewportCoord ( System.Vector2 screenPos ) : System.Vector2
screenPos System.Vector2
Résultat System.Vector2

ToString() public méthode

public ToString ( ) : string
Résultat string