![]() |
Bsoft 2.1.4
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"
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_link_list_generate (Bmodel *model, double maxlength, Bstring &type1, Bstring &type2, int flag) |
Generates a link list for a model based on vertex separation between defined componet types. 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, long &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.
long model_link_list_generate | ( | Bmodel * | model, |
double | maxlength | ||
) |
Generates a link list for a model based on vertex separation.
*model | model parameters. |
maxlength | maximum link length. |
Only the first model is processed.
long model_link_list_generate | ( | Bmodel * | model, |
double | maxlength, | ||
Bstring & | type1, | ||
Bstring & | type2, | ||
int | flag | ||
) |
Generates a link list for a model based on vertex separation between defined componet types.
*model | model parameters. |
maxlength | maximum link length. |
type1 | first component type. |
type2 | second component type. |
flag | 1=closest components. |
Only the first model is processed. A link is generated for the minimum distance if that is below the maximum length. If the flag is set, a link is generated only for the closest second component to the first.
Bcomponent * model_linked_submodel | ( | Bcomponent * | comp, |
Bmodel * | model, | ||
long & | n, | ||
Vector3< float > & | avg_loc | ||
) |
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.
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.
long model_set_link_length | ( | Bmodel * | model, |
double | linklength | ||
) |
Sets the reference link lengths.
*model | model parameters. |
linklength | reference link length. |
Only the first model is processed.
long model_set_link_radius | ( | Bmodel * | model, |
double | linkrad | ||
) |
Set the display radius for all links to a specific value.
*model | model parameters. |
linkrad | link display radius. |
Only the first model is processed.
long model_setup_links | ( | Bmodel * | model | ) |
Set up the link list for each component.
*model | model parameters. |
Only the first model is processed.
|
extern |