Voxvision  1
Creating and manipulating voxel octrees
All Data Structures Files Functions Variables Typedefs Macros Pages
Data Structures | Macros | Functions
modules.h File Reference

Generic module loading facility. More...

#include "../voxvision.h"

Go to the source code of this file.

Data Structures

struct  vox_module
 Module info structure. More...
 

Macros

#define CAMERA_MODULE   0
 Camera module class.
 

Functions

VOX_EXPORT struct vox_module_methods * vox_load_module (const char *name, int type)
 Load a module. More...
 

Detailed Description

Generic module loading facility.

This system is for internal use now, but can be used manually with vox_load_module() function.

Function Documentation

◆ vox_load_module()

VOX_EXPORT struct vox_module_methods* vox_load_module ( const char *  name,
int  type 
)

Load a module.

This function searches for a module in local (~/.voxvision) or global modules directory or in a directory specified in VOXVISION_MODULES environment variable. If the module is found it is loaded as a shared library and the function module_init() is called in that library. This function returns a pointer to an object of type struct vox_module which contains the module's class and its methods. If the class matches value of type variable, the module's methods are returned.

Parameters
nameName of the module.
typeClass of the module (e.g. CAMERA_MODULE).
Returns
The module's methods on success or NULL otherwise.