/[libvob]/libvob/include/vob/DisablablePrimitives.hxx
ViewVC logotype

Diff of /libvob/include/vob/DisablablePrimitives.hxx

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

revision 1.4 by tjl, Fri Mar 14 15:03:43 2003 UTC revision 1.5 by tjl, Fri Mar 14 15:10:59 2003 UTC
# Line 34  Line 34 
34  #include <GL/gl.h>  #include <GL/gl.h>
35    
36  #include <vob/Primitives.hxx>  #include <vob/Primitives.hxx>
37    #include <vob/LinearPrimitives.hxx>
38  #include <vob/Debug.hxx>  #include <vob/Debug.hxx>
39    
40  namespace Vob {  namespace Vob {
# Line 43  DBGVAR(dbg_cull, "Vob.Primitives.Cull"); Line 44  DBGVAR(dbg_cull, "Vob.Primitives.Cull");
44    
45      /** Base class for... */      /** Base class for... */
46      class DisablableIdentity :      class DisablableIdentity :
47        public PrimitiveTransform,        public Box,
48        public DisablablePrimitiveTransform {        public DisablablePrimitiveTransform {
49      public:      public:
50        bool enabled;        bool enabled;
51    
52          DisablableIdentity() : Box(Pt(1,1)) { }
53    
54        bool shouldBeDrawn() const {        bool shouldBeDrawn() const {
55          if (dbg_cull) printf("\nCull.shouldBeDrawn() called;");          if (dbg_cull) printf("\nCull.shouldBeDrawn() called;");
56          return enabled;          return enabled;
# Line 67  DBGVAR(dbg_cull, "Vob.Primitives.Cull"); Line 70  DBGVAR(dbg_cull, "Vob.Primitives.Cull");
70      public:      public:
71        enum { NDepends = 3 };        enum { NDepends = 3 };
72        template<class SPtr> void setParams(SPtr depends) {        template<class SPtr> void setParams(SPtr depends) {
73            box = depends[0]->getSqSize();
74          if (cullShouldBeDrawn(depends[1], depends[2])) enabled = true;          if (cullShouldBeDrawn(depends[1], depends[2])) enabled = true;
75          else enabled = false;          else enabled = false;
76    

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

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