SoAlgorithms Class Reference
[Algorithms]

VSG extension Utility functions for loading algorithm modules More...

#include <Inventor/algorithms/SoAlgorithms.h>

List of all members.

Classes

struct  Module
 Basic structure to store the information about a loaded module.

Public Member Functions

 SoAlgorithms ()
virtual ~SoAlgorithms ()
virtual SoBufferObjectcreateBufferObject ()
virtual SoDeviceContextcreateContext ()
virtual SoDataExtractcreateDataExtractInterface ()
virtual SoSeismiccreateSeismicInterface ()
virtual SoConversioncreateConversionInterface ()
virtual SoConvolutioncreateConvolutionInterface ()
virtual SoArithmeticcreateArithmeticInterface ()

Static Public Member Functions

static void init ()
static bool isInitialized ()
static void finish ()
static SoAlgorithmsloadAlgorithmsModule (const SbString &moduleFileName)
static SbBool unloadAlgorithmsModule (const SbString &moduleFileName)

Detailed Description

VSG extension Utility functions for loading algorithm modules

This class provides convenience methods for loading an algorithm module, extracting specific algorithm interfaces and creating appropriate context and buffer objects for the device that implements the algorithms.

Examples:

See related examples:

TextureConvolution, ComputeBatch, ComputeSlice


Constructor & Destructor Documentation

SoAlgorithms::SoAlgorithms (  ) 

Algorithms interface constructor.

virtual SoAlgorithms::~SoAlgorithms (  )  [virtual]

Algorithms interface destructor.


Member Function Documentation

virtual SoArithmetic* SoAlgorithms::createArithmeticInterface (  )  [virtual]

Returns an instance of the SoArithmetic interface defined in the loaded module.

If there is no loaded module it returns the default CPU version.

Returns:
Instance of the SoArithmetic interface.
virtual SoBufferObject* SoAlgorithms::createBufferObject (  )  [virtual]

Returns an instance of a SoBufferObject according to the hardware used by the loaded module.

If there is no loaded module this function returns an SoCpuBufferObject.

Returns:
An Instance of a SoBufferObject.
virtual SoDeviceContext* SoAlgorithms::createContext (  )  [virtual]

Returns a DeviceContext that can be used with the algorithms module and SoBufferObject returned by the createBufferObject function.

Returns:
An instance of an SoDeviceContext object.
virtual SoConversion* SoAlgorithms::createConversionInterface (  )  [virtual]

Returns an instance of the SoConversion interface defined in the loaded module.

If there is no loaded module it returns the default CPU version.

Returns:
Instance of the SoConversion interface.
virtual SoConvolution* SoAlgorithms::createConvolutionInterface (  )  [virtual]

Returns an instance of the SoConvolution interface defined in the loaded module.

If there is no loaded module it returns the default CPU version.

Returns:
Instance of the SoConvolution interface.
virtual SoDataExtract* SoAlgorithms::createDataExtractInterface (  )  [virtual]

Returns an instance of the SoDataExtract interface defined in the loaded module.

If there is no loaded module it returns the default CPU version.

Returns:
Instance of the SoDataExtract interface.
virtual SoSeismic* SoAlgorithms::createSeismicInterface (  )  [virtual]

Returns an instance of the SoSeismic interface defined in the loaded module.

If there is no loaded module it returns the default CPU version.

Returns:
Instance of the SoSeismic interface.
static void SoAlgorithms::finish (  )  [static]

Static finish function to free the memory allocated by the algorithms module.

static void SoAlgorithms::init (  )  [static]

Static init function to initialize the algorithms module.

static bool SoAlgorithms::isInitialized (  )  [static]

Returns TRUE if module is currently initialized.

static SoAlgorithms* SoAlgorithms::loadAlgorithmsModule ( const SbString moduleFileName  )  [static]

Loads a module and returns an instance of the implementation of SoAlgorithms in this module.

If the module is already loaded this function just increments the reference count and returns a new instance of the algorithms interface.

Parameters:
moduleFileName The module filename. See the description of this class for more information.
Returns:
An instance of the Algorithms interface from the module, or NULL if the module cannot be load.
static SbBool SoAlgorithms::unloadAlgorithmsModule ( const SbString moduleFileName  )  [static]

Unloads a module.

The module is unloaded only if it is not used anymore, it uses a references counter in order to figure out if the module can be unloaded or not.

Parameters:
moduleFileName The module filename to unload.

The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 20 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/