gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob include/vob/DisablablePrimitives.hxx src...


From: Asko Soukka
Subject: [Gzz-commits] libvob include/vob/DisablablePrimitives.hxx src...
Date: Fri, 14 Mar 2003 09:46:51 -0500

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Asko Soukka <address@hidden>    03/03/14 09:46:33

Modified files:
        include/vob    : DisablablePrimitives.hxx 
        src/jni        : Makefile 

Log message:
        rikki, mikä rikki

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/DisablablePrimitives.hxx.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Makefile.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: libvob/include/vob/DisablablePrimitives.hxx
diff -u libvob/include/vob/DisablablePrimitives.hxx:1.2 
libvob/include/vob/DisablablePrimitives.hxx:1.3
--- libvob/include/vob/DisablablePrimitives.hxx:1.2     Fri Mar 14 06:46:00 2003
+++ libvob/include/vob/DisablablePrimitives.hxx Fri Mar 14 09:45:50 2003
@@ -34,10 +34,13 @@
 #include <GL/gl.h>
 
 #include <vob/Primitives.hxx>
+#include <vob/Debug.hxx>
 
 namespace Vob {
 namespace Primitives {
        
+DBGVAR(dbg_cull, "Vob.Primitives.Cull");
+
     /** Base class for... */
     class DisablableIdentity :
       public PrimitiveTransform,
@@ -46,24 +49,32 @@
       bool enabled;
 
       typedef DisablableIdentity InverseType;
-      void inverse(InverseType &into) const { }
+      void inverse(InverseType &into) const { into = *this; }
     };
 
     /** Culling transform can decide not to be drawn when its
      * parents' boxes do not intersect.
      */
     class Cull : 
-       public DisablableIdentity
+      public DisablableIdentity,
+      public DependentPrimitiveTransform
     {
     public:
       enum { NDepends = 3 };
-
       template<class SPtr> void setParams(SPtr depends) {
-       if (shouldBeDrawn(depends[1], depends[2])) enabled = false;
-       else enabled = true;
+       if (shouldBeDrawn(depends[1], depends[2])) enabled = true;
+       else enabled = false;
+
+       if (dbg_cull) {
+         if (enabled) printf("\nCull.enabled: true");
+         else printf("\nCull.enagled: false");
+       }
       }
 
-      bool shouldBeDrawn() const { return enabled; }
+      bool shouldBeDrawn() const {
+       if (dbg_cull) printf("\nCull.shouldBeDrawn() called;");
+       return enabled;
+      }
 
       /** Cull transforms' shouldBeDrawn() returns true always when boxes 
        * of its test and clip coordinate systems do intersect. When
Index: libvob/src/jni/Makefile
diff -u libvob/src/jni/Makefile:1.12 libvob/src/jni/Makefile:1.13
--- libvob/src/jni/Makefile:1.12        Wed Mar 12 08:40:28 2003
+++ libvob/src/jni/Makefile     Fri Mar 14 09:46:26 2003
@@ -24,7 +24,7 @@
 jnilib: libvobjni.so
 
 Gen: Gen.o
-       $(CXX) -o Gen Gen.o $(LIBS)
+       $(CXX) -o Gen Gen.o ../util/Debug.o $(LIBS)$
 
 GLRen.gen.cxx: Gen GLRen.template.java
        (cd ../..; src/jni/Gen)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]