43 |
namespace Vob { |
namespace Vob { |
44 |
namespace Vobs { |
namespace Vobs { |
45 |
|
|
46 |
|
using namespace Vob::VecGL; |
47 |
|
|
48 |
/** A line drawn between the centers of two coordinate systems. |
/** A line drawn between the centers of two coordinate systems. |
49 |
*/ |
*/ |
50 |
struct LineConnector { |
struct LineConnector { |
166 |
}; |
}; |
167 |
VOB_DEFINED(CallListBoxCoorded); |
VOB_DEFINED(CallListBoxCoorded); |
168 |
|
|
169 |
|
/** For debugging differences between GL and real transformations. |
170 |
|
*/ |
171 |
|
struct Quad { |
172 |
|
enum { NTrans = 1 }; |
173 |
|
int flags; |
174 |
|
template<class F> void params(F &f) { |
175 |
|
f(flags); |
176 |
|
} |
177 |
|
template<class T> void render(const T &t) const { |
178 |
|
Pt boxwh = t.getSqSize(); |
179 |
|
if(flags & 1) { |
180 |
|
glPushMatrix(); |
181 |
|
t.performGL(); |
182 |
|
glBegin(GL_QUAD_STRIP); |
183 |
|
glVertex(ZPt(0,0,0)); |
184 |
|
glVertex(ZPt(boxwh.x,0,0)); |
185 |
|
glVertex(ZPt(0,boxwh.y,0)); |
186 |
|
glVertex(ZPt(boxwh.x,boxwh.y,0)); |
187 |
|
glEnd(); |
188 |
|
glPopMatrix(); |
189 |
|
} else { |
190 |
|
glBegin(GL_QUAD_STRIP); |
191 |
|
glVertex(t.transform(ZPt(0,0,0))); |
192 |
|
glVertex(t.transform(ZPt(boxwh.x,0,0))); |
193 |
|
glVertex(t.transform(ZPt(0,boxwh.y,0))); |
194 |
|
glVertex(t.transform(ZPt(boxwh.x,boxwh.y,0))); |
195 |
|
glEnd(); |
196 |
|
} |
197 |
|
} |
198 |
|
}; |
199 |
|
VOB_DEFINED(Quad); |
200 |
|
|
201 |
|
|
202 |
|
/** Timing transformations. |
203 |
|
*/ |
204 |
struct TransTest { |
struct TransTest { |
205 |
enum { NTrans = 1 }; |
enum { NTrans = 1 }; |
206 |
|
|