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. More...

Public Member Functions | |
Database (HPS.Database in_that) | |
virtual void | Dispose () |
Static Public Member Functions | |
static HPS.ApplicationWindowKey | CreateApplicationWindow (IntPtr in_window_handle, HPS.Window.Driver in_driver) |
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. More... | |
static HPS.ApplicationWindowKey | CreateApplicationWindow (IntPtr in_window_handle) |
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. More... | |
static HPS.ApplicationWindowKey | CreateApplicationWindow (IntPtr in_window_handle, HPS.ApplicationWindowOptionsKit in_options) |
Create an application window for the given window handle that Visualize can draw into with the specified options. More... | |
static HPS.EventDispatcher | CreateEventDispatcher () |
Create a new EventDispatcher with a dedicated thread ready to dispatch events to handlers. More... | |
static HPS.EventDispatcher | CreateEventDispatcher (string in_name) |
Create a new EventDispatcher with a dedicated thread ready to dispatch events to handlers. More... | |
static HPS.OffScreenWindowKey | CreateOffScreenWindow (uint in_width, uint in_height, HPS.Window.Driver in_driver) |
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. More... | |
static HPS.OffScreenWindowKey | CreateOffScreenWindow (uint in_width, uint in_height) |
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. More... | |
static HPS.OffScreenWindowKey | CreateOffScreenWindow (uint in_width, uint in_height, HPS.OffScreenWindowOptionsKit in_options) |
Create an offscreen window of the given height and width with the specified options. More... | |
static HPS.OffScreenWindowKey | CreateOffScreenWindow (HPS.ImageDefinition in_destination_image, HPS.Window.Driver in_driver) |
Create an offscreen window with the specified driver. By default, Visualize will try to create an anti-alias capable driver. More... | |
static HPS.OffScreenWindowKey | CreateOffScreenWindow (HPS.ImageDefinition in_destination_image) |
Create an offscreen window with the specified driver. By default, Visualize will try to create an anti-alias capable driver. More... | |
static HPS.OffScreenWindowKey | CreateOffScreenWindow (HPS.ImageDefinition in_destination_image, HPS.OffScreenWindowOptionsKit in_options) |
Create an offscreen window of the given height and width with the specified options. More... | |
static HPS.PortfolioKey | CreatePortfolio () |
Create a new portfolio. More... | |
static HPS.SegmentKey | CreateRootSegment () |
Create a new root segment, i.e., a segment without an owner. More... | |
static HPS.StandAloneWindowKey | CreateStandAloneWindow (HPS.Window.Driver in_driver) |
Create a stand-alone window with the specified driver. By default Visualize will try to create an anti-alias capable driver. More... | |
static HPS.StandAloneWindowKey | CreateStandAloneWindow () |
Create a stand-alone window with the specified driver. By default Visualize will try to create an anti-alias capable driver. More... | |
static HPS.StandAloneWindowKey | CreateStandAloneWindow (HPS.StandAloneWindowOptionsKit in_options) |
Create a stand-alone window with the specified options. More... | |
static void | Execute (bool in_once) |
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. More... | |
static void | Execute () |
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. More... | |
static bool | GetErrorEventFilter (HPS.Info.Code in_code) |
Provides the filter state of an ErrorEvent. More... | |
static HPS.EventDispatcher | GetEventDispatcher () |
Get the event dispatcher associated with the database. All database information, errors and warnings will be injected into this EventDispatcher. More... | |
static bool | GetInformationEventFilter (HPS.Info.Code in_code) |
Provides the filter state of an InformationEvent. More... | |
static HPS.PortfolioKey | 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. More... | |
static HPS.PortfolioKey[] | GetPortfolios () |
Get a list of all portfolios which are active (have been created but not deleted). More... | |
static HPS.SegmentKey[] | GetRootSegments () |
Get a list of all root segments which are active (have been created but not deleted). More... | |
static ulong | GetSoftMemoryLimit () |
Gets the value at which the EmergencyHandler will be activated for SoftMemoryLimit. More... | |
static double | GetTime () |
Queries the number of milliseconds that have elapsed since Visualize started. More... | |
static bool | GetWarningEventFilter (HPS.Info.Code in_code) |
Provides the filter state of a WarningEvents. More... | |
static HPS.WindowKey[] | GetWindowKeys () |
Get a list of all windows (application, stand-alone, and offscreen) which are active (have been created but not deleted). More... | |
static bool | IsDriverAvailable (HPS.Window.Driver in_driver) |
Checks whether the specified driver type is present and available for use. More... | |
static void | RelinquishMemory () |
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 <emphasis>not</emphasis> 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. More... | |
static void | Reset () |
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. More... | |
static ulong | SelectByRay (HPS.Point in_start_point, HPS.Vector in_direction, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
Performs an object space selection by ray starting at the specified segment using the specified selection options. This method can only select faceted geometry. More... | |
static ulong | SelectByShell (HPS.ShellKit in_shell, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
Performs an object space selection by shell starting at the specified segment using the specified selection options. This method can only select faceted geometry. More... | |
static ulong | SelectByShell (HPS.ShellKey in_shell, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
Performs an object space selection by shell starting at the specified segment using the specified selection options. This method can only select faceted geometry. More... | |
static ulong | SelectByVolume (HPS.SimpleCuboid in_volume, HPS.SelectionOptionsKit in_options, out HPS.SelectionResults out_results) |
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. More... | |
static void | SetEmergencyHandler (HPS.EmergencyHandler in_emergency_handler) |
Sets a custom EmergencyHandler. More... | |
static bool | SetErrorEventFilter (HPS.Info.Code in_code, bool in_filtered) |
Sets if a specific code for ErrorEvent should be filtered. More... | |
static bool | SetInformationEventFilter (HPS.Info.Code in_code, bool in_filtered) |
Sets if a specific code for InformationEvent should be filtered. More... | |
static ulong | SetSoftMemoryLimit (ulong in_limit_bytes) |
Sets the value at which the EmergencyHandler will be activated for SoftMemoryLimit. More... | |
static bool | SetWarningEventFilter (HPS.Info.Code in_code, bool in_filtered) |
Sets if a specific code for WarningEvent should be filtered. More... | |
static void | ShowMemoryUsage (out ulong out_allocated, out ulong out_used) |
Returns information about system memory usage. More... | |
static void | Sleep (double milliseconds) |
Sleep for the number of milliseconds requested. More... | |
static void | Synchronize () |
Synchronizes the database, guaranteeing that all queued actions and updates have been performed. More... | |
static void | UnsetEmergencyHandler () |
Sets the default EmergencyHandler. More... | |
Protected Member Functions | |
virtual void | deleteCptr () |
Protected Attributes | |
bool | cMemOwn |
HandleRef | cptr |
Detailed Description
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.
Member Function Documentation
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
Create a new EventDispatcher with a dedicated thread ready to dispatch events to handlers.
- Returns
- A new EventDispatcher.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
Create a new portfolio.
- Returns
- A new portfolio key.
|
inlinestatic |
Create a new root segment, i.e., a segment without an owner.
- Returns
- A new root segment key.
|
inlinestatic |
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.
- Returns
- An stand-alone window key using the specified driver.
|
inlinestatic |
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.
|
inlinestatic |
Create a stand-alone window with the specified options.
- Parameters
-
in_options Options for the stand-alone window.
- Returns
- An stand-alone window key using the specified options.
|
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.
|
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.
|
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.
|
inlinestatic |
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.
|
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.
|
inlinestatic |
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.
|
inlinestatic |
Get a list of all portfolios which are active (have been created but not deleted).
- Returns
- List of all currently active portfolios.
|
inlinestatic |
Get a list of all root segments which are active (have been created but not deleted).
- Returns
- List of all currently active root segments.
|
inlinestatic |
Gets the value at which the EmergencyHandler will be activated for SoftMemoryLimit.
- Returns
- The current value in bytes.
|
inlinestatic |
Queries the number of milliseconds that have elapsed since Visualize started.
- Returns
- The number of milliseconds that have elapsed since Visualize started.
|
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
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 <emphasis>not</emphasis> 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.
|
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
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.
|
inlinestatic |
Sets a custom EmergencyHandler.
- Parameters
-
in_emergency_handler The EmergencyHandler to use.
|
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.
|
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.
|
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.
|
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.
|
inlinestatic |
Returns information about system memory usage.
|
inlinestatic |
Sleep for the number of milliseconds requested.
|
inlinestatic |
Synchronizes the database, guaranteeing that all queued actions and updates have been performed.
|
inlinestatic |
Sets the default EmergencyHandler.
The documentation for this class was generated from the following file:
- internals/hps_core/source/cs/HPS.Database.cs