C# Class UnityEngine.Camera

Inheritance: Behaviour
ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Properties

Property Type Description
onPostRender CameraCallback
onPreCull CameraCallback
onPreRender CameraCallback

Private Properties

Property Type Description
AddCommandBuffer void
CalculateFrustumCornersInternal void
CopyFrom void
DoClear void
FireOnPostRender void
FireOnPreCull void
FireOnPreRender void
GetAllCameras int
GetCommandBuffers UnityEngine.Rendering.CommandBuffer[]
GetHDRWarnings string[]
GetScreenHeight float
GetScreenWidth float
GetStereoProjectionMatrices UnityEngine.Matrix4x4[]
GetStereoViewMatrices UnityEngine.Matrix4x4[]
INTERNAL_CALL_CalculateFrustumCornersInternal void
INTERNAL_CALL_CalculateObliqueMatrix void
INTERNAL_CALL_GetStereoProjectionMatrix void
INTERNAL_CALL_GetStereoViewMatrix void
INTERNAL_CALL_RaycastTry GameObject
INTERNAL_CALL_RaycastTry2D GameObject
INTERNAL_CALL_ResetAspect void
INTERNAL_CALL_ResetCullingMatrix void
INTERNAL_CALL_ResetFieldOfView void
INTERNAL_CALL_ResetProjectionMatrix void
INTERNAL_CALL_ResetReplacementShader void
INTERNAL_CALL_ResetWorldToCameraMatrix void
INTERNAL_CALL_ScreenPointToRay void
INTERNAL_CALL_ScreenToViewportPoint void
INTERNAL_CALL_ScreenToWorldPoint void
INTERNAL_CALL_SetStereoProjectionMatrices void
INTERNAL_CALL_SetStereoProjectionMatrix void
INTERNAL_CALL_SetStereoViewMatrices void
INTERNAL_CALL_SetStereoViewMatrix void
INTERNAL_CALL_ViewportPointToRay void
INTERNAL_CALL_ViewportToScreenPoint void
INTERNAL_CALL_ViewportToWorldPoint void
INTERNAL_CALL_WorldToScreenPoint void
INTERNAL_CALL_WorldToViewportPoint void
INTERNAL_get_backgroundColor void
INTERNAL_get_cameraToWorldMatrix void
INTERNAL_get_cullingMatrix void
INTERNAL_get_nonJitteredProjectionMatrix void
INTERNAL_get_pixelRect void
INTERNAL_get_projectionMatrix void
INTERNAL_get_rect void
INTERNAL_get_velocity void
INTERNAL_get_worldToCameraMatrix void
INTERNAL_set_backgroundColor void
INTERNAL_set_cullingMatrix void
INTERNAL_set_nonJitteredProjectionMatrix void
INTERNAL_set_pixelRect void
INTERNAL_set_projectionMatrix void
INTERNAL_set_rect void
INTERNAL_set_worldToCameraMatrix void
Internal_RenderToCubemapRT bool
Internal_RenderToCubemapTexture bool
IsFiltered bool
OnlyUsedForTesting1 void
OnlyUsedForTesting2 void
RaycastTry GameObject
RaycastTry GameObject
RaycastTry2D GameObject
RemoveAllCommandBuffers void
RemoveCommandBuffer void
RemoveCommandBuffers void
Render void
RenderDontRestore void
RenderToCubemap bool
RenderToCubemap bool
RenderWithShader void
ResetStereoProjectionMatrices void
ResetStereoViewMatrices void
SetReplacementShader void
SetStereoProjectionMatrices void
SetStereoViewMatrices void
SetTargetBuffersImpl void
SetTargetBuffersMRTImpl void
SetupCurrent void

Public Methods

Method Description
CalculateFrustumCorners ( Rect viewport, float z, MonoOrStereoscopicEye eye, Vector3 outCorners ) : void
CalculateObliqueMatrix ( Vector4 clipPlane ) : Matrix4x4

Calculates and returns oblique near-plane projection matrix.

