Go to the documentation of this file.
67 Error( "Can not find the default parameter file");
81 sprintf(ErrorText, "File %s does not exists. Using the default parameters",file);
97 if ((*p)[n].name==NULL)
98 Error( "Undefined parameter");
100 return((*p)[n].value);
103 Error( "Number of parameter out of range");
119 found=(((*p)[i].name!=NULL)&&(strcasecmp((*p)[i].name,name)==0));
133 return(((*p)[n].name!=NULL)&&((*p)[n].timesSet>0));
143 if ((*p)[n].name!=NULL)
145 if ((*p)[n].timesSet>0)
146 Warning( "Redefined parameter");
158 Error( "Number of parameter out of range");
168 if ((*p)[n].name==NULL)
169 Error( "Changing a non-defined parameter");
174 Error( "Number of parameter out of range");
186 fprintf(f, "%% **************************************************\n");
187 fprintf(f, "%% COMPILATION FLAGS:\n");
188 fprintf(f, "%% SIMPLEX ENGINE: %s\n",(_SIMPLEX_ENGINE==_GLPK? "glpk":(_SIMPLEX_ENGINE==_CLP? "clp": "lp_solve")));
189 fprintf(f, "%% MPI: %u\n",_USE_MPI);
190 fprintf(f, "%% DEBUG: %u\n",_DEBUG);
192 fprintf(f, "%% PARAMETERS:\n");
195 if ((*p)[i].name!=NULL)
197 fprintf(f, " %s = ",(*p)[i].name);
201 v=( unsigned int)(*p)[i].value;
217 Error( "Wrong value for parameter REPRESENTATION");
221 v=( unsigned int)(*p)[i].value;
228 v=( unsigned int)(*p)[i].value;
232 fprintf(f, "AMBIENT_SAMPLING");
235 fprintf(f, "KDTREE_SAMPLING");
238 fprintf(f, "TANGENT_SAMPLING");
241 Error( "Wrong value for parameter SAMPLING");
245 v=( unsigned int)(*p)[i].value;
252 fprintf(f, "VCOLLIDE");
264 fprintf(f, "RIGIDCLL");
270 Error( "Wrong value for parameter CD_ENGINE");
276 if ((*p)[i].value== INF)
280 if ((*p)[i].value==- INF)
283 fprintf(f, "%g",(*p)[i].value);
287 fprintf(f, "%g",(*p)[i].value);
void InitParametersFromFile(char *file, Tparameters *p) Constructor from a file.
#define DEFAULT_PARAMS Default file of parameters.
#define PQP One of the possible collison detection engines.
#define TANGENT_SAMPLING One of the possible sampling modes.
#define REP_JOINTS One of the possible values of the REPRESENTATION parameter.
#define REP_FLINKS One of the possible values of the REPRESENTATION parameter.
void DeleteParameters(Tparameters *p) Destructor.
#define REP_LINKS One of the possible values of the REPRESENTATION parameter.
#define NOCD One of the possible collison detection engines.
Data structure to hold the information about the name of a file.
void ChangeParameter(unsigned int n, double v, Tparameters *p) Sets the value for a particular parameter.
#define CT_SPLIT_TYPE Split type.
void InitParameters(Tparameters *p) Constructor.
#define CT_SAMPLING Sampling mode.
Definition of the Tfilename type and the associated functions.
boolean ReadParameters(char *file, Tparameters *p) Reads a parameter set from a file.
void Error(const char *s) General error function.
#define RIGIDCLL One of the possible collison detection engines.
#define PARAM_EXT File extension for parameter files.
void SetParameter(unsigned int n, char *name, double v, Tparameters *p) Sets the name and value for a particular parameter.
double GetParameter(unsigned int n, Tparameters *p) Gets the value for a particular parameter.
Error and warning functions.
void DeleteFileName(Tfilename *fn) Destructor.
#define CT_CUT_X Limit of domain of the X dimension of 3d plots.
#define FCL One of the possible collison detection engines.
#define NPARAMETERS Total number of parameters.
#define CT_CUT_Z Limit of domain of the Z dimension of 3d plots.
#define KDTREE_SAMPLING One of the possible sampling modes.
Definitions of constants and macros used in several parts of the cuik library.
#define C_FCL One of the possible collison detection engines.
#define CT_CD_ENGINE Collision detection engine.
void Warning(const char *s) General warning function.
void CreateFileName(char *path, char *name, char *suffix, char *ext, Tfilename *fn) Constructor.
#define VCOLLIDE One of the possible collison detection engines.
char * GetFileFullName(Tfilename *fn) Gets the file full name (paht+name+extension).
#define CT_REPRESENTATION Representation.
unsigned int GetParameterID(char *name, Tparameters *p) Returns the parameter identifier given the paramete name.
#define NO_UINT Used to denote an identifier that has not been initialized.
#define AMBIENT_SAMPLING One of the possible sampling modes.
#define CT_CUT_Y Limit of domain of the Y dimension of 3d plots.
void PrintParameters(FILE *f, Tparameters *p) Prints a parameter set.
Definition of the Tparameters type and the associated functions.
boolean ParameterSet(unsigned int n, Tparameters *p) Checks if a parameter is already defined.
#define SOLID One of the possible collison detection engines.
#define REP_QLINKS One of the possible values of the REPRESENTATION parameter.
|
Follow us!