|
static HPS.ApplicationWindowKey | CreateApplicationWindow (IntPtr in_window_handle, HPS.Window.Driver in_driver) |
|
static HPS.ApplicationWindowKey | CreateApplicationWindow (IntPtr in_window_handle) |
|
static HPS.ApplicationWindowKey | CreateApplicationWindow (IntPtr in_window_handle, HPS.ApplicationWindowOptionsKit in_options) |
|
static HPS.EventDispatcher | CreateEventDispatcher () |
|
static HPS.EventDispatcher | CreateEventDispatcher (string in_name) |
|
static HPS.OffScreenWindowKey | CreateOffScreenWindow (uint in_width, uint in_height, HPS.Window.Driver in_driver) |
|
static HPS.OffScreenWindowKey | CreateOffScreenWindow (uint in_width, uint in_height) |
|
static HPS.OffScreenWindowKey | CreateOffScreenWindow (uint in_width, uint in_height, HPS.OffScreenWindowOptionsKit in_options) |
|
static HPS.OffScreenWindowKey | CreateOffScreenWindow (HPS.ImageDefinition in_destination_image, HPS.Window.Driver in_driver) |
|
static HPS.OffScreenWindowKey | CreateOffScreenWindow (HPS.ImageDefinition in_destination_image) |
|
static HPS.OffScreenWindowKey | CreateOffScreenWindow (HPS.ImageDefinition in_destination_image, HPS.OffScreenWindowOptionsKit in_options) |
|
static HPS.PortfolioKey | CreatePortfolio () |
|
static HPS.SegmentKey | CreateRootSegment () |
|
static HPS.StandAloneWindowKey | CreateStandAloneWindow (HPS.Window.Driver in_driver) |
|
static HPS.StandAloneWindowKey | CreateStandAloneWindow () |
|
static HPS.StandAloneWindowKey | CreateStandAloneWindow (HPS.StandAloneWindowOptionsKit in_options) |
|
static void | Execute (bool in_once) |
|
static void | Execute () |
|
static bool | GetErrorEventFilter (HPS.Info.Code in_code) |
|
static HPS.EventDispatcher | GetEventDispatcher () |
|
static bool | GetInformationEventFilter (HPS.Info.Code in_code) |
|
static HPS.PortfolioKey | GetMaterialLibraryPortfolio () |
|
static ulong | GetOOCMemoryLimit () |
|
static HPS.PortfolioKey [] | GetPortfolios () |
|
static HPS.SegmentKey [] | GetRootSegments () |
|
static ulong | GetSoftMemoryLimit () |
|
static double | GetTime () |
|
static bool | GetWarningEventFilter (HPS.Info.Code in_code) |
|
static HPS.WindowKey [] | GetWindowKeys () |
|
static bool | IsDriverAvailable (HPS.Window.Driver in_driver) |
|
static void | RelinquishMemory () |
|
static void | Reset () |
|
static ulong | SelectByRay (HPS.Point in_start_point, HPS.Vector in_direction, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
|
static ulong | SelectByShell (HPS.ShellKit in_shell, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
|
static ulong | SelectByShell (HPS.ShellKey in_shell, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
|
static ulong | SelectByVolume (HPS.SimpleCuboid in_volume, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
|
static void | SetEmergencyHandler (HPS.EmergencyHandler in_emergency_handler) |
|
static bool | SetErrorEventFilter (HPS.Info.Code in_code, bool in_filtered) |
|
static bool | SetInformationEventFilter (HPS.Info.Code in_code, bool in_filtered) |
|
static ulong | SetOOCMemoryLimit (ulong in_limit_bytes) |
|
static ulong | SetSoftMemoryLimit (ulong in_limit_bytes) |
|
static bool | SetWarningEventFilter (HPS.Info.Code in_code, bool in_filtered) |
|
static bool | ShowAvailableGPUs (out string[] out_available_gpus) |
|
static void | ShowMemoryUsage (out ulong out_allocated, out ulong out_used) |
|
static void | Sleep (double milliseconds) |
|
static void | Synchronize () |
|
static void | UnsetEmergencyHandler () |
|
|
virtual void | deleteCptr () |
|
|
bool | cMemOwn |
|
HandleRef | cptr |
|
The Database class is a special type that is never intended to be instantiated. It contains static functions for creating top-level database objects as well as performing global queries and actions.
◆ CreateApplicationWindow() [1/3]
Create an application window for the given window handle that Visualize can draw into with the specified driver. By default Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_window_handle | Handle to the window that Visualize will draw into. |
in_driver | Type of driver Visualize should create. Defaults to Window.Driver.Default3D. |
- Returns
- An application window key corresponding to the given handle using the specified driver.
◆ CreateApplicationWindow() [2/3]
Create an application window for the given window handle that Visualize can draw into with the specified driver. By default Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_window_handle | Handle to the window that Visualize will draw into. |
- Returns
- An application window key corresponding to the given handle using the specified driver.
◆ CreateApplicationWindow() [3/3]
Create an application window for the given window handle that Visualize can draw into with the specified options.
- Parameters
-
in_window_handle | Handle to the window that Visualize will draw into. |
in_options | Options for the application window. |
- Returns
- An application window key corresponding to the given handle using the specified options.
◆ CreateEventDispatcher() [1/2]
◆ CreateEventDispatcher() [2/2]
Create a new EventDispatcher with a dedicated thread ready to dispatch events to handlers.
- Parameters
-
in_name | A specific name for the new dispatcher. |
- Returns
- A new EventDispatcher.
◆ CreateOffScreenWindow() [1/6]
Create an offscreen window of the given height and width with the specified driver. By default Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_width | Width of the offscreen window in pixels. |
in_height | Height of the offscreen window in pixels. |
in_driver | Type of driver Visualize should create. Defaults to Window.Driver.Default3D. |
- Returns
- An offscreen window key of the specified size using the specified driver.
◆ CreateOffScreenWindow() [2/6]
Create an offscreen window of the given height and width with the specified driver. By default Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_width | Width of the offscreen window in pixels. |
in_height | Height of the offscreen window in pixels. |
- Returns
- An offscreen window key of the specified size using the specified driver.
◆ CreateOffScreenWindow() [3/6]
Create an offscreen window of the given height and width with the specified options.
- Parameters
-
in_width | Width of the offscreen window in pixels. |
in_height | Height of the offscreen window in pixels. |
in_options | Options for the offscreen window. |
- Returns
- An offscreen window key of the specified size using the specified options.
◆ CreateOffScreenWindow() [4/6]
Create an offscreen window with the specified driver. By default, Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_destination_image | An RGB or RGBA image definition that the offscreen window will be rendered to. |
in_driver | Type of driver Visualize should create. Defaults to Window.Driver.Default3D. |
- Returns
- An offscreen window key of the specified size using the specified driver.
◆ CreateOffScreenWindow() [5/6]
Create an offscreen window with the specified driver. By default, Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_destination_image | An RGB or RGBA image definition that the offscreen window will be rendered to. |
- Returns
- An offscreen window key of the specified size using the specified driver.
◆ CreateOffScreenWindow() [6/6]
Create an offscreen window of the given height and width with the specified options.
- Parameters
-
in_destination_image | An RGB or RGBA image definition that the offscreen window will be rendered to. |
in_options | Options for the offscreen window. |
- Returns
- An offscreen window key of the specified size using the specified options.
◆ CreatePortfolio()
Create a new portfolio.
- Returns
- A new portfolio key.
◆ CreateRootSegment()
Create a new root segment, i.e., a segment without an owner.
- Returns
- A new root segment key.
◆ CreateStandAloneWindow() [1/3]
Create a stand-alone window with the specified driver. By default Visualize will try to create an anti-alias capable driver.
- Parameters
-
in_driver | Type of driver Visualize should create. Defaults to Window.Driver.Default3D. Standalone windows are not supported on Android, iOS, or macOS as all GUI / windowing is controlled at the application level. |
- Returns
- An stand-alone window key using the specified driver.
◆ CreateStandAloneWindow() [2/3]
Create a stand-alone window with the specified driver. By default Visualize will try to create an anti-alias capable driver.
- Returns
- An stand-alone window key using the specified driver.
◆ CreateStandAloneWindow() [3/3]
Create a stand-alone window with the specified options.
- Parameters
-
in_options | Options for the stand-alone window. Standalone windows are not supported on Android, iOS, or macOS as all GUI / windowing is controlled at the application level. |
- Returns
- An stand-alone window key using the specified options.
◆ Execute() [1/2]
static void HPS.Database.Execute |
( |
bool |
in_once | ) |
|
|
inlinestatic |
This function will pump the stand-alone window event system once by default. If once is false then the calling thread will loop pumping events and will only return when the last window of any type exits.
- Parameters
-
in_once | determines if the stand-alone events are pumped once or forever. |
◆ Execute() [2/2]
static void HPS.Database.Execute |
( |
| ) |
|
|
inlinestatic |
This function will pump the stand-alone window event system once by default. If once is false then the calling thread will loop pumping events and will only return when the last window of any type exits.
◆ GetErrorEventFilter()
static bool HPS.Database.GetErrorEventFilter |
( |
HPS.Info.Code |
in_code | ) |
|
|
inlinestatic |
Provides the filter state of an ErrorEvent.
- Parameters
-
in_code | The info code in to operate on. |
- Returns
- If the specified code is filtered.
◆ GetEventDispatcher()
Get the event dispatcher associated with the database. All database information, errors and warnings will be injected into this EventDispatcher.
- Returns
- The event dispatcher associated with the database.
◆ GetInformationEventFilter()
static bool HPS.Database.GetInformationEventFilter |
( |
HPS.Info.Code |
in_code | ) |
|
|
inlinestatic |
Provides the filter state of an InformationEvent.
- Parameters
-
in_code | The info code in to operate on. |
- Returns
- If the specified code is filtered.
◆ GetMaterialLibraryPortfolio()
Get the material library portfolio. This is the portfolio which contains all relevant definitions for materials coming from the material library. It is provided to facilitate importing definitions from this portfolio, or to allow examination of the definitions in the portfolio. It should not be deleted, and if it is, the scene will not render correctly if a file was loaded which depended on the material library.
- Returns
- The material library portfolio.
◆ GetOOCMemoryLimit()
static ulong HPS.Database.GetOOCMemoryLimit |
( |
| ) |
|
|
inlinestatic |
Gets the byte limit used for OOC file loading.
- Returns
- The current value in bytes.
◆ GetPortfolios()
Get a list of all portfolios which are active (have been created but not deleted).
- Returns
- List of all currently active portfolios.
◆ GetRootSegments()
Get a list of all root segments which are active (have been created but not deleted).
- Returns
- List of all currently active root segments.
◆ GetSoftMemoryLimit()
static ulong HPS.Database.GetSoftMemoryLimit |
( |
| ) |
|
|
inlinestatic |
Gets the value at which the EmergencyHandler will be activated for SoftMemoryLimit.
- Returns
- The current value in bytes.
◆ GetTime()
static double HPS.Database.GetTime |
( |
| ) |
|
|
inlinestatic |
Queries the number of milliseconds that have elapsed since Visualize started.
- Returns
- The number of milliseconds that have elapsed since Visualize started.
◆ GetWarningEventFilter()
static bool HPS.Database.GetWarningEventFilter |
( |
HPS.Info.Code |
in_code | ) |
|
|
inlinestatic |
Provides the filter state of a WarningEvents.
- Parameters
-
in_code | The info code in to operate on. |
- Returns
- If the specified code is filtered.
◆ GetWindowKeys()
Get a list of all windows (application, stand-alone, and offscreen) which are active (have been created but not deleted).
- Returns
- List of all currently active windows.
◆ IsDriverAvailable()
Checks whether the specified driver type is present and available for use.
- Parameters
-
in_driver | the driver type to check availability for. |
- Returns
- Whether the driver is available or not.
◆ RelinquishMemory()
static void HPS.Database.RelinquishMemory |
( |
| ) |
|
|
inlinestatic |
Relinquish any internally cached memory to the system. This can reduce performance and stability if overused. If your application inserts or removes items from the Visualize database continuously, this function should not be used, even as a means of 'obtaining more memory' for the application. Otherwise, Visualize will simply allocate more memory from the operating system. This is slower than using its built in memory manager to allocate from its currently available memory pool. However, if you have a case where database interactions have perhaps reached a point of stabilization (for example, a model is loaded and has been interacted with already, and no other operations are going to incur extra memory usage), this function could prove useful by having Visualize free up its unused portion of allocated memory. This function should generally not be called on 32-bit Windows operating systems, because it can significantly shorten the life of an application. When memory is freed back to the system on 32-bit Windows, the real memory gets freed and defragmented by the OS, but the virtual address space does not. If an application keeps allocating and freeing system memory during its lifetime, memory will run out due to the address space fragmentation, even though physical memory might still be available. While 64-bit systems do not have the 'virtual address space fragmentation' issue, you typically should avoid calling this method, and rely on Visualize to manage its allocated memory during the lifetime of your application. Note that you can track Visualize's current memory usage by calling HPS.Database.ShowMemoryUsage.
◆ Reset()
static void HPS.Database.Reset |
( |
| ) |
|
|
inlinestatic |
Performs a complete reset of the Visualize database. All segments are deleted and all window displays are terminated. This will leave all keys, controls, and dispatchers invalid. Kits are preserved. This can never be called from inside an event handler. It may be appropriate to call this method if your application doesn't need to use Visualize for a while.
◆ SelectByRay()
Performs an object space selection by ray starting at the specified segment using the specified selection options. This method can only select faceted geometry.
- Parameters
-
in_start_point | Start point of ray. |
in_direction | Direction vector for ray. |
in_options | Selection options to use when performing the selection. |
out_results | Results of the selection. |
- Returns
- Number of selected items.
◆ SelectByShell() [1/2]
Performs an object space selection by shell starting at the specified segment using the specified selection options. This method can only select faceted geometry.
- Parameters
-
in_shell | Shell to use to perform the selection. |
in_options | Selection options to use when performing the selection. |
out_results | Results of the selection. |
- Returns
- Number of selected items.
◆ SelectByShell() [2/2]
Performs an object space selection by shell starting at the specified segment using the specified selection options. This method can only select faceted geometry.
- Parameters
-
in_shell | Shell in the database to use to perform the selection. |
in_options | Selection options to use when performing the selection. |
out_results | Results of the selection. |
- Returns
- Number of selected items.
◆ SelectByVolume()
Performs an object space selection by volume starting at the specified segment using the specified selection options. If the volume is invalid, i.e., min > max for any component, an exception will be thrown.
- Parameters
-
in_volume | Volume to use when performing the selection. |
in_options | Selection options to use when performing the selection. |
out_results | Results of the selection. |
- Returns
- Number of selected items.
◆ SetEmergencyHandler()
◆ SetErrorEventFilter()
static bool HPS.Database.SetErrorEventFilter |
( |
HPS.Info.Code |
in_code, |
|
|
bool |
in_filtered |
|
) |
| |
|
inlinestatic |
Sets if a specific code for ErrorEvent should be filtered.
- Parameters
-
in_code | The info code in to operate on. |
in_filtered | The new filter state desired. |
- Returns
- The old value for the specified code.
◆ SetInformationEventFilter()
static bool HPS.Database.SetInformationEventFilter |
( |
HPS.Info.Code |
in_code, |
|
|
bool |
in_filtered |
|
) |
| |
|
inlinestatic |
Sets if a specific code for InformationEvent should be filtered.
- Parameters
-
in_code | The info code in to operate on. |
in_filtered | The new filter state desired. |
- Returns
- The old value for the specified code.
◆ SetOOCMemoryLimit()
static ulong HPS.Database.SetOOCMemoryLimit |
( |
ulong |
in_limit_bytes | ) |
|
|
inlinestatic |
Sets the byte limit used for OOC file loading. A limit of zero bytes restores the default value.
- Parameters
-
in_limit_bytes | The new limit value in bytes. |
- Returns
- The old value in bytes.
◆ SetSoftMemoryLimit()
static ulong HPS.Database.SetSoftMemoryLimit |
( |
ulong |
in_limit_bytes | ) |
|
|
inlinestatic |
Sets the value at which the EmergencyHandler will be activated for SoftMemoryLimit.
- Parameters
-
in_limit_bytes | The new limit value in bytes. |
- Returns
- The old value in bytes.
◆ SetWarningEventFilter()
static bool HPS.Database.SetWarningEventFilter |
( |
HPS.Info.Code |
in_code, |
|
|
bool |
in_filtered |
|
) |
| |
|
inlinestatic |
Sets if a specific code for WarningEvent should be filtered.
- Parameters
-
in_code | The info code in to operate on. |
in_filtered | The new filter state desired. |
- Returns
- The old value for the specified code.
◆ ShowAvailableGPUs()
static bool HPS.Database.ShowAvailableGPUs |
( |
out string [] |
out_available_gpus | ) |
|
|
inlinestatic |
Returns a list of the names of the GPUs available on the system. This function is only available if DirectX11 is supported on your device. If DirectX11 is not supported the function will return false and out_available_gpus will be empty.
- Parameters
-
out_available_gpus | the names of the GPU available on the system. |
- Returns
- Whether Visualize could obtain a list of available GPUs.
◆ ShowMemoryUsage()
static void HPS.Database.ShowMemoryUsage |
( |
out ulong |
out_allocated, |
|
|
out ulong |
out_used |
|
) |
| |
|
inlinestatic |
Returns information about system memory usage. It may be useful to know how much memory Visualize is using to store graphical information. Visualize utilizes its own internal memory manager. It generally allocates memory in large chunks from the operating system, then parcels the chunks out as needed by the database. Upon entity deletion, Visualize will keep some cached information, as well as the chunks of memory associated with the deleted items, effectively 'recycling' them. Allocated memory indicates the total size of all chunks; used memory indicates the amount that's currently parceled out. The memory usage information is also useful during debugging - you might be able to use it to determine if your program (or perhaps Visualize) is "leaking" memory - for example, not cleaning up the segment tree properly after a procedure is finished. Some changes and deletions in the database might cause immediate changes in the memory usage statistics, while others might be delayed until after the next update. Because of the nature of Visualize's built-in memory allocation methods, only a call to HPS.Database.RelinquishMemory or HPS.Database.Reset can clean up memory that has been allocated but not used and return it to the operating system. However, HPS.Database.RelinquishMemory should be used with care, so be sure to review the documentation.
- Parameters
-
out_allocated | Total bytes currently allocated from the OS. |
out_used | Total bytes currently in use by the database. |
◆ Sleep()
static void HPS.Database.Sleep |
( |
double |
milliseconds | ) |
|
|
inlinestatic |
Sleep for the number of milliseconds requested.
◆ Synchronize()
static void HPS.Database.Synchronize |
( |
| ) |
|
|
inlinestatic |
Synchronizes the database, guaranteeing that all queued actions and updates have been performed.
◆ UnsetEmergencyHandler()
static void HPS.Database.UnsetEmergencyHandler |
( |
| ) |
|
|
inlinestatic |
The documentation for this class was generated from the following file:
- internals/hps_core/source/cs/HPS.Database.cs