Overlay | |
public abstract class OverlayPanelBase : ComponentBase, IDisposable
The OverlayPanelBase type exposes the following members.
| Name | Description | |
|---|---|---|
| OverlayPanelBase | Initializes a new overlay panel. |
| Name | Description | |
|---|---|---|
| Alignment | Gets the alignment of the panel relative to the parent SceneView. | |
| BackgroundColor | Gets the background color of the panel. A transparent color (default) means that rendering should preserve the parent SceneView color behind the panel. | |
| Height | Gets height of the panel. | |
| overlayScene | Gets the scene that contains objects rendered by this overlay panel. | |
| overlaySceneView | Gets the SceneView that renders objects defined in overlayScene. | |
| ParentSceneView | Gets the parent SceneView that displays this overlay panel. | |
| Position | Gets the position offset. Note that the actual position is also determined from Alignment. | |
| subscribedCamera | ||
| Width | Gets the width of the panel. |
| Name | Description | |
|---|---|---|
| Dispose | Disposes the resources | |
| Dispose(Boolean) |
Releases unmanaged and managed resources (when disposing is true).
This method may be called only from the CheckAndDispose(Boolean) method and must not be called manually by the user.
(Overrides ComponentBaseDispose(Boolean)) | |
| GetPanelViewport | Gets the position and size of this overlay panel in the parentSceneView. | |
| GetPanelViewport(Boolean, Boolean) | Gets the position and size of this overlay panel in the parentSceneView. | |
| GetSceneViewSize | ||
| NotifyOverlayPanelChanged | Sets OverlayPanelChanged dirty flag in the ParentSceneView. This will request another frame rendering with another recording of command buffers. | |
| NotifyOverlayPanelUpdated | Sets OverlayPanelUpdated dirty flag in the ParentSceneView. This will request another frame rendering without another recording of command buffers. | |
| NotifySizeOrPositionChanged | Sets OverlayPanelChanged dirty flag in the ParentSceneView and also update the size in the next render pass. | |
| OnCameraChanged | ||
| OnCreateCamera | OnCreateCamera method can be overridden in a derived class to create a custom camera. This method by default creates a TargetPositionCamera with Heading and Attitude set to 0 and Distance and ViewWidth to 100. | |
| OnCreateLights | OnCreateLights method can be overridden to provide custom lights in the scene. If the method is called, then a 30% ambient light is set. | |
| OnCreateScene | OnCreateScene method can be overriden in the derived class to create the 3D objects that are rendered by this overlay panel. To use async method the derived class can also override OnCreateSceneAsync(Scene) method. | |
| OnCreateSceneAsync | OnCreateSceneAsync method can be overriden in the derived class to create the 3D objects that are rendered by this overlay panel. To use async method the derived class can also override OnCreateSceneAsync(Scene) method. | |
| OnInitializeDeviceResources | Initializes resources with the specified GpuDevice. This method can be overriden and is called from InitializeDeviceResources(VulkanDevice) method. | |
| SetAlignment | Sets the Alignment value. | |
| SetBackgroundColor | Sets the BackgroundColor value. | |
| SetHeight | Sets the Height value. | |
| SetPosition | Sets the Position value. | |
| SetWidth | Sets the Width value. | |
| SubscribeCameraChanged | ||
| UnsubscribeCameraChanged | ||
| Update | ||
| Update(SceneDirtyFlags, SceneViewDirtyFlags) | Updates common panel state. Derived classes can override this method to update scene objects or the overlay camera. |
| Name | Description | |
|---|---|---|
| AdjustSizeByDpiScale | ||
| IsUsingSprites | ||
| overlayCamera | Gets the camera used to render overlayScene. The value is available after initialization. | |
| overlayTargetPositionCamera | Gets the camera that shows the objects in this overlay panel and is cased to a TargetPositionCamera. If the camera is not TargetPositionCamera then this field is null. |
Base class for panels that render a separate scene as an overlay over a parent SceneView.
The objects that are defined in the OverlayPanelBase's Scene can be shown in parentSceneView in two different ways:
Rendered by using RenderOverlayPanels after 3D objects in parentSceneView are rendered. This is the default and the fastest option because the rendering process does not need to wait until object in overlay panel are rendered.
When OverlayPanelBase is created by setting isUsingSprites to true, then the 3D objects in this OverlayPanelBase are rendered to a separate GpuImage and then shown in the parentSceneView as a sprite. This requires waiting until the rendering of the overlay panel is finished before the sprite can be drawn.
The derived class should call OnCreateScene(Scene) or OnCreateSceneAsync(Scene) to define the 3D objects that are rendered by this overlay panel.