GetStereoProjectionMatrix ( StereoscopicEye eye ) : Matrix4x4
GetStereoViewMatrix ( StereoscopicEye eye ) : Matrix4x4
RenderToCubemap ( Cubemap cubemap, [ faceMask ) : bool

Render into a static cubemap from this camera.

RenderToCubemap ( RenderTexture cubemap, [ faceMask ) : bool

Render into a cubemap from this camera.

ResetAspect ( ) : void

Revert the aspect ratio to the screen's aspect ratio.

ResetCullingMatrix ( ) : void

Make culling queries reflect the camera's built in parameters.

ResetFieldOfView ( ) : void

Reset to the default field of view.

ResetProjectionMatrix ( ) : void

Make the projection reflect normal camera's parameters.

ResetReplacementShader ( ) : void

Remove shader replacement from camera.

ResetWorldToCameraMatrix ( ) : void

Make the rendering position reflect the camera's position in the scene.

ScreenPointToRay ( Vector3 position ) : Ray

Returns a ray going from camera through a screen point.

ScreenToViewportPoint ( Vector3 position ) : Vector3

Transforms position from screen space into viewport space.

ScreenToWorldPoint ( Vector3 position ) : Vector3

Transforms position from screen space into world space.

SetStereoProjectionMatrix ( StereoscopicEye eye, Matrix4x4 matrix ) : void
SetStereoViewMatrix ( StereoscopicEye eye, Matrix4x4 matrix ) : void
SetTargetBuffers ( RenderBuffer colorBuffer, RenderBuffer depthBuffer ) : void

Sets the Camera to render to the chosen buffers of one or more RenderTextures.

ViewportPointToRay ( Vector3 position ) : Ray

Returns a ray going from camera through a viewport point.

ViewportToScreenPoint ( Vector3 position ) : Vector3

Transforms position from viewport space into screen space.

ViewportToWorldPoint ( Vector3 position ) : Vector3

Transforms position from viewport space into world space.

WorldToScreenPoint ( Vector3 position ) : Vector3

Transforms position from world space into screen space.

WorldToViewportPoint ( Vector3 position ) : Vector3

Transforms position from world space into viewport space.

Private Methods

Method Description
AddCommandBuffer ( CameraEvent evt, CommandBuffer buffer ) : void
CalculateFrustumCornersInternal ( Rect viewport, float z, MonoOrStereoscopicEye eye, Vector3 outCorners ) : void
CopyFrom ( Camera other ) : void
DoClear ( ) : void
FireOnPostRender ( Camera cam ) : void
FireOnPreCull ( Camera cam ) : void
FireOnPreRender ( Camera cam ) : void
GetAllCameras ( Camera cameras ) : int
GetCommandBuffers ( CameraEvent evt ) : UnityEngine.Rendering.CommandBuffer[]
GetHDRWarnings ( ) : string[]
GetScreenHeight ( ) : float
GetScreenWidth ( ) : float
GetStereoProjectionMatrices ( ) : UnityEngine.Matrix4x4[]
GetStereoViewMatrices ( ) : UnityEngine.Matrix4x4[]
INTERNAL_CALL_CalculateFrustumCornersInternal ( Camera self, Rect &viewport, float z, MonoOrStereoscopicEye eye, Vector3 outCorners ) : void
INTERNAL_CALL_CalculateObliqueMatrix ( Camera self, Vector4 &clipPlane, Matrix4x4 &value ) : void
INTERNAL_CALL_GetStereoProjectionMatrix ( Camera self, StereoscopicEye eye, Matrix4x4 &value ) : void
INTERNAL_CALL_GetStereoViewMatrix ( Camera self, StereoscopicEye eye, Matrix4x4 &value ) : void
INTERNAL_CALL_RaycastTry ( Camera self, Ray &ray, float distance, int layerMask, QueryTriggerInteraction queryTriggerInteraction ) : GameObject
INTERNAL_CALL_RaycastTry2D ( Camera self, Ray &ray, float distance, int layerMask ) : GameObject
INTERNAL_CALL_ResetAspect ( Camera self ) : void
INTERNAL_CALL_ResetCullingMatrix ( Camera self ) : void
INTERNAL_CALL_ResetFieldOfView ( Camera self ) : void
INTERNAL_CALL_ResetProjectionMatrix ( Camera self ) : void
INTERNAL_CALL_ResetReplacementShader ( Camera self ) : void
INTERNAL_CALL_ResetWorldToCameraMatrix ( Camera self ) : void
INTERNAL_CALL_ScreenPointToRay ( Camera self, Vector3 &position, Ray &value ) : void
INTERNAL_CALL_ScreenToViewportPoint ( Camera self, Vector3 &position, Vector3 &value ) : void
INTERNAL_CALL_ScreenToWorldPoint ( Camera self, Vector3 &position, Vector3 &value ) : void
INTERNAL_CALL_SetStereoProjectionMatrices ( Camera self, Matrix4x4 &leftMatrix, Matrix4x4 &rightMatrix ) : void
INTERNAL_CALL_SetStereoProjectionMatrix ( Camera self, StereoscopicEye eye, Matrix4x4 &matrix ) : void
INTERNAL_CALL_SetStereoViewMatrices ( Camera self, Matrix4x4 &leftMatrix, Matrix4x4 &rightMatrix ) : void
INTERNAL_CALL_SetStereoViewMatrix ( Camera self, StereoscopicEye eye, Matrix4x4 &matrix ) : void
INTERNAL_CALL_ViewportPointToRay ( Camera self, Vector3 &position, Ray &value ) : void
INTERNAL_CALL_ViewportToScreenPoint ( Camera self, Vector3 &position, Vector3 &value ) : void
INTERNAL_CALL_ViewportToWorldPoint ( Camera self, Vector3 &position, Vector3 &value ) : void
INTERNAL_CALL_WorldToScreenPoint ( Camera self, Vector3 &position, Vector3 &value ) : void
INTERNAL_CALL_WorldToViewportPoint ( Camera self, Vector3 &position, Vector3 &value ) : void
INTERNAL_get_backgroundColor ( Color &value ) : void
INTERNAL_get_cameraToWorldMatrix ( Matrix4x4 &value ) : void
INTERNAL_get_cullingMatrix ( Matrix4x4 &value ) : void
INTERNAL_get_nonJitteredProjectionMatrix ( Matrix4x4 &value ) : void
INTERNAL_get_pixelRect ( Rect &value ) : void
INTERNAL_get_projectionMatrix ( Matrix4x4 &value ) : void
INTERNAL_get_rect ( Rect &value ) : void
INTERNAL_get_velocity ( Vector3 &value ) : void
INTERNAL_get_worldToCameraMatrix ( Matrix4x4 &value ) : void
INTERNAL_set_backgroundColor ( Color &value ) : void
INTERNAL_set_cullingMatrix ( Matrix4x4 &value ) : void
INTERNAL_set_nonJitteredProjectionMatrix ( Matrix4x4 &value ) : void
INTERNAL_set_pixelRect ( Rect &value ) : void
INTERNAL_set_projectionMatrix ( Matrix4x4 &value ) : void
INTERNAL_set_rect ( Rect &value ) : void
INTERNAL_set_worldToCameraMatrix ( Matrix4x4 &value ) : void
Internal_RenderToCubemapRT ( RenderTexture cubemap, int faceMask ) : bool
Internal_RenderToCubemapTexture ( Cubemap cubemap, int faceMask ) : bool
IsFiltered ( GameObject go ) : bool
OnlyUsedForTesting1 ( ) : void
OnlyUsedForTesting2 ( ) : void
RaycastTry ( Ray ray, float distance, int layerMask ) : GameObject
RaycastTry ( Ray ray, float distance, int layerMask, [ queryTriggerInteraction ) : GameObject
RaycastTry2D ( Ray ray, float distance, int layerMask ) : GameObject
RemoveAllCommandBuffers ( ) : void
RemoveCommandBuffer ( CameraEvent evt, CommandBuffer buffer ) : void
RemoveCommandBuffers ( CameraEvent evt ) : void
Render ( ) : void
RenderDontRestore ( ) : void
RenderToCubemap ( Cubemap cubemap ) : bool
RenderToCubemap ( RenderTexture cubemap ) : bool
RenderWithShader ( Shader shader, string replacementTag ) : void
ResetStereoProjectionMatrices ( ) : void
ResetStereoViewMatrices ( ) : void
SetReplacementShader ( Shader shader, string replacementTag ) : void
SetStereoProjectionMatrices ( Matrix4x4 leftMatrix, Matrix4x4 rightMatrix ) : void
SetStereoViewMatrices ( Matrix4x4 leftMatrix, Matrix4x4 rightMatrix ) : void
SetTargetBuffersImpl ( RenderBuffer &color, RenderBuffer &depth ) : void
SetTargetBuffersMRTImpl ( RenderBuffer color, RenderBuffer &depth ) : void
SetupCurrent ( Camera cur ) : void

Method Details

CalculateFrustumCorners() public method

public CalculateFrustumCorners ( Rect viewport, float z, MonoOrStereoscopicEye eye, Vector3 outCorners ) : void
viewport Rect
z float
eye MonoOrStereoscopicEye
outCorners Vector3
return void

CalculateObliqueMatrix() public method

Calculates and returns oblique near-plane projection matrix.

public CalculateObliqueMatrix ( Vector4 clipPlane ) : Matrix4x4
clipPlane Vector4 Vector4 that describes a clip plane.
return Matrix4x4

GetStereoProjectionMatrix() public method

public GetStereoProjectionMatrix ( StereoscopicEye eye ) : Matrix4x4
eye StereoscopicEye
return Matrix4x4

GetStereoViewMatrix() public method

public GetStereoViewMatrix ( StereoscopicEye eye ) : Matrix4x4
eye StereoscopicEye
return Matrix4x4

RenderToCubemap() public method

Render into a static cubemap from this camera.

public RenderToCubemap ( Cubemap cubemap, [ faceMask ) : bool
cubemap Cubemap The cube map to render to.
faceMask [ A bitmask which determines which of the six faces are rendered to.
return bool

RenderToCubemap() public method

Render into a cubemap from this camera.

public RenderToCubemap ( RenderTexture cubemap, [ faceMask ) : bool
cubemap RenderTexture The texture to render to.
faceMask [ A bitfield indicating which cubemap faces should be rendered into.
return bool

ResetAspect() public method

Revert the aspect ratio to the screen's aspect ratio.

public ResetAspect ( ) : void
return void

ResetCullingMatrix() public method

Make culling queries reflect the camera's built in parameters.

public ResetCullingMatrix ( ) : void
return void

ResetFieldOfView() public method

Reset to the default field of view.

public ResetFieldOfView ( ) : void
return void

ResetProjectionMatrix() public method

Make the projection reflect normal camera's parameters.

public ResetProjectionMatrix ( ) : void
return void

ResetReplacementShader() public method

Remove shader replacement from camera.

public ResetReplacementShader ( ) : void
return void

ResetWorldToCameraMatrix() public method

Make the rendering position reflect the camera's position in the scene.

public ResetWorldToCameraMatrix ( ) : void
return void

ScreenPointToRay() public method

Returns a ray going from camera through a screen point.

public ScreenPointToRay ( Vector3 position ) : Ray
position Vector3
return Ray

ScreenToViewportPoint() public method

Transforms position from screen space into viewport space.

public ScreenToViewportPoint ( Vector3 position ) : Vector3
position Vector3
return Vector3

ScreenToWorldPoint() public method

Transforms position from screen space into world space.

public ScreenToWorldPoint ( Vector3 position ) : Vector3
position Vector3
return Vector3

SetStereoProjectionMatrix() public method

public SetStereoProjectionMatrix ( StereoscopicEye eye, Matrix4x4 matrix ) : void
eye StereoscopicEye
matrix Matrix4x4
return void

SetStereoViewMatrix() public method

public SetStereoViewMatrix ( StereoscopicEye eye, Matrix4x4 matrix ) : void
eye StereoscopicEye
matrix Matrix4x4
return void

SetTargetBuffers() public method

Sets the Camera to render to the chosen buffers of one or more RenderTextures.

public SetTargetBuffers ( RenderBuffer colorBuffer, RenderBuffer depthBuffer ) : void
colorBuffer RenderBuffer The RenderBuffer(s) to which color information will be rendered.
depthBuffer RenderBuffer The RenderBuffer to which depth information will be rendered.
return void

ViewportPointToRay() public method

Returns a ray going from camera through a viewport point.

public ViewportPointToRay ( Vector3 position ) : Ray
position Vector3
return Ray

ViewportToScreenPoint() public method

Transforms position from viewport space into screen space.

public ViewportToScreenPoint ( Vector3 position ) : Vector3
position Vector3
return Vector3

ViewportToWorldPoint() public method

Transforms position from viewport space into world space.

public ViewportToWorldPoint ( Vector3 position ) : Vector3
position Vector3 The 3d vector in Viewport space.
return Vector3

WorldToScreenPoint() public method

Transforms position from world space into screen space.

public WorldToScreenPoint ( Vector3 position ) : Vector3
position Vector3
return Vector3

WorldToViewportPoint() public method

Transforms position from world space into viewport space.

public WorldToViewportPoint ( Vector3 position ) : Vector3
position Vector3
return Vector3

Property Details

onPostRender public_oe static_oe property

Event that is fired after any camera finishes rendering.

public static CameraCallback onPostRender
return CameraCallback

onPreCull public_oe static_oe property

Event that is fired before any camera starts culling.

public static CameraCallback onPreCull
return CameraCallback

onPreRender public_oe static_oe property

Event that is fired before any camera starts rendering.

public static CameraCallback onPreRender
return CameraCallback