/[libvob]/libvob/include/vob/trans/Primitives.hxx
ViewVC logotype

Diff of /libvob/include/vob/trans/Primitives.hxx

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

revision 1.5 by tjl, Fri Jun 6 08:31:00 2003 UTC revision 1.6 by tjl, Mon Sep 1 10:20:30 2003 UTC
# Line 167  namespace Primitives { Line 167  namespace Primitives {
167          // alternative versions for transforms with and without          // alternative versions for transforms with and without
168          // given features.          // given features.
169    
170          bool performGL(GLPerformablePrimitiveTransform &t) const {          bool performGL(const GLPerformablePrimitiveTransform *_) const {
171              t.performGL();              t.performGL();
172              return super->performGL();              return super->performGL();
173          }          }
174          template<class T> bool performGL(T &t) const {          bool performGL(const PotentiallyGLPerformablePrimitiveTransform *_) const {
175                if(!t.performGL()) return false;
176                return super->performGL();
177            }
178            bool performGL(const void *t) const {
179              return false;              return false;
180          }          }
181    
182          bool canPerformGL(GLPerformablePrimitiveTransform &t) const {          bool canPerformGL(const GLPerformablePrimitiveTransform *_) const {
183              return super->canPerformGL();              return super->canPerformGL();
184          }          }
185          template<class T> bool canPerformGL(T &t) const {          bool canPerformGL(const PotentiallyGLPerformablePrimitiveTransform *_) const {
186                return t.canPerformGL() && super->canPerformGL() ;
187            }
188            bool canPerformGL(const void *t) const {
189              return false;              return false;
190          }          }
191    
# Line 196  namespace Primitives { Line 203  namespace Primitives {
203              return super->isNonlinear();              return super->isNonlinear();
204          }          }
205    
206          float selfNonlinearity(NonlinearPrimitiveTransform &t,          float selfNonlinearity(const NonlinearPrimitiveTransform *_,
207                      const ZPt &p, float radius) const {                      const ZPt &p, float radius) const {
208              return t.nonlinearity(p, radius);              return t.nonlinearity(p, radius);
209          }          }
210          template<class T> float selfNonlinearity(T &t,          float selfNonlinearity(const void *t,
211                      const ZPt &p, float radius) const {                      const ZPt &p, float radius) const {
212              return 0;              return 0;
213          }          }
# Line 236  namespace Primitives { Line 243  namespace Primitives {
243              glVertex3f(mp.x, mp.y, mp.z);              glVertex3f(mp.x, mp.y, mp.z);
244          }          }
245    
246          virtual bool performGL() const { return performGL(t); }          virtual bool performGL() const { return performGL(&t); }
247    
248          virtual bool canPerformGL() const { return canPerformGL(t); }          virtual bool canPerformGL() const { return canPerformGL(&t); }
249    
250          virtual float nonlinearity(const ZPt &p, float radius) const {          virtual float nonlinearity(const ZPt &p, float radius) const {
251              float s = selfNonlinearity(t, p, radius);              float s = selfNonlinearity(&t, p, radius);
252              ZPt mp;              ZPt mp;
253              t.tr(p, mp);              t.tr(p, mp);
254              float su = super->nonlinearity(mp, radius);              float su = super->nonlinearity(mp, radius);
# Line 257  namespace Primitives { Line 264  namespace Primitives {
264          virtual void dump(std::ostream &out) const {          virtual void dump(std::ostream &out) const {
265              out << "[inversetrans "<<              out << "[inversetrans "<<
266                  PrimitiveHierarchicalTransform<OrigPrimitive>::name                  PrimitiveHierarchicalTransform<OrigPrimitive>::name
267                      << " ";                      <<"("<<this->canPerformGL()
268                        << ") ";
269              super->dump(out);              super->dump(out);
270              dumpParams(&t, out);              dumpParams(&t, out);
271              out <<"]";              out <<"]";
# Line 480  namespace Primitives { Line 488  namespace Primitives {
488          }          }
489    
490          virtual void dump(std::ostream &out) const {          virtual void dump(std::ostream &out) const {
491              out << "[trans "<<name<< " ";              out << "[trans "<<name<<"("<<this->canPerformGL()<<
492                        ") ";
493              super->dump(out);              super->dump(out);
494              dumpParams(&t, out);              dumpParams(&t, out);
495              out <<"]";              out <<"]";

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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