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

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

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

revision 1.8 by tjl, Sat Apr 19 19:37:32 2003 UTC revision 1.9 by tjl, Thu May 29 08:00:20 2003 UTC
# Line 89  namespace Vob { Line 89  namespace Vob {
89          virtual void render2(const Transform &t0, const Transform &t1) const = 0;          virtual void render2(const Transform &t0, const Transform &t1) const = 0;
90      };      };
91    
92        /** A vob which uses two coordinate systems. A specialization
93         * of Vob for efficiency.
94         */
95        class Vob3 : public Vob {
96        public:
97            virtual ~Vob3() {}
98            virtual int nCoordsys() const { return 3; };
99            virtual void render(const Transform **t, int n) const {
100                render3(*(t[0]), *(t[1]), *(t[2]));
101            }
102            virtual void render3(const Transform &t0,
103                            const Transform &t1,
104                            const Transform &t2) const = 0;
105        };
106    
107    
108      /** A template class which implements Vob, given a class with a render() method.      /** A template class which implements Vob, given a class with a render() method.
109       * Used by the code generation mechanism to decouple defining Vobs from the       * Used by the code generation mechanism to decouple defining Vobs from the
110       * actual Vob interface.       * actual Vob interface.
# Line 125  namespace Vob { Line 141  namespace Vob {
141          virtual const char* getVobName() const { return name; }          virtual const char* getVobName() const { return name; }
142      };      };
143    
144        /** A template class which implements Vob, given a class with a render(t0, t1, t2) method.
145         * Used by the code generation mechanism to decouple defining Vobs from the
146         * actual Vob interface.
147         */
148        template<class VobSeed> class Vob3Maker : public Vob3, public VobSeed {
149            static char* name;
150            virtual void render3(const Transform &t0,
151                    const Transform &t1,
152                    const Transform &t2
153                    ) const {
154                VobSeed::render(t0, t1, t2);
155            }
156            virtual const char* getVobName() const { return name; }
157        };
158    
159        /** A template class which implements Vob, given a class with a render(t **, n) method.
160         * Used by the code generation mechanism to decouple defining Vobs from the
161         * actual Vob interface.
162         */
163        template<class VobSeed> class VobNMaker : public Vob, public VobSeed {
164            static char* name;
165            virtual int nCoordsys() const {
166                return -1;
167            };
168            virtual void render(const Transform **t, int n) const {
169                VobSeed::render(t, n);
170            }
171            virtual const char* getVobName() const { return name; }
172        };
173    
174    
175  }  }
176  //@Include: Transform.hxx  //@Include: Transform.hxx
177  //@Include: Primitives.hxx  //@Include: Primitives.hxx

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

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