source: cpp/frams/vm/classes/3dobject.h @ 176

Last change on this file since 176 was 121, checked in by sz, 11 years ago

updated file headers and makefiles

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1// This file is a part of the Framsticks GDK.
2// Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
3// Refer to http://www.framsticks.com/ for further information.
4
5#ifndef _3DOBJECT_H_
6#define _3DOBJECT_H_
7
8#include <frams/util/3d.h>
9#include <frams/util/extvalue.h>
10
11class Pt3D_Ext: public DestrBase
12{
13  public:
14Pt3D p;
15
16Pt3D_Ext(double x,double y,double z):p(x,y,z) {}
17Pt3D_Ext():p(0,0,0) {}
18Pt3D_Ext(const Pt3D &i):p(i) {}
19#define STATRICKCLASS Pt3D_Ext
20PARAMPROCDEF(p_new);
21PARAMPROCDEF(p_newFromVector);
22PARAMPROCDEF(p_clone);
23PARAMGETDEF(length);
24PARAMPROCDEF(p_addvec);
25PARAMPROCDEF(p_subvec);
26PARAMPROCDEF(p_scale);
27PARAMPROCDEF(p_rotate);
28PARAMPROCDEF(p_revrotate);
29PARAMPROCDEF(p_normalize);
30PARAMGETDEF(toString);
31PARAMGETDEF(toVector);
32PARAMPROCDEF(p_set);
33PARAMPROCDEF(p_set3);
34PARAMPROCDEF(p_get);
35#undef STATRICKCLASS
36
37static ParamInterface* getInterface();
38static ExtObject makeStaticObject(Pt3D* p);
39static ExtObject makeDynamicObject(Pt3D_Ext* p);
40static Pt3D_Ext* fromObject(const ExtValue& v);
41static Param& getStaticParam();
42static ParamEntry* getStaticParamtab();
43};
44
45class Orient_Ext: public DestrBase
46{
47  public:
48Orient o;
49
50Orient_Ext():o(Orient_1) {}
51Orient_Ext(const Orient& other):o(other) {}
52#define STATRICKCLASS Orient_Ext
53PARAMPROCDEF(p_new);
54PARAMPROCDEF(p_newFromVector);
55PARAMPROCDEF(p_clone);
56PARAMGETDEF(toString);
57PARAMGETDEF(toVector);
58PARAMGETDEF(x);
59PARAMGETDEF(y);
60PARAMGETDEF(z);
61PARAMPROCDEF(p_rotate3);
62PARAMPROCDEF(p_rotate);
63PARAMPROCDEF(p_revrotate);
64PARAMPROCDEF(p_lookat);
65PARAMPROCDEF(p_normalize);
66PARAMPROCDEF(p_between2);
67PARAMPROCDEF(p_betweenOV);
68PARAMPROCDEF(p_set);
69PARAMPROCDEF(p_reset);
70PARAMPROCDEF(p_localToWorld);
71PARAMPROCDEF(p_worldToLocal);
72#undef STATRICKCLASS
73
74static ParamInterface* getInterface();
75static ExtObject makeStaticObject(Orient* p);
76static ExtObject makeDynamicObject(Orient_Ext* p);
77static Orient_Ext* fromObject(const ExtValue& v);
78static Param& getStaticParam();
79static ParamEntry* getStaticParamtab();
80};
81
82class ReferenceObj: public DestrBase
83{
84  public:
85ExtValue *value;
86ExtObject obj;
87int prop;
88
89ReferenceObj(ExtValue *val):value(val) {}
90ReferenceObj() {}
91ReferenceObj(const ExtObject &o,int p):value(0),obj(o),prop(p) {}
92ReferenceObj(const ExtObject &o,const SString &p);
93#define STATRICKCLASS ReferenceObj
94PARAMPROCDEF(p_newS);
95PARAMPROCDEF(p_newO);
96PARAMPROCDEF(p_copyFrom);
97PARAMGETDEF(toString);
98PARAMGETDEF(value);
99PARAMSETDEF(value);
100#undef STATRICKCLASS
101
102static ParamInterface* getInterface();
103static ExtObject makeDynamicObject(ReferenceObj* r);
104static ReferenceObj* fromObject(const ExtValue& v);
105static Param& getStaticParam();
106static ParamEntry* getStaticParamtab();
107};
108
109#endif
Note: See TracBrowser for help on using the repository browser.