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

Inheritance diagram for HPS.Database:

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

static HPS.ApplicationWindowKey HPS.Database.CreateApplicationWindow ( IntPtr  in_window_handle,
HPS.Window.Driver  in_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_handleHandle to the window that Visualize will draw into.
in_driverType of driver Visualize should create. Defaults to Window.Driver.Default3D.
Returns
An application window key corresponding to the given handle using the specified driver.
static HPS.ApplicationWindowKey HPS.Database.CreateApplicationWindow ( IntPtr  in_window_handle)
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_handleHandle to the window that Visualize will draw into.
Returns
An application window key corresponding to the given handle using the specified driver.
static HPS.ApplicationWindowKey HPS.Database.CreateApplicationWindow ( IntPtr  in_window_handle,
HPS.ApplicationWindowOptionsKit  in_options 
)
inlinestatic

Create an application window for the given window handle that Visualize can draw into with the specified options.

Parameters
in_window_handleHandle to the window that Visualize will draw into.
in_optionsOptions for the application window.
Returns
An application window key corresponding to the given handle using the specified options.
static HPS.EventDispatcher HPS.Database.CreateEventDispatcher ( )
inlinestatic

Create a new EventDispatcher with a dedicated thread ready to dispatch events to handlers.

Returns
A new EventDispatcher.
static HPS.EventDispatcher HPS.Database.CreateEventDispatcher ( string  in_name)
inlinestatic

Create a new EventDispatcher with a dedicated thread ready to dispatch events to handlers.

Parameters
in_nameA specific name for the new dispatcher.
Returns
A new EventDispatcher.
static HPS.OffScreenWindowKey HPS.Database.CreateOffScreenWindow ( uint  in_width,
uint  in_height,
HPS.Window.Driver  in_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_widthWidth of the offscreen window in pixels.
in_heightHeight of the offscreen window in pixels.
in_driverType of driver Visualize should create. Defaults to Window.Driver.Default3D.
Returns
An offscreen window key of the specified size using the specified driver.
static HPS.OffScreenWindowKey HPS.Database.CreateOffScreenWindow ( uint  in_width,
uint  in_height 
)
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_widthWidth of the offscreen window in pixels.
in_heightHeight of the offscreen window in pixels.
Returns
An offscreen window key of the specified size using the specified driver.
static HPS.OffScreenWindowKey HPS.Database.CreateOffScreenWindow ( uint  in_width,
uint  in_height,
HPS.OffScreenWindowOptionsKit  in_options 
)
inlinestatic

Create an offscreen window of the given height and width with the specified options.

Parameters
in_widthWidth of the offscreen window in pixels.
in_heightHeight of the offscreen window in pixels.
in_optionsOptions for the offscreen window.
Returns
An offscreen window key of the specified size using the specified options.
static HPS.OffScreenWindowKey HPS.Database.CreateOffScreenWindow ( HPS.ImageDefinition  in_destination_image,
HPS.Window.Driver  in_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_imageAn RGB or RGBA image definition that the offscreen window will be rendered to.
in_driverType of driver Visualize should create. Defaults to Window.Driver.Default3D.
Returns
An offscreen window key of the specified size using the specified driver.
static HPS.OffScreenWindowKey HPS.Database.CreateOffScreenWindow ( HPS.ImageDefinition  in_destination_image)
inlinestatic

Create an offscreen window with the specified driver. By default, Visualize will try to create an anti-alias capable driver.

Parameters
in_destination_imageAn 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.
static HPS.OffScreenWindowKey HPS.Database.CreateOffScreenWindow ( HPS.ImageDefinition  in_destination_image,
HPS.OffScreenWindowOptionsKit  in_options 
)
inlinestatic

Create an offscreen window of the given height and width with the specified options.

Parameters
in_destination_imageAn RGB or RGBA image definition that the offscreen window will be rendered to.
in_optionsOptions for the offscreen window.
Returns
An offscreen window key of the specified size using the specified options.
static HPS.PortfolioKey HPS.Database.CreatePortfolio ( )
inlinestatic

Create a new portfolio.

Returns
A new portfolio key.
static HPS.SegmentKey HPS.Database.CreateRootSegment ( )
inlinestatic

Create a new root segment, i.e., a segment without an owner.

Returns
A new root segment key.
static HPS.StandAloneWindowKey HPS.Database.CreateStandAloneWindow ( HPS.Window.Driver  in_driver)
inlinestatic

Create a stand-alone window with the specified driver. By default Visualize will try to create an anti-alias capable driver.

Parameters
in_driverType of driver Visualize should create. Defaults to Window.Driver.Default3D.
Returns
An stand-alone window key using the specified driver.
static HPS.StandAloneWindowKey HPS.Database.CreateStandAloneWindow ( )
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.
static HPS.StandAloneWindowKey HPS.Database.CreateStandAloneWindow ( HPS.StandAloneWindowOptionsKit  in_options)
inlinestatic

Create a stand-alone window with the specified options.

Parameters
in_optionsOptions for the stand-alone window.
Returns
An stand-alone window key using the specified options.
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_oncedetermines if the stand-alone events are pumped once or forever.
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.

static bool HPS.Database.GetErrorEventFilter ( HPS.Info.Code  in_code)
inlinestatic

Provides the filter state of an ErrorEvent.

Parameters
in_codeThe info code in to operate on.
Returns
If the specified code is filtered.
static HPS.EventDispatcher HPS.Database.GetEventDispatcher ( )
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.
static bool HPS.Database.GetInformationEventFilter ( HPS.Info.Code  in_code)
inlinestatic

Provides the filter state of an InformationEvent.

Parameters
in_codeThe info code in to operate on.
Returns
If the specified code is filtered.
static HPS.PortfolioKey HPS.Database.GetMaterialLibraryPortfolio ( )
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.
static HPS.PortfolioKey [] HPS.Database.GetPortfolios ( )
inlinestatic

Get a list of all portfolios which are active (have been created but not deleted).

Returns
List of all currently active portfolios.
static HPS.SegmentKey [] HPS.Database.GetRootSegments ( )
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.
static ulong HPS.Database.GetSoftMemoryLimit ( )
inlinestatic

Gets the value at which the EmergencyHandler will be activated for SoftMemoryLimit.

Returns
The current value in bytes.
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.
static bool HPS.Database.GetWarningEventFilter ( HPS.Info.Code  in_code)
inlinestatic

Provides the filter state of a WarningEvents.

Parameters
in_codeThe info code in to operate on.
Returns
If the specified code is filtered.
static HPS.WindowKey [] HPS.Database.GetWindowKeys ( )
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.
static bool HPS.Database.IsDriverAvailable ( HPS.Window.Driver  in_driver)
inlinestatic

Checks whether the specified driver type is present and available for use.

Parameters
in_driverthe driver type to check availability for.
Returns
Whether the driver is available or not.
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 <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.

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.

static ulong HPS.Database.SelectByRay ( HPS.Point  in_start_point,
HPS.Vector  in_direction,
HPS.SelectionOptionsKit  in_options,
out HPS.SelectionResults  out_results 
)
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_pointStart point of ray.
in_directionDirection vector for ray.
in_optionsSelection options to use when performing the selection.
out_resultsResults of the selection.
Returns
Number of selected items.
static ulong HPS.Database.SelectByShell ( HPS.ShellKit  in_shell,
HPS.SelectionOptionsKit  in_options,
out HPS.SelectionResults  out_results 
)
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_shellShell to use to perform the selection.
in_optionsSelection options to use when performing the selection.
out_resultsResults of the selection.
Returns
Number of selected items.
static ulong HPS.Database.SelectByShell ( HPS.ShellKey  in_shell,
HPS.SelectionOptionsKit  in_options,
out HPS.SelectionResults  out_results 
)
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_shellShell in the database to use to perform the selection.
in_optionsSelection options to use when performing the selection.
out_resultsResults of the selection.
Returns
Number of selected items.
static ulong HPS.Database.SelectByVolume ( HPS.SimpleCuboid  in_volume,
HPS.SelectionOptionsKit  in_options,
out HPS.SelectionResults  out_results 
)
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_volumeVolume to use when performing the selection.
in_optionsSelection options to use when performing the selection.
out_resultsResults of the selection.
Returns
Number of selected items.
static void HPS.Database.SetEmergencyHandler ( HPS.EmergencyHandler  in_emergency_handler)
inlinestatic

Sets a custom EmergencyHandler.

Parameters
in_emergency_handlerThe EmergencyHandler to use.
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_codeThe info code in to operate on.
in_filteredThe new filter state desired.
Returns
The old value for the specified code.
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_codeThe info code in to operate on.
in_filteredThe new filter state desired.
Returns
The old value for the specified code.
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_bytesThe new limit value in bytes.
Returns
The old value in bytes.
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_codeThe info code in to operate on.
in_filteredThe new filter state desired.
Returns
The old value for the specified code.
static void HPS.Database.ShowMemoryUsage ( out ulong  out_allocated,
out ulong  out_used 
)
inlinestatic

Returns information about system memory usage.

static void HPS.Database.Sleep ( double  milliseconds)
inlinestatic

Sleep for the number of milliseconds requested.

static void HPS.Database.Synchronize ( )
inlinestatic

Synchronizes the database, guaranteeing that all queued actions and updates have been performed.

static void HPS.Database.UnsetEmergencyHandler ( )
inlinestatic

Sets the default EmergencyHandler.


The documentation for this class was generated from the following file:
  • internals/hps_core/source/cs/HPS.Database.cs