#ifndef _FL_GENERAL_ #define _FL_GENERAL_ #include #include #include #include #include #include #include #include "fL_matheval.h" /// determines to which class fL element belongs enum fLElementType { TERM, ///< word of L-System INFO, ///< fL_Builder object RULE, ///< rule of L-System BRANCH ///< special type of fL word, which represents branch }; /** @name Constants used in fL methods */ //@{ #define PART_PROPS_COUNT 4 /// parevals; /// objsucc; ///::iterator &it, std::list &genotype, double currtime); }; struct fL_State { Pt3D direction; /// genotype; /// words; /// rules; /// &result, int numparams); /** * Uses rules to process current genotype and make next iteration step for * L-System development. * @param currtime current time of genotype processing * @return always 0 */ int iterate(double currtime); /** * Alters only parameters that depend on time. Should be used if only fraction * of iteration has changed, not integer part. * @param currtime current time of processing * @return always 0 */ int alterTimedProperties(double currtime); /** * Developes L-System from given genotype and builds Framsticks Model from it. */ int develop(); /** * Creates new checkpoint for a given model based on current state of genotype. * @param model reference to model * @return 0 if developing went successfully, 1 otherwise */ int developModel(Model &model); /** * Returns stringified product of L-System development. * @return stringified words of developed L-System */ SString getStringifiedProducts(); /** * Returns genotype stored by objects in fL_Builder. * @return genotype converted from L-System objects */ SString toString(); /** * TODO */ int alterPartProperties(Part *part, fL_Word *stickword, double &alterationcount); /** * TODO */ Neuro *findInputNeuron(std::list genotype, std::list::iterator it, fL_Word *attractor); /** * TODO */ void findNext(fL_Word *word, std::list genotype, std::list::iterator &it); }; #endif // _FL_GENERAL_