| Name | Description |
---|
 | AddAnimation |
Adds the specified animation to the list of animations that are updated in each update phase.
|
 | BoundingBox3DTo2D |
Converts a 3D BoundingBox to the two Vector2 that define the 2D bounding box on the screen.
|
 | CalculateCameraPlanes(ICamera, Single, Single) |
CalculateCameraPlanes sets the zNear and zFar parameters to camera near plane distance and camera far plane distance.
The values are calculated with using the bounding box of the current scene and specified camera.
CalculateCameraPlanes returns false if the calculated values are not correct (are 0, NaN or Infinity). This can happen when camera's matrices are not set.
|
  | CalculateCameraPlanes(Matrix4x4, Boolean, Vector3, Single, Single, Single) |
CalculateCameraPlanes sets the zNear and zFar parameters to camera near plane distance and camera far plane distance.
CalculateCameraPlanes returns false if the calculated values are not correct (are 0, NaN or Infinity). This can happen when camera's matrices are not set.
|
 | CanConvertPoint3DTo2D |
CanConvertPoint3DTo2D returns true when the matrix to convert 3D world position to screen 2D position can be generated.
|
 | CaptureNextFrameInRenderDoc |
CaptureNextFrameInRenderDoc will try to capture the next frame in RenderDoc.
The application that is using SharpEngine must be started from RenderDoc. This works only on Windows.
The method returns true when the RenderDocHelper was correctly initialized and when the capture is possible.
The actual capture will start before the next frame will be rendered.
|
 | ChooseDepthStencilFormat |
virtual ChooseDepthStencilFormat that can be overriden to set a different Format for the depth-stencil buffer.
Returns Format.Undefined if not supported
|
 | ChooseSwapPresentMode |
virtual ChooseSwapPresentMode that can be overriden to set a different PresentModeKHR.
|
 | ChooseSwapSurfaceFormat(SurfaceDetails) |
virtual ChooseSwapSurfaceFormat that can be overriden to set a different SurfaceFormatKHR
|
 | ChooseSwapSurfaceFormat(SurfaceFormatKHR) |
virtual ChooseSwapSurfaceFormat that can be overriden to set a different SurfaceFormatKHR
|
 | CreateBackgroundSpriteBatch |
Creates a SpriteBatch that will be rendered before the objects in this SceneView are rendered.
SpriteBatch that is created from SceneView object can use relative and absolute coordinates.
To remove the created SpriteBatch call the RemoveSpriteBatch(SpriteBatch, Boolean) or RemoveAllSpriteBatches(Boolean) methods.
It is also possible to add sprites that are rendered when rendering the Scene - in this case call CreateBackgroundSpriteBatch(String) or CreateOverlaySpriteBatch(String) methods.
|
 | CreateOverlaySpriteBatch |
Creates a SpriteBatch that will be rendered after the objects in this SceneView are rendered.
SpriteBatch that is created from SceneView object can use relative and absolute coordinates.
To remove the created SpriteBatch call the RemoveSpriteBatch(SpriteBatch, Boolean) or RemoveAllSpriteBatches(Boolean) methods.
It is also possible to add sprites that are rendered when rendering the Scene - in this case call CreateBackgroundSpriteBatch(String) or CreateOverlaySpriteBatch(String) methods.
|
 | Dispose |
Dispose
|
 | Dispose(Boolean) |
Dispose
(Overrides ComponentBaseDispose(Boolean)) |
 | DumpCameraInfo |
Writes string about the details about the current camera to the console (when the application is debugged in Visual Studio the result is written to Output window or Immediate Window if started from there; in Rider the result is written to Debug Output window).
|
 | DumpRenderingStatistics |
Writes string with major rendering statistics from the last rendered frame to the console (when the application is debugged in Visual Studio the result is written to Output window or Immediate Window if started from there; in Rider the result is written to Debug Output window).
|
 | DumpRenderingSteps |
Writes string about each used rendering step to the console (when the application is debugged in Visual Studio the result is written to Output window or Immediate Window if started from there; in Rider the result is written to Debug Output window).
|
 | GetAllHitObjects(Ray, HitTestOptions) |
