|
Bsoft
2.1.0
Bernard's software package
|
Library routines used for model links processing. More...
#include "model_links.h"#include "model_transform.h"#include "model_compare.h"#include "model_util.h"#include "matrix_util.h"#include "linked_list.h"#include "utilities.h"Go to the source code of this file.
Functions | |
| long | model_setup_links (Bmodel *model) |
| Set up the link list for each component. More... | |
| long | model_link_list_generate (Bmodel *model, double maxlength) |
| Generates a link list for a model based on vertex separation. More... | |
| long | model_set_link_length (Bmodel *model, double linklength) |
| Sets the reference link lengths. More... | |
| long | model_set_link_radius (Bmodel *model, double linkrad) |
| Set the display radius for all links to a specific value. More... | |
| Bcomponent * | model_linked_submodel (Bcomponent *comp, Bmodel *model, int *n, Vector3< float > *avg_loc) |
| long | model_reduce_linked (Bmodel *model, Bstring &submodname, int flags) |
| Reduces a model to one component per linked set of components. More... | |
| long | model_links_minimum_valency (Bmodel *model, long valency) |
| Generates links such that each component has at least the given valency. More... | |
Variables | |
| int | verbose |
Library routines used for model links processing.
Definition in file model_links.cpp.
| long model_link_list_generate | ( | Bmodel * | model, |
| double | maxlength | ||
| ) |
Generates a link list for a model based on vertex separation.
Only the first model is processed.
| *model | model parameters. |
| maxlength | maximum link length. |
Definition at line 70 of file model_links.cpp.
| Bcomponent* model_linked_submodel | ( | Bcomponent * | comp, |
| Bmodel * | model, | ||
| int * | n, | ||
| Vector3< float > * | avg_loc | ||
| ) |
Definition at line 154 of file model_links.cpp.
| long model_links_minimum_valency | ( | Bmodel * | model, |
| long | valency | ||
| ) |
Generates links such that each component has at least the given valency.
| *model | model structure. |
| valency | the desired valency. |
A distance matrix is calculated and a cutoff determined that ensures that each column has at least the given valency number below it. The links are then created based on the cutoff. Only the first model in the linked list is used.
Definition at line 294 of file model_links.cpp.
Reduces a model to one component per linked set of components.
| *model | model structure to be modified. |
| &submodname | sub-model file name. |
| flags | 1=generate averaged types. |
A new reduced set of components is generated. Each old set of linked components is saved as a sub-model and referenced as a type. Optionally, the old sets of components are averaged and the averaged model saved as a type.
Definition at line 194 of file model_links.cpp.
| long model_set_link_length | ( | Bmodel * | model, |
| double | linklength | ||
| ) |
Sets the reference link lengths.
Only the first model is processed.
| *model | model parameters. |
| linklength | reference link length. |
Definition at line 112 of file model_links.cpp.
| long model_set_link_radius | ( | Bmodel * | model, |
| double | linkrad | ||
| ) |
Set the display radius for all links to a specific value.
Only the first model is processed.
| *model | model parameters. |
| linkrad | link display radius. |
Definition at line 139 of file model_links.cpp.
| long model_setup_links | ( | Bmodel * | model | ) |
Set up the link list for each component.
| *model | model parameters. |
Only the first model is processed.
Definition at line 28 of file model_links.cpp.
|
extern |