862 |
""", |
""", |
863 |
"ExtraClass" : """ |
"ExtraClass" : """ |
864 |
template<class Coords> struct Vertexer { |
template<class Coords> struct Vertexer { |
865 |
const Coords &c; |
const Coords &c, &ci, &c1; |
866 |
float scale; |
float scale; |
867 |
float z; |
float z; |
868 |
Vertexer(Coords &c, float scale, float z) : c(c), scale(scale), z(z) { } |
Vertexer(Coords &c, Coords &ci, Coords &c1, |
869 |
|
float scale, float z) : c(c), ci(ci), c1(c1), scale(scale), z(z) { } |
870 |
template<class T> void operator()(const T &x, const T &y) { |
template<class T> void operator()(const T &x, const T &y) { |
871 |
ZPt tmp(x * scale, y * scale, 0); |
ZPt tmp(x, y, 0); |
872 |
|
//tmp = c1.transform(tmp); |
873 |
|
//tmp = ci.transform(tmp); |
874 |
c.vertex(tmp); |
c.vertex(tmp); |
875 |
DBG(dbg_horiztext2) << "Vertex: "<<x<<" "<<y<<" "<<tmp<<" "<<c.transform(tmp) |
//DBG(dbg_horiztext2) << "Vertex: "<<x<<" "<<y<<" "<<tmp<<" "<<c.transform(tmp) |
876 |
<< "\\n"; |
// << "\\n"; |
877 |
} |
} |
878 |
}; |
}; |
879 |
""", |
""", |
882 |
ZPt orig = coords2inv->transform(coords1.transform(origin)); |
ZPt orig = coords2inv->transform(coords1.transform(origin)); |
883 |
// ZPt h = coords2inv->transform(coords1.transform(origin+ZVec(0,h1,0))); |
// ZPt h = coords2inv->transform(coords1.transform(origin+ZVec(0,h1,0))); |
884 |
// float scale = (h-orig).length(); |
// float scale = (h-orig).length(); |
885 |
|
ZPt zero(0, 0, 0); |
886 |
|
ZPt one(1, 1, 0); |
887 |
|
DBG(dbg_horiztext2) << "HT2 coordsys: "<<coords1.transform(zero)<<coords2.transform(zero)<<coords2.transform(one)<<"\\n"; |
888 |
DBG(dbg_horiztext2) << "Origin: "<<origin<<" "<<coords1.transform(origin)<<orig<<"\\n"; |
DBG(dbg_horiztext2) << "Origin: "<<origin<<" "<<coords1.transform(origin)<<orig<<"\\n"; |
889 |
// DBG(dbg_horiztext2) << "h: "<<h1<<" "<<h<<" "<<scale<<"\\n"; |
// DBG(dbg_horiztext2) << "h: "<<h1<<" "<<h<<" "<<scale<<"\\n"; |
890 |
Vertexer<Coords> v(coords2, h1, orig.z); |
Vertexer<Coords> v(coords2, *coords2inv, coords1, h1, orig.z); |
891 |
glPushAttrib(GL_ENABLE_BIT); |
glPushAttrib(GL_ENABLE_BIT); |
892 |
glEnable(GL_BLEND); |
glEnable(GL_BLEND); |
893 |
Text::renderIter(*r, txt.begin(), txt.end(), |
Text::renderIter(*r, txt.begin(), txt.end(), |