/[libvob]/libvob/include/vob/vobs/Paper.hxx
ViewVC logotype

Diff of /libvob/include/vob/vobs/Paper.hxx

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

revision 1.13 by tjl, Mon Jun 16 16:16:30 2003 UTC revision 1.14 by tjl, Wed Jun 18 09:44:38 2003 UTC
# Line 125  inline float split(Verts &v, float dicel Line 125  inline float split(Verts &v, float dicel
125  }  }
126    
127  inline void addToAccum(Stats::TexAccum *acc, Verts &v,  inline void addToAccum(Stats::TexAccum *acc, Verts &v,
128                  int v0, int v1, int v2) {                  int v0, int v1, int v2, float texAreaMult) {
129      acc->add(      acc->add(
130              v.points[v0].final,              v.points[v0].final,
131              v.points[v1].final,              v.points[v1].final,
132              v.points[v2].final,              v.points[v2].final,
133              v.points[v0].orig,              v.points[v0].orig,
134              v.points[v1].orig,              v.points[v1].orig,
135              v.points[v2].orig);              v.points[v2].orig,
136                texAreaMult);
137  }  }
138    
139  inline int splitTri(Verts &v, float dicelen1, float dicelen2, int i, int j, int k) {  inline int splitTri(Verts &v, float dicelen1, float dicelen2, int i, int j, int k) {
# Line 210  const int PAPERQUAD_CS2_TO_SCREEN = 1; Line 211  const int PAPERQUAD_CS2_TO_SCREEN = 1;
211  const int PAPERQUAD_USE_VERTEX_PROGRAM = 2;  const int PAPERQUAD_USE_VERTEX_PROGRAM = 2;
212  const int PAPERQUAD_NONL_MAXLEN = 4;  const int PAPERQUAD_NONL_MAXLEN = 4;
213    
214    
215  /** A paperquad with no separation between paper and object coordinates.  /** A paperquad with no separation between paper and object coordinates.
216   */   */
217  class FixedPaperQuad {  class FixedPaperQuad {
# Line 223  public: Line 225  public:
225      int diceDepth;      int diceDepth;
226    
227      Stats::TexAccum *texAccum;      Stats::TexAccum *texAccum;
228        float texAreaMult;
229    
230      template<class F> void params(F &f) {      template<class F> void params(F &f) {
231          f(paper, x0, y0, x1, y1, flags, diceLength, diceLength2, diceDepth,          f(paper, x0, y0, x1, y1, flags, diceLength, diceLength2, diceDepth,
232                  texAccum);                  texAccum, texAreaMult);
233      }      }
234    
235    
# Line 256  public: Line 259  public:
259                              diceLength*2, diceLength2*2, _1, _2, _3));                              diceLength*2, diceLength2*2, _1, _2, _3));
260                  // Then, calculate the texture surface estimates                  // Then, calculate the texture surface estimates
261                  triangler.iterateTriangles(                  triangler.iterateTriangles(
262                          bind(addToAccum, texAccum, ref(verts), _1, _2, _3));                          bind(addToAccum, texAccum, ref(verts), _1, _2, _3, texAreaMult));
263              }              }
264    
265              // Dice to finish              // Dice to finish

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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