/[gzz]/gzz/gfx/libcoords/Coords.cxx
ViewVC logotype

Diff of /gzz/gfx/libcoords/Coords.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by tjl, Thu Sep 26 08:31:24 2002 UTC revision 1.8 by tjl, Thu Sep 26 10:02:52 2002 UTC
# Line 12  namespace Coords { Line 12  namespace Coords {
12          virtual void vertex(const ZPt &p) const {          virtual void vertex(const ZPt &p) const {
13              glVertex3f(p.x, p.y, p.z);              glVertex3f(p.x, p.y, p.z);
14          }          }
15            virtual bool canPerformGL() { return true; }
16            virtual bool performGL() {
17                return true;
18            }
19      };      };
20    
21      /** Affine coordinate system (in xy), offset in z.      /** Affine coordinate system (in xy), offset in z.
# Line 38  namespace Coords { Line 42  namespace Coords {
42              tr(p, mp);              tr(p, mp);
43              super->vertex(mp);              super->vertex(mp);
44          }          }
45          virtual bool canPerformGL() { return true; }          virtual bool canPerformGL() { return super->canPerformGL(); }
46          virtual bool performGL() {          virtual bool performGL() {
47                if(!super->performGL()) return false;
48              GLfloat matrix[16] = {              GLfloat matrix[16] = {
49                  params[3], params[5], 0, 0,                  params[3], params[5], 0, 0,
50                  params[4], params[6], 0, 0,                  params[4], params[6], 0, 0,
# Line 61  namespace Coords { Line 66  namespace Coords {
66          enum { NParams = 1 };          enum { NParams = 1 };
67          virtual void setParams(float *params) {          virtual void setParams(float *params) {
68              CoordSys::setParams(params);              CoordSys::setParams(params);
69              s = sin(params[0]);              s = sin(params[0] * M_PI / 180);
70              c = cos(params[0]);              c = cos(params[0] * M_PI / 180);
71          }          }
72          /** Perform the internal transformation of this          /** Perform the internal transformation of this
73           * coordsys.           * coordsys.
# Line 82  namespace Coords { Line 87  namespace Coords {
87              tr(p, mp);              tr(p, mp);
88              super->vertex(mp);              super->vertex(mp);
89          }          }
90            virtual bool canPerformGL() { return super->canPerformGL(); }
91            virtual bool performGL() {
92                if(!super->performGL()) return false;
93                glRotatef(params[0], 0, 0, 1);
94                return true;
95            }
96      };      };
97    
98      ;      ;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26