1 | #ifndef _MODELOBJ_H_
|
---|
2 | #define _MODELOBJ_H_
|
---|
3 |
|
---|
4 | #include "model.h"
|
---|
5 |
|
---|
6 | extern ParamEntry modelobj_paramtab[];
|
---|
7 |
|
---|
8 | class ModelObj : public Model
|
---|
9 | {
|
---|
10 | public:
|
---|
11 | #define STATRICKCLASS ModelObj
|
---|
12 |
|
---|
13 | PARAMGETDEF(geno);
|
---|
14 | PARAMPROCDEF(p_newfromstring);
|
---|
15 | PARAMPROCDEF(p_newfromgeno);
|
---|
16 | PARAMPROCDEF(p_newwithcheckpoints);
|
---|
17 |
|
---|
18 | #define GETDELEGATE(name,type,value) PARAMGETDEF(name) {arg1->set ## type (value);}
|
---|
19 | GETDELEGATE(numparts, Int, getPartCount())
|
---|
20 | GETDELEGATE(numjoints, Int, getJointCount())
|
---|
21 | GETDELEGATE(numneurons, Int, getNeuroCount())
|
---|
22 | GETDELEGATE(numconnections, Int, getConnectionCount())
|
---|
23 | GETDELEGATE(numcheckpoints, Int, getCheckpointCount())
|
---|
24 | #undef GETDELEGATE
|
---|
25 |
|
---|
26 | PARAMGETDEF(is_valid);
|
---|
27 | PARAMPROCDEF(p_getpart);
|
---|
28 | PARAMPROCDEF(p_getjoint);
|
---|
29 | PARAMPROCDEF(p_getneuro);
|
---|
30 | PARAMGETDEF(bboxsize);
|
---|
31 | PARAMPROCDEF(p_getcheckpoint);
|
---|
32 | PARAMGETDEF(shape_type);
|
---|
33 | PARAMGETDEF(solid_model);
|
---|
34 |
|
---|
35 | #undef STATRICKCLASS
|
---|
36 |
|
---|
37 | static ExtObject makeStaticObject(Model* g);
|
---|
38 | static ExtObject makeDynamicObject(Model* g);
|
---|
39 | static Model* fromObject(const ExtValue& v, bool warn = true);
|
---|
40 | static ParamInterface* getInterface();
|
---|
41 | static Param& getStaticParam();
|
---|
42 | static Param& getDynamicParam();
|
---|
43 | };
|
---|
44 |
|
---|
45 | #endif
|
---|