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

Last change on this file since 277 was 247, checked in by Maciej Komosinski, 10 years ago

Sources support both 32-bit and 64-bit, and more compilers

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1// This file is a part of the Framsticks GDK.
2// Copyright (C) 1999-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 ExtObject makeDynamicObject(const Pt3D& p);
41static Pt3D_Ext* fromObject(const ExtValue& v,bool warn=true);
42static Param& getStaticParam();
43static ParamEntry* getStaticParamtab();
44};
45
46class Orient_Ext: public DestrBase
47{
48  public:
49Orient o;
50
51Orient_Ext():o(Orient_1) {}
52Orient_Ext(const Orient& other):o(other) {}
53#define STATRICKCLASS Orient_Ext
54PARAMPROCDEF(p_new);
55PARAMPROCDEF(p_newFromVector);
56PARAMPROCDEF(p_clone);
57PARAMGETDEF(toString);
58PARAMGETDEF(toVector);
59PARAMGETDEF(x);
60PARAMGETDEF(y);
61PARAMGETDEF(z);
62PARAMPROCDEF(p_rotate3);
63PARAMPROCDEF(p_rotate);
64PARAMPROCDEF(p_revrotate);
65PARAMPROCDEF(p_lookat);
66PARAMPROCDEF(p_normalize);
67PARAMPROCDEF(p_between2);
68PARAMPROCDEF(p_betweenOV);
69PARAMPROCDEF(p_set);
70PARAMPROCDEF(p_reset);
71PARAMPROCDEF(p_localToWorld);
72PARAMPROCDEF(p_worldToLocal);
73PARAMGETDEF(angles);
74#undef STATRICKCLASS
75
76static ParamInterface* getInterface();
77static ExtObject makeStaticObject(Orient* p);
78static ExtObject makeDynamicObject(Orient_Ext* p);
79static Orient_Ext* fromObject(const ExtValue& v);
80static Param& getStaticParam();
81static ParamEntry* getStaticParamtab();
82};
83
84#endif
Note: See TracBrowser for help on using the repository browser.