GetAllHitObjects method executes a hit testing by using the specified Ray on the SceneNodes that are shown by this SceneView and returns a list of RayHitTestResult objects sorted from the closest to the farthest object.
When no object is hit, an empty list is returned.
|
 | GetAllHitObjects(Single, Single, Boolean, HitTestOptions) |
GetAllHitObjects method executes a hit testing from the specified x and y positions on the SceneNodes that are shown by this SceneView and returns a list of RayHitTestResult objects sorted from the closest to the farthest object.
When no object is hit, an empty list is returned.
|
 | GetCameraInfo |
Gets a string that shows the details about the current camera.
|
 | GetClosestHitObject(Ray, HitTestOptions) |
GetClosestHitObject method executes a hit testing by using the specified Ray on the SceneNodes that are shown by this SceneView and returns a RayHitTestResult object with the closest triangle hit.
When no triangle is hit, null is returned.
|
 | GetClosestHitObject(Single, Single, Boolean, HitTestOptions) |
GetClosestHitObject method executes a hit testing from the specified x and y positions on the SceneNodes that are shown by this SceneView and returns a RayHitTestResult object with the closest triangle hit.
When no triangle is hit, null is returned.
|
 | GetCurrentSurfaceSize |
Gets the size of the Surface |
 | GetCurrentSwapChainImage |
Returns the Vulkan Image that is used as the current swap chain image.
|
 | GetImageAvailableSemaphore |
Gets the Semaphore that is used to signal when the rendered image is available.
|
 | GetRayFromCamera(Int32, Int32, Boolean, Boolean) |
Returns a Ray that goes into a direction that is calculated from the specified x and y position in screen coordinates.
For perspective camera the ray starts at the current camera position.
The ray can be used for hit testing from the mouse position defined by x and y (relative to this SceneView object).
When the Ray cannot be created (size is zero or camera matrix is not valid), then a Ray with zero Direction is returned (Ray.IsValid would return false).
|
 | GetRayFromCamera(Single, Single, Boolean, Boolean) |
Returns a Ray that goes into a direction that is calculated from the specified x and y position in screen coordinates.
For perspective camera the ray starts at the current camera position.
The ray can be used for hit testing from the mouse position defined by x and y (relative to this SceneView object).
When the Ray cannot be created (size is zero or camera matrix is not valid), then a Ray with zero Direction is returned (Ray.IsValid would return false).
|
 | GetRayFromNearPlane(Int32, Int32, Boolean, Boolean) |
Returns a Ray that starts at the camera's near plane and goes into a direction that is calculated from the specified x and y position in screen coordinates.
The ray can be used for hit testing from the mouse position defined by x and y (relative to this SceneView object).
When the Ray cannot be created (size is zero or camera matrix is not valid), then a Ray with zero Direction is returned (Ray.IsValid would return false).
|
 | GetRayFromNearPlane(Single, Single, Boolean, Boolean) |
Returns a Ray that starts at the camera's near plane and goes into a direction that is calculated from the specified x and y position in screen coordinates.
The ray can be used for hit testing from the mouse position defined by x and y (relative to this SceneView object).
When the Ray cannot be created (size is zero or camera matrix is not valid), then a Ray with zero Direction is returned (Ray.IsValid would return false).
|
 | GetRenderFinishedSemaphore |
Gets the Semaphore that is used to signal when the rendering is finished.
|
 | GetRenderingStatisticsInfo |
Returns a string with major rendering statistics from the last rendered frame.
To collect statistics set the IsCollectingStatistics to true before rendering a frame.
|
 | GetRenderingStepsInfo |
Gets a string that shows each used rendering step in its own line.
|
 | GetWorldToViewMatrix |
Gets Matrix4x4 that can be used to convert 3D coordinates to 2D view (screen) coordinates.
If the method returns true, than the worldToViewMatrix was set; if false is returned than the matrix cannot be calculated.
|
 | GetWorldToViewportMatrix |
Gets Matrix4x4 that can be used to convert 3D coordinates to 2D viewport (screen) coordinates.
If the method returns true, than the worldToViewportMatrix was set; if false is returned than the matrix cannot be calculated.
|
 | Initialize(SurfaceKHR, Single, Single) |
Initializes the SceneView with the size from the specified Vulkan Surface.
Optionally it is possible to set the DPI scale because that data is not available from the surface.
|
 | Initialize(VulkanSurfaceProvider, Single, Single) |
