| Function Name | Description |
|---|---|
| XintView3DSetGlobalFlags | Set or Unset global flags |
void XintView3DSetGlobalFlags(...)
| XintView3DGlobalFlags * | flags | Specifies a pointer to a structure containing the flags to set. |
| unsigned long | flag_mask | Specifies which members of flags to set. flag_mask is made by combining any number of the mask symbols listed below. |
Arguments flags and flag_mask are used to set or unset the global flags. Argument flags is a pointer to a structure of type XintView3DGlobalFlags which is described below:
typedef struct {
Boolean disable_normals;
Boolean disable_polygon_data;
Boolean offscreen_select;
Boolean local_storage;
Boolean swapping;
char *swap_file
unsigned long swap_size;
} XintView3DGlobalFlags;
You need only set the components that you want to change. The following table lists the structure members, the default values and the corresponding mask.
| Member | Default | Mask |
|---|---|---|
| disable_normals | False | XintGLOBAL_DISABLE_NORMALS |
| disable_polygon_data | False | XintGLOBAL_DISABLE_POLYGON_DATA |
| offscreen_select | False | XintGLOBAL_OFFSCREEN_SELECT |
| local_storage | True | XintGLOBAL_LOCAL_STORAGE |
| swapping | False | XintGLOBAL_SWAPPING |
| swap_file | /usr/tmp/View3DSwap | XintGLOBAL_SWAP_FILE |
| swap_size | 0x01ffffff | XintGLOBAL_SWAP_SIZE |
The following table lists the effects of the global flags.
| Flag | Value | Effect |
|---|---|---|
| disable_normals | True | No surface normals will be generated for any objects. This will also disable lighting. By setting this flag, each mesh surface will use 19% less memory. |
| disable_normals | False | Default setting. Lighting is functional. |
| disable_polygon_data | True | No polygon data will be generated for any of the mesh surfaces. This will also disable picking. Selection will work as if offscreen_select had been set to True. This will also save 56% of the memory required by mesh surfaces. |
| disable_polygon_data | False | Default setting. Polygon data will be generated for surfaces. This data is needed for Picking (but not selection). It is also useful for user applications such as Ray Tracing. |
| offscreen_select | True | Forces all View3D widgets to use an offscreen pixmap to perform selection. The extra memory required for offscreen selection is negligible. The system will generate a 5x5 pixmap for the selection. Offscreen selection will normally be slower than the regular selection method, but in many cases it will not be noticed. |
| offscreen_select | False | Default setting. All View3D widgets will use the polygon data of each mesh surface to perform selection. |
| local_storage | True | Default setting. Whenever an object is created, the creation function (ex: XintView3DCreateMeshSurface) will allocate memory for all elements and copy the user supplied data. This will protect the user from accidently freeing resources that a View3D widget is using. |
| local_storage | False | Whenever an object is created, the creation function will not allocate any memory (except for the name of the object). The function will just assign pointers to the user supplied data. This feature is useful when large datasets are being used. It will decrease the time necessary to create an object, and reduce memory requirements. The user must make certain that any memory allocated is not freed while a View3D widget is using it. Warning: If an object is removed from a viewer (XintView3DRemovObject) the object will be dereferenced and possibly deleted. If the resources should not be freed, remember to reference the object before adding (XintView3DRefObject). |
| swapping | True | If the datasets are larger than physical memory the swapping will be handled by View3D. |
| swapping | False | If the datasets are larger than physical memory the swapping will be handled by the system. |
| swap_file | /usr/tmp/View3DSwap | When the dataset is larger than physical memory this file will be used to store the data, if View3D is handling the swapping. |
| swap_size | 32MB | The size of physical memory if View3D is handling the swapping. |