[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/libcoords Coords.cxx Coords.hxx
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gfx/libcoords Coords.cxx Coords.hxx |
Date: |
Wed, 25 Sep 2002 12:39:27 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/09/25 12:39:26
Modified files:
gfx/libcoords : Coords.cxx Coords.hxx
Log message:
Now, the irregu demo shows up. Not too bad.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.hxx.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gzz/gfx/libcoords/Coords.cxx
diff -c gzz/gfx/libcoords/Coords.cxx:1.4 gzz/gfx/libcoords/Coords.cxx:1.5
*** gzz/gfx/libcoords/Coords.cxx:1.4 Wed Sep 25 12:16:46 2002
--- gzz/gfx/libcoords/Coords.cxx Wed Sep 25 12:39:26 2002
***************
*** 4,9 ****
--- 4,14 ----
namespace Coords {
DBGVAR(dbg, "Coords.general");
+ bool CoordSys::performGL() {
+ DBG(dbg) << "Potential problem: performGL default implementation
called, means incorrect rendering\n";
+ return false;
+ }
+
class RootCoords : public CoordSys {
public:
virtual ZPt transform(const ZPt &p) const {
***************
*** 38,43 ****
--- 43,60 ----
tr(p, mp);
super->vertex(mp);
}
+ virtual bool canPerformGL() { return true; }
+ virtual bool performGL() {
+ GLfloat matrix[16] = {
+ params[3], params[4], 0, 0,
+ params[5], params[6], 0, 0,
+ 0, 0, 1, 0,
+ params[0], params[1], params[2], 1
+ };
+ glMultMatrixf(matrix);
+ return true;
+ }
+
};
/** Rotation clockwise.
Index: gzz/gfx/libcoords/Coords.hxx
diff -c gzz/gfx/libcoords/Coords.hxx:1.4 gzz/gfx/libcoords/Coords.hxx:1.5
*** gzz/gfx/libcoords/Coords.hxx:1.4 Wed Sep 25 12:16:46 2002
--- gzz/gfx/libcoords/Coords.hxx Wed Sep 25 12:39:26 2002
***************
*** 53,59 ****
* is in an undefined state. If this is
* not acecptable, try canPerformGL() first.
*/
! virtual bool performGL() { return false; }
virtual ~CoordSys() { }
--- 53,59 ----
* is in an undefined state. If this is
* not acecptable, try canPerformGL() first.
*/
! virtual bool performGL() ;
virtual ~CoordSys() { }