gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] Asko 2002-10-22 (cullingcoordsys)


From: Tuomas Lukka
Subject: Re: [Gzz] Asko 2002-10-22 (cullingcoordsys)
Date: Tue, 22 Oct 2002 21:59:40 +0300
User-agent: Mutt/1.4i

> 15:03 @<humppake> tuomasl: update coords.cxx, ehtisitkö katsoa meninkö ihan 
> metsään? Distortoinnin käsittelystä puuttuu tosin lähes kokonaan "maksimien" 
> haarukointi.
> 15:03 @<humppake> tuomasl: Jos olen metsässä ja haluat sen torstaiksi, voi 
> olla, että joudut itse tekemään O:-)
> 15:03 @<humppake> tuomasl: Jos en ole ihan metsässä, voisitko auttaa sen 
> rajapinnan rakentamisessa, että voisin tehdä testejä.
> 15:04 @<humppake> Tosin lähden myös aika pian... (syömättä vielä ja edari 
> viideltä).
> 15:17 @<humppake> Syömään -> (ja vasta huomenna takaisin, koska rikoin eilen 
> kotikoneeni :)

There are some small mistakes:

        virtual CoordSys *createInverse() {
            return new ConcatCoordSys(super->getInverse(), 
clipSuper->getInverse());
        }

is *really* not what you want. What you are saying that coordinates
should be transformed from screen coordinates to coordinates in super() by
first transforming them by inverse of super and them by inverse of clipsuper!

Clipsuper should have no effect here.

Likewise,

        virtual void vertex(const ZPt &p) const {
            super->vertex(p);
            clipSuper->vertex(p);
        }

this is bogus: you're calling glVertex twice, once after having
transformed p into screen coordinates (correct) and once after transforming
it by clipSuper (wrong). The resulting graphics might be QUITE interesting, to
say the least.

        virtual ZPt transform(const ZPt &p) const {
            return super->transform(p);
        }

This, on the other hand, is exactly correct.

        virtual bool canPerformGL() { 
            return super->canPerformGL() && clipSuper->canPerformGL();
        }

Wrong again: what has clipSuper's being able to do the transform in OpenGL
have to do with this transformation's ability? Nothing.

        virtual bool performGL() { 
            if(!super->performGL()) return false;
            return clipSuper->performGL();
        }

And once again. The opengl vertices would be transformed by BOTH super and 
clipsuper -
not good. Only super->...

Now, please DON'T fix these before you have developed a test for each one first!
It's only that way that you can make sure things are right.

There are lots of small slips, but overall it seems quite good, very much in 
the right
direction. I didn't look too much at the bounding box logic - make sure you 
have a good
variety of tests for that, too.

        Tuomas




reply via email to

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