Initializes the SceneView with the size from the specified vulkanSurfaceProvider that can return a Vulkan Surface.
Optionally it is possible to set the DPI scale because that data is not available from the surface.
|
 | Initialize(Int32, Int32, Single, Single) |
Initializes the SceneView with the specified size.
This method can be called only when the SceneView was created without a Surface parameter (call Initialize(SurfaceKHR, Single, Single) or Initialize(VulkanSurfaceProvider, Single, Single) when a valid Surface is provided).
|
 | Initialize(VulkanDevice, VulkanSurfaceProvider, Single, Single) |
Initializes the SceneView with the size from the specified vulkanSurfaceProvider that can return a Vulkan Surface.
Optionally it is possible to set the DPI scale because that data is not available from the surface.
|
 | Initialize(VulkanDevice, SurfaceKHR, Single, Single) |
Initializes the SceneView with the size from the specified Vulkan Surface.
Optionally it is possible to set the DPI scale because that data is not available from the surface.
|
 | InitializeWithDefaultSurface |
Initializes the SceneView with the size from the DefaultSurface that was used to create the VulkanDevice.
Optionally it is possible to set the DPI scale because that data is not available from the surface.
|
 | IsCommandBuffersRecreateNeeded |
IsCommandBuffersRecreateNeeded returns true if Scene.DirtyFlags and DirtyFlags require that the command buffer is recreated.
|
 | IsFrameRenderingFinished |
Returns true if the frame with the specified number was fully rendered (no tasks on the GPU are still running for this frame).
|
 | IsRenderingLayersRecreateNeeded |
IsRenderingLayersRecreateNeeded returns true if Scene.DirtyFlags and DirtyFlags require that the RenderingLayers are recreated by calling CollectRenderingItems(RenderingContext) methods on all SceneNodes..
|
 | Line3DTo2D(Vector3, Vector3, Boolean) |
Converts a 3D line that is defined by startPositionWorld and endPositionWorld to a line on the screen that is defined by startPositionScreen and endPositionScreen.
This method correctly handles the case when the 3D line crosses the camera near plane (goes behind the camera). In this case the line needs to be cropped at the camera's near plane.
|
  | Line3DTo2D(Vector3, Vector3, Camera, Single, Single) |
Converts a 3D line that is defined by startPositionWorld and endPositionWorld to a line on the screen that is defined by startPositionScreen and endPositionScreen.
This method correctly handles the case when the 3D line crosses the camera near plane (goes behind the camera). In this case the line needs to be cropped at the camera's near plane.
|
 | NotifyChange |
NotifyChange method adds the specified SceneViewDirtyFlags to the changes flags for this SceneView.
|
 | OnInitializeDeviceResources |
OnInitializeDeviceResources
(Overrides SceneComponentOnInitializeDeviceResources(VulkanDevice)) |
 | OnSceneRendered |
OnSceneRendered
|
 | OnSceneUpdating |
OnSceneUpdating
|
 | OnViewResized |
OnViewSizeChanged
|
 | Point3DTo2D(Vector3, Boolean) |
Point3DTo2D converts a world space 3D position (as Vector3) to the 2D screen position (as Vector2).
To calculate the 2D position for the final UI element, set the adjustByDpiScale to true otherwise the 2D positions will be positioned inside the view defined by SceneView's Width and Height.
|
 | Point3DTo2D(Vector3, Camera, Single, Single) |
Point3DTo2D converts a world space 3D point (as Vector3) to the 2D point (as Vector2) on the view that is defined by specified camera, viewWidth and viewHeight.
|
 | Points3DTo2D(Span, Void, Vector3, Span, Void) | |
 | Points3DTo2D(Vector3, Vector2, Transform, Boolean, Boolean) |
Points3DTo2D calculates 2D screen positions from the specified 3D positions.
To calculate the 2D positions for the final UI element, set the adjustByDpiScale to true otherwise the 2D positions will be positioned inside the view defined by SceneView's Width and Height.
Calculated 2D positions are stored into the specified points2D array (its size must be at least the size of the 3D positions).
|
 | Points3DTo2D(Span, Void, Vector3, Span, Void, Vector2, Camera, Single) | |
 | Points3DTo2D(Vector3, Vector2, Camera, Single, Single, Transform, Boolean, Boolean) |
