1 | #ifndef _3DOBJECT_H_ |
---|
2 | #define _3DOBJECT_H_ |
---|
3 | |
---|
4 | #include <frams/util/3d.h> |
---|
5 | #include <frams/util/extvalue.h> |
---|
6 | |
---|
7 | class Pt3D_Ext: public DestrBase |
---|
8 | { |
---|
9 | public: |
---|
10 | Pt3D p; |
---|
11 | |
---|
12 | Pt3D_Ext(double x,double y,double z):p(x,y,z) {} |
---|
13 | Pt3D_Ext():p(0,0,0) {} |
---|
14 | Pt3D_Ext(const Pt3D &i):p(i) {} |
---|
15 | #define STATRICKCLASS Pt3D_Ext |
---|
16 | PARAMPROCDEF(p_new); |
---|
17 | PARAMPROCDEF(p_newFromVector); |
---|
18 | PARAMPROCDEF(p_clone); |
---|
19 | PARAMGETDEF(length); |
---|
20 | PARAMPROCDEF(p_addvec); |
---|
21 | PARAMPROCDEF(p_subvec); |
---|
22 | PARAMPROCDEF(p_scale); |
---|
23 | PARAMPROCDEF(p_rotate); |
---|
24 | PARAMPROCDEF(p_revrotate); |
---|
25 | PARAMPROCDEF(p_normalize); |
---|
26 | PARAMGETDEF(toString); |
---|
27 | PARAMGETDEF(toVector); |
---|
28 | PARAMPROCDEF(p_set); |
---|
29 | PARAMPROCDEF(p_set3); |
---|
30 | PARAMPROCDEF(p_get); |
---|
31 | #undef STATRICKCLASS |
---|
32 | |
---|
33 | static ParamInterface* getInterface(); |
---|
34 | static ExtObject makeStaticObject(Pt3D* p); |
---|
35 | static ExtObject makeDynamicObject(Pt3D_Ext* p); |
---|
36 | static Pt3D_Ext* fromObject(const ExtValue& v); |
---|
37 | static Param& getStaticParam(); |
---|
38 | static ParamEntry* getStaticParamtab(); |
---|
39 | }; |
---|
40 | |
---|
41 | class Orient_Ext: public DestrBase |
---|
42 | { |
---|
43 | public: |
---|
44 | Orient o; |
---|
45 | |
---|
46 | Orient_Ext():o(Orient_1) {} |
---|
47 | Orient_Ext(const Orient& other):o(other) {} |
---|
48 | #define STATRICKCLASS Orient_Ext |
---|
49 | PARAMPROCDEF(p_new); |
---|
50 | PARAMPROCDEF(p_newFromVector); |
---|
51 | PARAMPROCDEF(p_clone); |
---|
52 | PARAMGETDEF(toString); |
---|
53 | PARAMGETDEF(toVector); |
---|
54 | PARAMGETDEF(x); |
---|
55 | PARAMGETDEF(y); |
---|
56 | PARAMGETDEF(z); |
---|
57 | PARAMPROCDEF(p_rotate3); |
---|
58 | PARAMPROCDEF(p_rotate); |
---|
59 | PARAMPROCDEF(p_revrotate); |
---|
60 | PARAMPROCDEF(p_lookat); |
---|
61 | PARAMPROCDEF(p_normalize); |
---|
62 | PARAMPROCDEF(p_between2); |
---|
63 | PARAMPROCDEF(p_betweenOV); |
---|
64 | PARAMPROCDEF(p_set); |
---|
65 | PARAMPROCDEF(p_reset); |
---|
66 | PARAMPROCDEF(p_localToWorld); |
---|
67 | PARAMPROCDEF(p_worldToLocal); |
---|
68 | #undef STATRICKCLASS |
---|
69 | |
---|
70 | static ParamInterface* getInterface(); |
---|
71 | static ExtObject makeStaticObject(Orient* p); |
---|
72 | static ExtObject makeDynamicObject(Orient_Ext* p); |
---|
73 | static Orient_Ext* fromObject(const ExtValue& v); |
---|
74 | static Param& getStaticParam(); |
---|
75 | static ParamEntry* getStaticParamtab(); |
---|
76 | }; |
---|
77 | |
---|
78 | class ReferenceObj: public DestrBase |
---|
79 | { |
---|
80 | public: |
---|
81 | ExtValue *value; |
---|
82 | ExtObject obj; |
---|
83 | int prop; |
---|
84 | |
---|
85 | ReferenceObj(ExtValue *val):value(val) {} |
---|
86 | ReferenceObj() {} |
---|
87 | ReferenceObj(const ExtObject &o,int p):value(0),obj(o),prop(p) {} |
---|
88 | ReferenceObj(const ExtObject &o,const SString &p); |
---|
89 | #define STATRICKCLASS ReferenceObj |
---|
90 | PARAMPROCDEF(p_newS); |
---|
91 | PARAMPROCDEF(p_newO); |
---|
92 | PARAMPROCDEF(p_copyFrom); |
---|
93 | PARAMGETDEF(toString); |
---|
94 | PARAMGETDEF(value); |
---|
95 | PARAMSETDEF(value); |
---|
96 | #undef STATRICKCLASS |
---|
97 | |
---|
98 | static ParamInterface* getInterface(); |
---|
99 | static ExtObject makeDynamicObject(ReferenceObj* r); |
---|
100 | static ReferenceObj* fromObject(const ExtValue& v); |
---|
101 | static Param& getStaticParam(); |
---|
102 | static ParamEntry* getStaticParamtab(); |
---|
103 | }; |
---|
104 | |
---|
105 | #endif |
---|