![]() | |
Scene |
public class SceneView : SceneComponent, IDisposable
The SceneView type exposes the following members.
Name | Description | |
---|---|---|
![]() | BackBuffersInitialized | Gets a Boolean that specifies if the back buffers for this SceneView have been created. When this is true, then Width and Height define the size of the back buffers. |
![]() | BackgroundColor | Color of the background. The color is not pre-multiplied by the alpha component. Default value is Transparent color (alpha 0 and Red, Green and Blue set to 1). |
![]() | BackgroundSpritesRenderingLayer | Gets a RenderingLayer that contains sprites that are rendered before any other 3D object is rendered. This RenderingLayer is not added to Ab4d.SharpEngine.RenderingLayers collection but is rendered in RenderSpritesRenderingStep. |
![]() | Camera | Gets or sets an ICamera that is used to show the scene. |
![]() | CurrentSwapChainImageIndex | When SwapChain image is used, then returns the index of the current swap chain image; otherwise 0 is returned. |
![]() | DefaultBeginRenderPassRenderingStep | Default BeginRenderPassRenderingStep |
![]() | DefaultCompleteRenderingStep | Default CompleteRenderingStep |
![]() | DefaultInitializeRenderingStep | Default InitializeRenderingStep |
![]() | DefaultRenderObjectsRenderingStep | Default RenderObjectsRenderingStep |
![]() | DefaultRenderPostProcessesRenderingStep | Default RenderPostProcessesRenderingStep that render post-process effects. |
![]() | DefaultResolveSupersamplingRenderingStep | Default ResolveSupersamplingRenderingStep |
![]() | DepthStencilFormat | Gets the format of DepthStencilImage |
![]() | DepthStencilImage | Gets the GpuImage that is used as a depth-stencil buffer. |
![]() | DpiScaleX | Gets or sets a float that represents a DPI scale factor in X direction: 1 means 96 DPI, 1.5 means 144 DPI, etc. This value is used in line and pixel rendering and scales the line thickness or size of pixels. |
![]() | DpiScaleY | Gets or sets a float that represents a DPI scale factor in Y direction: 1 means 96 DPI, 1.5 means 144 DPI, etc. This value is used in line and pixel rendering and scales the line thickness or size of pixels. |
![]() | Format | Gets or sets a StandardBitmapFormats that specifies the texture format that is used by the SwapChain. By default, this is set to BGRA, but in cases when using shared texture or when the engine is only rendering to bitmap, it is also possible to specify the RGBA format. To get the raw Vulkan format get the SwapChainFormat property. |
![]() | FrameNumber | Gets the current frame number. The frame number is increased at the beginning of Render(Boolean, Boolean, Boolean) method and before calling Update method. The first rendered frame number is 1 (0 means that no frame was rendered yet). See LastSubmittedFrameNumber to get the frame number that was lastly submitted to the graphics card. |
![]() | GpuDevice | Gets the VulkanDevice that was used to initialize this SceneView. |
![]() | GraphicsCommandPool | Gets the default graphics command pool. |
![]() | Height | Gets the final height in pixels of the texture that is shown by this SceneView. In case when SupersamplingCount is more than 1, then the height of the texture that is used for rendering is by SupersamplingFactor factor bigger than the value of this property (see RenderHeight). The super-scaled texture is then down-sampled to this width. |
![]() | IsCollectingStatistics | Gets or sets a Boolean that specified is statistics is collected during rendering. Statistics is written to the Statistics property. |
![]() | IsLicenseLogoShown | Returns true if license logo (AB4D Logo with "POWERED BY SHARP ENGINE" text) is shown. When this image is shown no other 3D object can be shown. This is shown for the free open-source license when the SharpEngine is started. To be informed when this image is hidden use OnLicenseLogoRemoved Action. |
![]() | IsPerSampleShading | True when per-sample shading is used. This can be used to eliminate aliasing and smooth out e.g. high frequency texture maps. To set the value of per-sample shading, set the PreferredIsPerSampleShading before the SceneView is initialized. |
![]() | LastSubmittedFrameNumber | Gets a frame number that was submitted to the graphics card for execution. This may be lower than the FrameNumber because FrameNumber is increased before the Update phase, when the LastSubmittedFrameNumber is set when the frame is sent to the graphics card. This value is increased in the InitializeRenderingStep. |
![]() | MainRenderPass | Gets the GpuRenderPass that is used to render the objects in the scene. |
![]() | MaxConcurrentlySubmittedFrames | Gets the number of frames that can be rendered in the background on the graphics card. In case when the engine is waiting for the graphics card to finish rendering, then this value is 0 (no background rendering while this app is being executed). Otherwise this value can be as big as SwapChainImagesCount. |
![]() | MSAAImage | Gets the GpuImage that is used as multi-sampled buffer. When using super-sampling, then this GpuImage is scaled by the SupersamplingFactor. |
![]() | MultisampleCount | MultisampleCount defines the multi-sampling count (MSAA) used by this SceneView. This value can be set when calling Initialize method or after the SceneView is initialized by calling the Resize method. Default value is 1 (no multi-sampling). See remarks for more info. |
![]() | MultisampleCountFlags | Gets used multi-sampling as a SampleCountFlags. |
![]() | OnLicenseLogoRemoved | An Action that can be set to a user code that is called when the license logo (AB4D Logo with "POWERED BY SHARP ENGINE" text) is removed and SharpEngine can start showing other 3D objects. License logo is shown for the free open-source license when the SharpEngine is started. |
![]() | OverlaySpritesRenderingLayer | Gets a RenderingLayer that contains sprites that are rendered after 3D objects are rendered. This RenderingLayer is not added to Ab4d.SharpEngine.RenderingLayers collection but is rendered in RenderSpritesRenderingStep. |
![]() | PostProcesses | Gets a collection of post processes that will be applied after rendering the 3D scene. |
![]() | PreferredIsPerSampleShading | PreferredIsPerSampleShading can be set before the SceneView is initialized and defines if the per-sample shading is used. After initializing the SceneView, the actually used multi-sampling count is set to the IsPerSampleShading property. |
![]() | PreferredMultiSampleCount | Obsolete. |
![]() | PresentQueue | Gets the present queue. |
![]() | PrimaryCommandBuffers | Get an array of primary command buffers. |
![]() | RenderBackgroundSpritesRenderingStep | Default RenderSpritesRenderingStep that render background sprites. |
![]() | RenderHeight | Gets the height in pixels that is used for rendering of this SceneView. In case when SupersamplingCount is more than 1, then this value is calculated as Height multiplied by SupersamplingFactor. The super-scaled texture is then down-sampled to the final height that is defined by Height property. |
![]() | RenderingContext | Gets the RenderingContext |
![]() | RenderingSteps | Gets the rendering steps that are executed to render a frame. |
![]() | RenderOverlaySpritesRenderingStep | Default RenderSpritesRenderingStep that render overlay sprites. |
![]() | RenderWidth | Gets the width in pixels that is used for rendering of this SceneView. In case when SupersamplingCount is more than 1, then this value is calculated as Width multiplied by SupersamplingFactor. The super-scaled texture is then down-sampled to the final width that is defined by Width property. |
![]() | SSAAImage | Gets the GpuImage that is used when the SupersamplingFactor is bigger than 1. When no multi-sampling is used, then the 3D scene is rendered to this GpuImage. When super-sampling is used, then this GpuImage is resoved from the MSAAImage. This GpuImage is down-samples to the final swap-chin image in the post-process. |
![]() | SSAAResolveRenderPass | Gets the GpuRenderPass that is used to resolve the super-sampled (SSAA) image to the final image. |
![]() | Statistics | Gets the RenderingStatistics that was taken during the rendering of the last frame. To enable collecting statistics set the IsCollectingStatistics to true. When no statistics is collected, then this property is set to null. |
![]() | SupersamplingCount | SupersamplingCount gets the super-sampling count (SSAA) that is used by this SceneView. This value can be set when calling Initialize method or after the SceneView is initialized by calling the Resize method. Default value is 1 (no super-sampling). See remarks for more info. |
![]() | SupersamplingFactor | Gets the factor by which width and height are multiplied because of the SupersamplingCount, for example when SupersamplingCount is 4, then SupersamplingFactor is 2 because width and height are multiplied by 2. Default value is 1 (no super-sampling). |
![]() | Surface | Gets the Vulkan surface that will show the rendered SceneView. Set to SurfaceKHR.Null when no surface is used. |
![]() | SurfaceDetails | Gets SurfaceDetails of the used Surface. |
![]() | SwapChain | Gets the GpuSwapChain |
![]() | SwapChainFormat | Gets the format of the SwapChain. To get format as a StandardBitmapFormats enum value, get the Format property. |
![]() | SwapChainImagesCount | Gets the number of used swap chain images. |
![]() | UsedMultiSampleCount | Obsolete. |
![]() | UsedMultiSampleCountFlags | Obsolete. |
![]() | UseSurfacePreTransform | Gets or sets a Boolean that specifies if Surface pre-transform is used (view is rendered with the same rotation as the surface). |
![]() | ViewRotation | Gets or sets rotation of the view (sometimes also called view pre-transform). |
![]() | WaitForVSync | Gets or sets a Boolean that specifies if the SceneView is waiting for a v-sync provided by the surface. Default value is true. |
![]() | Width | Gets the final width in pixels of the texture that is shown by this SceneView. In case when SupersamplingCount is more than 1, then the width of the texture that is used for rendering is by SupersamplingFactor factor bigger than the value of this property (see RenderWidth). The super-scaled texture is then down-sampled to this width. |
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. |
![]() | CaptureNextFrame | CaptureNextFrame 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. To check if capture is available, call IsCaptureFrameAvailable method. |
![]() | CaptureNextFrameInRenderDoc | Obsolete. |
![]() | 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)) |
![]() | DisposeBackBuffers | Disposes the back buffers that are used as render targets in this SceneView. This sets BackBuffersInitialized to false. |
![]() | 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(ListRayHitTestResult, Ray, HitTestOptions) | GetAllHitObjects method executes a hit testing from the specified Ray on the SceneNodes that are shown by this SceneView and adds the hit objects to the specified allHitResults (as List{RayHitTestResult}). Hit objects are added in order from the closest to the farthest object. |
![]() | GetAllHitObjects(Ray, SceneNode, HitTestOptions) | GetAllHitObjects method executes a hit testing by using the specified Ray on the SceneNodes that are children of the specified rootSceneNode. The method 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(ListRayHitTestResult, Ray, SceneNode, HitTestOptions) | GetAllHitObjects method executes a hit testing by using the specified Ray on the SceneNodes that are children of the specified rootSceneNode. The hit objects are added to the specified allHitResults (as List{RayHitTestResult}). Hit objects are added in order from the closest to the farthest object. |
![]() | 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. |
![]() | GetAllHitObjects(ListRayHitTestResult, 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 adds the hit objects to the specified allHitResults (as List{RayHitTestResult}). Hit objects are added in order from the closest to the farthest object. |
![]() | GetAllHitObjects(ListRayHitTestResult, Single, Single, SceneNode, Boolean, HitTestOptions) | GetAllHitObjects method executes a hit testing from the specified x and y positions on the SceneNodes that are children of the specified rootSceneNode. The hit objects are added to the specified allHitResults (as List{RayHitTestResult}). Hit objects are added in order from the closest to the farthest object. |
![]() | 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. The size information is obtained from the surface's current extent. When the current extent does not define size (for example, this seems to be the case with Silk.NET under Linux with Wayland), the fallback width and height are used, if they are supplied by the caller (Initialize and Resize methods), who would typically obtain them from the windowing/presentation framework. If fallback dimensions are not provided (their values are 0), the existing scene view dimensions are used. |
![]() | 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) | 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) | 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(Int32, Int32, Boolean, Boolean) | Obsolete. |
![]() | GetRayFromCamera(Single, Single, Boolean, Boolean) | Obsolete. |
![]() | GetRayFromNearPlane(Int32, Int32, 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) | 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(Int32, Int32, Boolean, Boolean) | Obsolete. |
![]() | GetRayFromNearPlane(Single, Single, Boolean, Boolean) | Obsolete. |
![]() | 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, then 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(Int32, Int32, Single, Single, Int32, Single) | Initializes the SceneView with the specified size. This method can be called only when the SceneView was created without a Surface parameter. |
![]() | Initialize(SurfaceKHR, Single, Single, Int32, Single, Int32, Int32) | Initializes the SceneView with the size from the specified Vulkan Surface. If the surface does not provide size information (for example, when using Silk.NET under Wayland on Linux), the optionally-provided fallback width and height are used as fallback dimensions. These fallback values should be obtained (by the caller) from the presentation/windowing framework. If the surface provides size information, fallback dimensions are ignored. Optionally it is possible to set the DPI scale because that data is not available from the surface. |
![]() | Initialize(VulkanDevice, Int32, Int32, Single, Single, Int32, Single) | Initializes the SceneView with the specified size and GpuDevice. This method can be called only when the SceneView was created without a Surface parameter. |
![]() | Initialize(VulkanSurfaceProvider, Single, Single, Int32, Single, Int32, Int32) | Initializes the SceneView with the size from the specified vulkanSurfaceProvider that can return a Vulkan Surface. If the surface does not provide size information (for example, when using Silk.NET under Wayland on Linux), the optionally-provided fallback width and height are used as fallback dimensions. These fallback values should be obtained (by the caller) from the presentation/windowing framework. If the surface provides size information, fallback dimensions are ignored. Optionally it is possible to set the DPI scale because that data is not available from the surface. |
![]() | Initialize(VulkanDevice, VulkanSurfaceProvider, Single, Single, Int32, Single, Int32, Int32) | Initializes the SceneView with the size from the specified vulkanSurfaceProvider that can return a Vulkan Surface. If the surface does not provide size information (for example, when using Silk.NET under Wayland on Linux), the optionally-provided fallback width and height are used as fallback dimensions. These fallback values should be obtained (by the caller) from the presentation/windowing framework. If the surface provides size information, fallback dimensions are ignored. Optionally it is possible to set the DPI scale because that data is not available from the surface. |
![]() | Initialize(VulkanDevice, SurfaceKHR, Single, Single, Int32, Single, Int32, Int32) | Initializes the SceneView with the size from the specified Vulkan Surface. If the surface does not provide size information (for example, when using Silk.NET under Wayland on Linux), the optionally-provided fallback width and height are used as fallback dimensions. These fallback values should be obtained (by the caller) from the presentation/windowing framework. If the surface provides size information, fallback dimensions are ignored. 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. If the surface does not provide size information (for example, when using Silk.NET under Wayland on Linux), the optionally-provided fallback width and height are used as fallback dimensions. These fallback values should be obtained (by the caller) from the presentation/windowing framework. If the surface provides size information, fallback dimensions are ignored. Optionally it is possible to set the DPI scale because that data is not available from the surface. |
![]() | IsCaptureFrameAvailable | Returns true when capture is available (when the application was started from the RenderDoc). Capture can be performance by calling CaptureNextFrame method. |
![]() | IsFrameRenderingFinished | Returns true if the frame with the specified number was fully rendered (no tasks on the GPU are still running for this frame). |
![]() | 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. |
![]() | OnBackBuffersCreated | OnBackBuffersCreated |
![]() | 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). To render to a different size or different multi-sample or super-sampling count, create a new SceneView and call RenderToGpuBuffer there. |
![]() | RenderToGpuImage | Renders the current scene view to the bitmap and saves the image data a GpuImage that is passed to the specified stagingGpuImageReady Action. To render to a different size or different multi-sample or super-sampling count, create a new SceneView and call RenderToGpuImage there. |
![]() | 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. To render to a different size or different multi-sample or super-sampling count, create a new SceneView and call RenderToRawImageData there. |
![]() | 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. To render to a different size or different multi-sample or super-sampling count, create a new SceneView and call RenderToRawImageData there. |
![]() | Resize(Boolean) | Resizes the SceneView by updating the size to the size of the Surface. When no Surface is used, then Resize(Int32, Int32, Int32, Single, SurfaceTransformFlagsKHR, Boolean) must be used. This method does not support supplying fallback dimensions for situations when the surface does not provide size information (for example, when using Silk.NET under Wayland on Linux). Therefore, Resize(Int32, Int32, Int32, Single, SurfaceTransformFlagsKHR, Boolean) should be used instead, with fallback dimensions (obtained from the presentation/windowing framework) passed as the new width and height (if fallback dimensions are unavailable, they can be set to 0). |
![]() | Resize(Int32, Int32, Boolean) | Resizes the SceneView. When the SceneView is not rendered to a Surface, it is directly resized to the specified size. When the SceneView is rendered to a Surface and the surface provides size information, the latter is used and the provided dimensions are ignored. However, if the surface does not provide size information, the provided dimensions are used as a fallback. This allows caller to accommodate situations when rendering to a surface that does not provide size information (e.g., using Silk.NET under Wayland on Linux). |
![]() | Resize(Int32, Int32, Int32, Single, SurfaceTransformFlagsKHR, Boolean) | Resizes the SceneView. When the SceneView is not rendered to a Surface, it is directly resized to the specified size. When the SceneView is rendered to a Surface and the surface provides size information, the size from the surface is used and the provided dimensions are ignored. However, if the surface does not provide size information, the provided dimensions are used as a fallback. This allows caller to accommodate situations when rendering to a surface that does not provide size information (e.g., using Silk.NET under Wayland on Linux). |
![]() | 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. |
![]() | UpdateCustomSceneDescriptorSet | |
![]() | WaitUntilRendered | WaitUntilRendered method waits until this SceneView finishes rendering the current frame. |
Name | Description | |
---|---|---|
![]() | BackBuffersCreated | BackBuffersCreated is triggered when the back buffers for this SceneView are created (after initialize or after resize). |
![]() | FirstFrameRendered | SceneRendered is triggered after the first frame is rendered. |
![]() | SceneRendered | SceneRendered is triggered after each frame is rendered. |
![]() | SceneUpdating | SceneUpdating is triggered when the scene is updating. This event should be used to animate or update the scene objects before they are rendered. You must not call Render method from this event handler. |
![]() | ViewResized | ViewResized is triggered when the size (Width and Height) is changed. |
Name | Description | |
---|---|---|
![]() | DirtyFlags | Gets the dirty flags for this SceneView. This value is reset to None when calling Update(Boolean) method. |
![]() ![]() | PresentOnGraphicsQueue | |
![]() ![]() | RequireCommandBuffersRecodingDirtyFlagsBit | When this bit is set in the DirtyFlags, then command buffer needs to be recorded again. |
![]() ![]() | RequireRenderingLayersCreationDirtyFlagsBit | When this bit is set in the DirtyFlags, then the rendering layers need to be regenerated and command buffer needs to be recorded again. |
![]() | SceneDescriptorSets | Scene DescriptorSets |
[Missing <remarks> documentation for "T:Ab4d.SharpEngine.SceneView"]