![]() |
Bsoft 2.1.4
Bernard's software package
|
Header file for reading and writing atomic model files. More...
Classes | |
class | Bcomptype |
class | Blinktype |
class | Bangletype |
class | Bcomponent |
class | Blink |
class | Bpolygon |
class | Bgroup |
class | Bmodel |
Macros | |
#define | MAXLINK 10 |
#define | _Bmodel_ |
Functions | |
Bmodel * | read_model (Bstring &filename) |
Bmodel * | read_model (Bstring *file_list) |
Bmodel * | read_model (Bstring &filename, Bstring ¶mfile) |
Bmodel * | read_model (Bstring *file_list, Bstring ¶mfile) |
Reads model parameters. More... | |
int | write_model (Bstring &filename, Bmodel *model) |
Writes model parameters. More... | |
int | write_model (Bstring &filename, Bmodel *model, int split) |
Writes model parameters. More... | |
Bmodel * | model_add (Bmodel **model, string id) |
Adds a model to a linked list. More... | |
Bcomponent * | component_add (Bcomponent **comp, string &id) |
Adds a component to a linked list. More... | |
Bcomponent * | component_add (Bcomponent **comp, unsigned long number) |
Blink * | link_add (Blink **link, Bcomponent *comp1, Bcomponent *comp2, double length, double radius) |
Adds a component link to a linked list. More... | |
Blink * | link_add (Blink **link, Bcomponent *comp1, Bcomponent *comp2) |
int | model_set_map_filenames (Bmodel *model, Bstring &mapfile) |
Sets all the map file names of selected models. More... | |
int | model_set_type (Bmodel *model, Bstring &set_type) |
Reset the component types. More... | |
int | model_change_type (Bmodel *model, Bstring &change_type) |
Change a component type name. More... | |
int | model_check (Bmodel *model, Bstring path) |
Checks model properties. More... | |
Bmodel * | model_list_copy (Bmodel *model) |
Copies a model. More... | |
int | component_list_kill (Bcomponent *comp) |
Deallocates memory for a list of components. More... | |
int | comp_type_list_kill (Bcomptype *type) |
Deallocates memory for a list of component types. More... | |
int | model_link_list_kill (Bmodel *model) |
Deallocates memory for a list of component links. More... | |
int | link_kill (Blink **link_list, Bcomponent *comp, int i) |
Deletes a link. More... | |
int | link_kill (Blink **link_list, Bcomponent *comp, Bcomponent *comp2) |
Deletes a link. More... | |
int | poly_list_kill (Bpolygon *poly) |
Deallocates memory for a list of polygons. More... | |
int | comp_associated_links_kill (Bcomponent *comp, Blink **link) |
Deallocates memory for links associated with a component. More... | |
int | model_kill (Bmodel *model) |
Deallocates all memory in the list. More... | |
int | model_associate (Bmodel *model, Bstring &associate_type, Bstring &associate_file) |
Associates a model file with a component type. More... | |
int | model_associate_mass (Bmodel *model, Bstring &associate_type, double mass) |
Associates a mass with a component type. More... | |
int | model_set_comptype_filenames (Bmodel *model, Bstring &filename) |
Sets the filenames of all selected component types to the given string. More... | |
long | model_set_component_radius (Bmodel *model, double comprad) |
Set the display radius for all components to a specific value. More... | |
Header file for reading and writing atomic model files.
#define _Bmodel_ |
#define MAXLINK 10 |
int comp_associated_links_kill | ( | Bcomponent * | comp, |
Blink ** | link | ||
) |
Deallocates memory for links associated with a component.
*comp | associated componet. |
**link | pointer to component link list. |
int comp_type_list_kill | ( | Bcomptype * | type | ) |
Deallocates memory for a list of component types.
*type | component type list. |
Bcomponent * component_add | ( | Bcomponent ** | comp, |
string & | id | ||
) |
Adds a component to a linked list.
**comp | component list. |
&id | component identifier. |
The function allocates memory for a new component structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
Bcomponent * component_add | ( | Bcomponent ** | comp, |
unsigned long | number | ||
) |
int component_list_kill | ( | Bcomponent * | comp | ) |
Deallocates memory for a list of components.
*comp | component list. |
Blink * link_add | ( | Blink ** | link, |
Bcomponent * | comp1, | ||
Bcomponent * | comp2 | ||
) |
Blink * link_add | ( | Blink ** | link, |
Bcomponent * | comp1, | ||
Bcomponent * | comp2, | ||
double | length, | ||
double | radius | ||
) |
Adds a component link to a linked list.
**link | component link list. |
*comp1 | first component. |
*comp2 | second component. |
length | length of link. |
radius | display radius. |
The function allocates memory for a new link structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
int link_kill | ( | Blink ** | link_list, |
Bcomponent * | comp, | ||
Bcomponent * | comp2 | ||
) |
Deletes a link.
The link in the model link list is removed. The associated references to the link in the component link arrays are removed and the link arrays reorganized.
**link_list | pointer to list of links. |
*comp | one component in the link. |
*comp2 | second component in the link. |
int link_kill | ( | Blink ** | link_list, |
Bcomponent * | comp, | ||
int | i | ||
) |
Deletes a link.
The link in the model link list is removed. The associated references to the link in the component link arrays are removed and the link arrays reorganized.
**link_list | pointer to list of links. |
*comp | one component in the link. |
i | index for second component in link array of first component. |
Adds a model to a linked list.
**model | model list. |
id | model identifier. |
The function allocates memory for a new model structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
Associates a model file with a component type.
*model | the model. |
&associate_type | component type. |
&associate_file | component file name. |
Model files can be coordinates or maps.
Associates a mass with a component type.
*model | model list. |
&associate_type | component type. |
mass | component type mass. |
Change a component type name.
*model | model. |
&change_type | component type. |
Sets all the component types to the given string.
Checks model properties.
*model | model. |
path | search path to find map files. |
int model_kill | ( | Bmodel * | model | ) |
Deallocates all memory in the list.
*model | model parameters. |
int model_link_list_kill | ( | Bmodel * | model | ) |
Deallocates memory for a list of component links.
Only the first model in the list is processed.
*model | model. |
Copies a model.
*model | model parameters. |
Copies all the models in a list.
long model_set_component_radius | ( | Bmodel * | model, |
double | comprad | ||
) |
Set the display radius for all components to a specific value.
*model | model parameters. |
comprad | component display radius. |
Sets the filenames of all selected component types to the given string.
*model | model parameters. |
&filename | component file name. |
The image numbers are sequentially set as well.
Sets all the map file names of selected models.
*model | model parameters. |
&mapfile | map file name. |
Reset the component types.
*model | model. |
&set_type | component type. |
Sets all the component types to the given string.
int poly_list_kill | ( | Bpolygon * | poly | ) |
Deallocates memory for a list of polygons.
*poly | polygon list. |
Reads model parameters.
*file_list | list of model parameter file names. |
¶mfile | parameter file. |
Writes model parameters.
&filename | model parameter file name. |
*model | model parameters. |