Points3DTo2D calculates 2D positions from the specified 3D positions.
Calculated 2D positions are stored into the specified points2D array (its size must be at least the size of the 3D positions).
|
 | RegisterStagingGpuBufferReadyCallback |
RegisterStagingGpuBufferReadyCallback can be called to copy the rendered image to a staging GpuBuffer and call the provided action when the staging buffer is ready to be copied to the main memory.
To get the GpuImage instead of a staging buffer, use the RegisterStagingGpuImageReadyCallback(ActionGpuImage).
To unregister call UnregisterStagingGpuBufferReadyCallback(ActionGpuBuffer, Int32, Int32) method.
|
 | RegisterStagingGpuImageReadyCallback |
RegisterStagingGpuImageReadyCallback can be called to copy the rendered image to a staging GpuImage and call the provided action when the staging buffer is ready to be copied to the main memory.
To get the GpuBuffer as a staging buffer, use the RegisterStagingGpuBufferReadyCallback(ActionGpuBuffer, Int32, Int32).
To unregister call UnregisterStagingGpuImageReadyCallback(ActionGpuImage) method.
|
 | RemoveAllSpriteBatches |
Removes all SpriteBatches.
|
 | RemoveAnimation |
Remove the specified animation from the list of animations.
|
 | RemoveSpriteBatch |
Removes the specified SpriteBatch from the list of sprite batches associated to this Scene (created by CreateBackgroundSpriteBatch(String) or CreateOverlaySpriteBatch(String) methods).
|
 | Render |
Render method checked the dirty flags of this SceneView and the Scene and when there are some changes rendered the next frame.
Rendering cna be forced by setting forceRender to true.
|
 | RenderToGpuBuffer |
Renders the current scene view to the bitmap and saves the image data a GpuBuffer that is passed to the specified stagingGpuBufferReady Action (parameters: GpuBuffer gpuBuffer, int imageWidth, int imageHeight).
The data in the GpuBuffer always have 4 bytes per pixel and have no row padding (stride = width * 4).
|
 | RenderToGpuImage |
Renders the current scene view to the bitmap and saves the image data a GpuImage that is passed to the specified stagingGpuImageReady Action.
|
 | RenderToRawImageData(Boolean, Boolean, StandardBitmapFormats) |
Renders the current scene view to the bitmap that is represented by RawImageData object.
To reuse the RawImageData and its data array, call RenderToRawImageData that takes RawImageData as the first parameter.
|
 | RenderToRawImageData(RawImageData, Boolean, Boolean, StandardBitmapFormats) |
Renders the current scene view to the bitmap and saves the image data into an existing RawImageData object.
When the rendered size is the same or smaller, then the existing Data array is preserved, otherwise a new Data array is created.
|
 | Resize(Boolean) |
Resizes the current SceneView by updating the size from the size of the Surface.
When no Surface is used, then Resize(Int32, Int32, SurfaceTransformFlagsKHR, Boolean) must be used.
|
 | Resize(Int32, Int32, SurfaceTransformFlagsKHR, Boolean) |
Resizes the current SceneView to the provided size.
When SceneView is rendered to the Surface, then call the Resize(Boolean) method.
|
 | ToString | (Overrides ObjectToString) |
 | UnregisterStagingGpuBufferReadyCallback |
Removes the specified Action from the actions that were registered by calling the RegisterStagingGpuBufferReadyCallback(ActionGpuBuffer, Int32, Int32) method.
|
 | UnregisterStagingGpuImageReadyCallback |
Removes the specified Action from the actions that were registered by calling the RegisterStagingGpuImageReadyCallback(ActionGpuImage) method.
|
 | UpdateAnimations |
Update all Scene's animations and all animations that are added by calling the AddAnimation(IAnimation) (this is done automatically by the animation classes).
|
 | UpdateCameraNearAndFarPlanes |
UpdateCameraNearAndFarPlanes method updates the camera's NearPlaneDistance and FarPlaneDistance based on the size of the scene.
This is done only when the current Scene's camera implements IAutomaticNearFarPlaneCamera interface and when IsAutomaticNearPlaneDistanceCalculation or IsAutomaticFarPlaneDistanceCalculation are true.
|
 | WaitUntilRendered |
WaitUntilRendered method waits until this SceneView finishes rendering the current frame.
|