diff --git a/vcg/complex/local_optimization.h b/vcg/complex/local_optimization.h index 47bbea40..02191ddd 100644 --- a/vcg/complex/local_optimization.h +++ b/vcg/complex/local_optimization.h @@ -22,6 +22,9 @@ ****************************************************************************/ /**************************************************************************** $Log: not supported by cvs2svn $ + Revision 1.13 2005/01/19 10:33:50 cignoni + Improved ClearHeap management + Revision 1.12 2004/12/10 01:02:48 cignoni added an inline and removed loggng @@ -272,7 +275,7 @@ public: // Chiamata dalla do decimate ogni tanto quando lo heap diventa troppo grande (>fn*3) void ClearHeap() { - HeapType::iterator hi; + typename HeapType::iterator hi; int sz=h.size(); for(hi=h.begin();hi!=h.end();++hi) { diff --git a/vcg/complex/local_optimization/tri_edge_collapse_quadric.h b/vcg/complex/local_optimization/tri_edge_collapse_quadric.h index b96df0fd..6d39e48d 100644 --- a/vcg/complex/local_optimization/tri_edge_collapse_quadric.h +++ b/vcg/complex/local_optimization/tri_edge_collapse_quadric.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.6 2005/01/19 10:35:28 cignoni +Better management of symmetric/asymmetric edge collapses + Revision 1.5 2004/12/10 01:07:15 cignoni Moved param classes inside; added support for optimal placement and symmetric; added update heap also here (not only in the base class) @@ -98,6 +101,7 @@ public: typedef typename TriMeshType::ScalarType ScalarType; typedef math::Quadric< double > QuadricType; typedef typename TriMeshType::FaceType FaceType; + typedef typename TriMeshType::VertexType VertexType; class QParameter { @@ -144,14 +148,14 @@ public: inline TriEdgeCollapseQuadric(const EdgeType &p, int i) //:TEC(p,i){} { - localMark = i; - pos=p; - _priority = ComputePriority(); + this->localMark = i; + this->pos=p; + this->_priority = ComputePriority(); } inline bool IsFeasible(){ - bool res = ( !Params().PreserveTopology || LinkConditions(pos) ); + bool res = ( !Params().PreserveTopology || LinkConditions(this->pos) ); if(!res) ++( TriEdgeCollapse< TriMeshType,MYTYPE>::FailStat::LinkConditionEdge() ); return res; } @@ -159,9 +163,9 @@ public: void Execute(TriMeshType &m) { CoordType newPos; if(Params().OptimalPlacement) newPos= ComputeMinimal(); - else newPos=pos.V(1)->P(); - pos.V(1)->q+=pos.V(0)->q; - int FaceDel=DoCollapse(pos, newPos); // v0 is deleted and v1 take the new position + else newPos=this->pos.V(1)->P(); + this->pos.V(1)->q+=this->pos.V(0)->q; + int FaceDel=DoCollapse(this->pos, newPos); // v0 is deleted and v1 take the new position m.fn-=FaceDel; --m.vn; } @@ -227,11 +231,11 @@ public: assert(x.F()->V(x.I())==&(*vi)); if((x.V0()IsRW() && !x.V1()->IsV()){ x.V1()->SetV(); - h_ret.push_back(HeapElem(new MYTYPE(EdgeType(x.V0(),x.V1()),GlobalMark() ))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType(x.V0(),x.V1()),TriEdgeCollapse< TriMeshType,MYTYPE>::GlobalMark() ))); } if((x.V0()IsRW()&& !x.V2()->IsV()){ x.V2()->SetV(); - h_ret.push_back(HeapElem(new MYTYPE(EdgeType(x.V0(),x.V2()),GlobalMark() ))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType(x.V0(),x.V2()),TriEdgeCollapse< TriMeshType,MYTYPE>::GlobalMark() ))); } } } @@ -246,10 +250,10 @@ public: { assert(x.F()->V(x.I())==&(*vi)); if(x.V()->IsRW() && x.V1()->IsRW() && !m.IsMarked(x.F()->V1(x.I()))){ - h_ret.push_back( HeapElem( new MYTYPE( EdgeType (x.V(),x.V1()),GlobalMark()))); + h_ret.push_back( HeapElem( new MYTYPE( EdgeType (x.V(),x.V1()),TriEdgeCollapse< TriMeshType,MYTYPE>::GlobalMark()))); } if(x.V()->IsRW() && x.V2()->IsRW() && !m.IsMarked(x.F()->V2(x.I()))){ - h_ret.push_back( HeapElem( new MYTYPE( EdgeType (x.V(),x.V2()),GlobalMark()))); + h_ret.push_back( HeapElem( new MYTYPE( EdgeType (x.V(),x.V2()),TriEdgeCollapse< TriMeshType,MYTYPE>::GlobalMark()))); } } } @@ -287,8 +291,8 @@ public: typename vcg::face::VFIterator x; std::vector on; // original normals typename TriMeshType::VertexType * v[2]; - v[0] = pos.V(0); - v[1] = pos.V(1); + v[0] = this->pos.V(0); + v[1] = this->pos.V(1); if(Params().NormalCheck){ // Compute maximal normal variation // store the old normals for non-collapsed face in v0 @@ -367,8 +371,8 @@ public: //Rrestore old position of v0 and v1 v[0]->P()=OldPos0; v[1]->P()=OldPos1; - _priority = -error; - return _priority; + this->_priority = -error; + return this->_priority; } // @@ -376,10 +380,11 @@ public: // inline void UpdateHeap(HeapType & h_ret) { - GlobalMark()++; + this->GlobalMark()++; VertexType *v[2]; - v[0]= pos.V(0);v[1]=pos.V(1); - v[1]->IMark() = GlobalMark(); + v[0]= this->pos.V(0); + v[1]= this->pos.V(1); + v[1]->IMark() = this->GlobalMark(); // First loop around the remaining vertex to unmark visited flags vcg::face::VFIterator vfi(v[1]); @@ -399,29 +404,29 @@ public: if( !(vfi.V1()->IsV()) && vfi.V1()->IsRW()) { vfi.V1()->SetV(); - h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V0(),vfi.V1()), GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V0(),vfi.V1()), this->GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); if(!IsSymmetric()){ - h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V1(),vfi.V0()), GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V1(),vfi.V0()), this->GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); } } if( !(vfi.V2()->IsV()) && vfi.V2()->IsRW()) { vfi.V2()->SetV(); - h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V0(),vfi.V2()),GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V0(),vfi.V2()),this->GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); if(!IsSymmetric()){ - h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V2(),vfi.V0()), GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V2(),vfi.V0()), this->GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); } } if(Params().SafeHeapUpdate && vfi.V1()->IsRW() && vfi.V2()->IsRW() ) { - h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V1(),vfi.V2()),GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V1(),vfi.V2()),this->GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); if(!IsSymmetric()){ - h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V2(),vfi.V1()), GlobalMark()))); + h_ret.push_back(HeapElem(new MYTYPE(EdgeType (vfi.V2(),vfi.V1()), this->GlobalMark()))); std::push_heap(h_ret.begin(),h_ret.end()); } } @@ -529,8 +534,8 @@ static void InitQuadric(TriMeshType &m) CoordType ComputeMinimal() { typename TriMeshType::VertexType * v[2]; - v[0] = pos.V(0); - v[1] = pos.V(1); + v[0] = this->pos.V(0); + v[1] = this->pos.V(1); QuadricType q=v[0]->q; q+=v[1]->q; diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h index 19a33c65..4ea3fbf8 100644 --- a/vcg/math/matrix44.h +++ b/vcg/math/matrix44.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.24 2005/03/18 00:14:39 cignoni +removed small gcc compiling issues + Revision 1.23 2005/03/15 11:40:56 cignoni Added operator*=( std::vector ...) to apply a matrix to a vector of vertexes (replacement of the old style mesh.Apply(tr). @@ -538,7 +541,7 @@ template LinearSolve::LinearSolve(const Matrix44 &m): Matrix44::SetZero(); } } @@ -546,7 +549,7 @@ template LinearSolve::LinearSolve(const Matrix44 &m): Matrix44 T LinearSolve::Determinant() const { T det = d; for(int j = 0; j < 4; j++) - det *= ElementAt(j, j); + det *= this-> ElementAt(j, j); return det; } @@ -617,7 +620,7 @@ template bool LinearSolve::Decompose() { for(i = 0; i < 4; i++) { T largest = 0.0; for(j = 0; j < 4; j++) { - T t = math::Abs(ElementAt(i, j)); + T t = math::Abs(this->ElementAt(i, j)); if (t > largest) largest = t; } @@ -630,17 +633,17 @@ template bool LinearSolve::Decompose() { int imax; for(j = 0; j < 4; j++) { for(i = 0; i < j; i++) { - T sum = ElementAt(i,j); + T sum = this->ElementAt(i,j); for(int k = 0; k < i; k++) - sum -= ElementAt(i,k)*ElementAt(k,j); - ElementAt(i,j) = sum; + sum -= this->ElementAt(i,k)*this->ElementAt(k,j); + this->ElementAt(i,j) = sum; } T largest = 0.0; for(i = j; i < 4; i++) { - T sum = ElementAt(i,j); + T sum = this->ElementAt(i,j); for(k = 0; k < j; k++) - sum -= ElementAt(i,k)*ElementAt(k,j); - ElementAt(i,j) = sum; + sum -= this->ElementAt(i,k)*this->ElementAt(k,j); + this->ElementAt(i,j) = sum; T t = scaling[i] * math::Abs(sum); if(t >= largest) { largest = t; @@ -649,19 +652,19 @@ template bool LinearSolve::Decompose() { } if (j != imax) { for (int k = 0; k < 4; k++) { - T dum = ElementAt(imax,k); - ElementAt(imax,k) = ElementAt(j,k); - ElementAt(j,k) = dum; + T dum = this->ElementAt(imax,k); + this->ElementAt(imax,k) = this->ElementAt(j,k); + this->ElementAt(j,k) = dum; } d = -(d); scaling[imax] = scaling[j]; } index[j]=imax; - if (ElementAt(j,j) == 0.0) ElementAt(j,j) = (T)TINY; + if (this->ElementAt(j,j) == 0.0) this->ElementAt(j,j) = (T)TINY; if (j != 3) { - T dum = (T)1.0 / (ElementAt(j,j)); + T dum = (T)1.0 / (this->ElementAt(j,j)); for (i = j+1; i < 4; i++) - ElementAt(i,j) *= dum; + this->ElementAt(i,j) *= dum; } } return true; @@ -677,7 +680,7 @@ template Point4 LinearSolve::Solve(const Point4 &b) { x[ip] = x[i]; if(first!= -1) for(int j = first; j <= i-1; j++) - sum -= ElementAt(i,j) * x[j]; + sum -= this->ElementAt(i,j) * x[j]; else if(sum) first = i; x[i] = sum; @@ -685,8 +688,8 @@ template Point4 LinearSolve::Solve(const Point4 &b) { for (int i = 3; i >= 0; i--) { T sum = x[i]; for (int j = i+1; j < 4; j++) - sum -= ElementAt(i, j) * x[j]; - x[i] = sum / ElementAt(i, i); + sum -= this->ElementAt(i, j) * x[j]; + x[i] = sum / this->ElementAt(i, i); } return x; } diff --git a/vcg/math/quaternion.h b/vcg/math/quaternion.h index 3196c410..5b8803e3 100644 --- a/vcg/math/quaternion.h +++ b/vcg/math/quaternion.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.10 2004/12/15 18:45:50 tommyfranken +*** empty log message *** + Revision 1.9 2004/10/22 14:35:42 ponchio m.element(x, y) -> m[x][y] @@ -35,6 +38,9 @@ updated access to matrix44 elements through V() instead simple [] Revision 1.6 2004/03/25 14:57:49 ponchio Microerror. ($LOG$ -> $Log: not supported by cvs2svn $ +Microerror. ($LOG$ -> Revision 1.10 2004/12/15 18:45:50 tommyfranken +Microerror. ($LOG$ -> *** empty log message *** +Microerror. ($LOG$ -> Microerror. ($LOG$ -> Revision 1.9 2004/10/22 14:35:42 ponchio Microerror. ($LOG$ -> m.element(x, y) -> m[x][y] Microerror. ($LOG$ -> @@ -76,7 +82,7 @@ public: Quaternion operator*(const Quaternion &q) const; Quaternion &operator*=(const Quaternion &q); void Invert(); - + void SetIdentity(); @@ -87,7 +93,11 @@ public: void FromMatrix(Matrix44 &m); void ToMatrix(Matrix44 &m) const; - Point3 Rotate(const Point3 vec) const; + Point3 Rotate(const Point3 vec) const; + //duplicated ... because of gcc new confoming to ISO template derived classes + //do no 'see' parent members (unless explicitly specified) + const S & V ( const int i ) const { assert(i>=0 && i<4); return Point3::_v[i]; } + S & V ( const int i ) { assert(i>=0 && i<4); return Point3::_v[i]; } }; template Quaternion Interpolate(const Quaternion a, const Quaternion b, double t); @@ -286,10 +296,10 @@ template Quaternion Inverse(const Quaternion &m) { template Quaternion Interpolate(const Quaternion a, const Quaternion b, double t) { double v = a.V(0) * b.V(0) + a.V(1) * b.V(1) + a.V(2) * b.V(2) + a.V(3) * b.V(3); - double phi = Acos(v); + double phi = math::Acos(v); if(phi > 0.01) { - a = a * (Sin(phi *(1-t))/Sin(phi)); - b = b * (Sin(phi * t)/Sin(phi)); + a = a * (math::Sin(phi *(1-t))/math::Sin(phi)); + b = b * (math::Sin(phi * t)/math::Sin(phi)); } Quaternion c; diff --git a/vcg/simplex/edge/base.h b/vcg/simplex/edge/base.h index f0a1cc17..0b4a36c8 100644 --- a/vcg/simplex/edge/base.h +++ b/vcg/simplex/edge/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2004/10/25 16:25:12 ponchio +inline Set(...) -> inline void Set(...) + Revision 1.4 2004/10/25 08:21:17 ganovelli added: constructor,Set and some minor changes. @@ -756,12 +759,13 @@ public: void ClearB(int i) {_flags &= (~(BORDER0<' to the specialized constructors from a enum @@ -108,10 +111,10 @@ public: template inline void Import(const Color4 & b ) { - _v[0] = T(b[0]); - _v[1] = T(b[1]); - _v[2] = T(b[2]); - _v[3] = T(b[3]); + Point4::_v[0] = T(b[0]); + Point4::_v[1] = T(b[1]); + Point4::_v[2] = T(b[2]); + Point4::_v[3] = T(b[3]); } //inline void Import(const Color4 &b); @@ -124,18 +127,20 @@ public: inline void SetRGB( unsigned char r, unsigned char g, unsigned char b ) { - _v[0] = r; - _v[1] = g; - _v[2] = b; - _v[3] = 0; + Point4::_v[0] = r; + Point4::_v[1] = g; + Point4::_v[2] = b; + Point4::_v[3] = 0; } void SetHSVColor( float h, float s, float v){ float r,g,b; if(s==0.0){ // gray color r = g = b = v; - _v[0]=(unsigned char)(255*r);_v[1]=(unsigned char)(255*g);_v[2]=(unsigned char)(255*b); - _v[3]=255; + Point4::_v[0]=(unsigned char)(255*r); + Point4::_v[1]=(unsigned char)(255*g); + Point4::_v[2]=(unsigned char)(255*b); + Point4::_v[3]=255; return; } if(h==1.0) h = 0.0; @@ -155,8 +160,10 @@ public: case 4: r=t; g=p; b=v; break; case 5: r=v; g=p; b=q; break; } - _v[0]=(unsigned char)(255*r);_v[1]=(unsigned char)(255*g);_v[2]=(unsigned char)(255*b); - _v[3]=255; + Point4::_v[0]=(unsigned char)(255*r); + Point4::_v[1]=(unsigned char)(255*g); + Point4::_v[2]=(unsigned char)(255*b); + Point4::_v[3]=255; // _v[0]=r*256;_v[1]=g*256;_v[2]=b*256; } @@ -205,10 +212,10 @@ inline void Color4::lerp(const Color4 &c0, const Color4 &c1, const floa assert(x>=0); assert(x<=1); - _v[0]=(T)(c1._v[0]*x + c0._v[0]*(1.0f-x)); - _v[1]=(T)(c1._v[1]*x + c0._v[1]*(1.0f-x)); - _v[2]=(T)(c1._v[2]*x + c0._v[2]*(1.0f-x)); - _v[3]=(T)(c1._v[3]*x + c0._v[3]*(1.0f-x)); + Point4::_v[0]=(T)(c1._v[0]*x + c0._v[0]*(1.0f-x)); + Point4::_v[1]=(T)(c1._v[1]*x + c0._v[1]*(1.0f-x)); + Point4::_v[2]=(T)(c1._v[2]*x + c0._v[2]*(1.0f-x)); + Point4::_v[3]=(T)(c1._v[3]*x + c0._v[3]*(1.0f-x)); } template @@ -216,10 +223,10 @@ inline void Color4::lerp(const Color4 &c0, const Color4 &c1, const Colo { assert(fabs(ip[0]+ip[1]+ip[2]-1)<0.00001); - c[0]=(T)(c0.c[0]*ip[0] + c1.c[0]*ip[1]+ c2.c[0]*ip[2]); - c[1]=(T)(c0.c[1]*ip[0] + c1.c[1]*ip[1]+ c2.c[1]*ip[2]); - c[2]=(T)(c0.c[2]*ip[0] + c1.c[2]*ip[1]+ c2.c[2]*ip[2]); - c[3]=(T)(c0.c[3]*ip[0] + c1.c[3]*ip[1]+ c2.c[3]*ip[2]); + Point4::_v[0]=(T)(c0.c[0]*ip[0] + c1.c[0]*ip[1]+ c2.c[0]*ip[2]); + Point4::_v[1]=(T)(c0.c[1]*ip[0] + c1.c[1]*ip[1]+ c2.c[1]*ip[2]); + Point4::_v[2]=(T)(c0.c[2]*ip[0] + c1.c[2]*ip[1]+ c2.c[2]*ip[2]); + Point4::_v[3]=(T)(c0.c[3]*ip[0] + c1.c[3]*ip[1]+ c2.c[3]*ip[2]); } @@ -250,10 +257,10 @@ template <> template <> inline void Color4::Import(const Color4 &b) { - _v[0]=b[0]/255.0f; - _v[1]=b[1]/255.0f; - _v[2]=b[2]/255.0f; - _v[3]=b[3]/255.0f; + this->_v[0]=b[0]/255.0f; + this->_v[1]=b[1]/255.0f; + this->_v[2]=b[2]/255.0f; + this->_v[3]=b[3]/255.0f; } #if !defined(__GNUC__) @@ -262,10 +269,10 @@ template <> // [Bug c++/14479] enum definition in template class with template m template <> inline void Color4::Import(const Color4 &b) { - _v[0]=(unsigned char)(b[0]*255.0f); - _v[1]=(unsigned char)(b[1]*255.0f); - _v[2]=(unsigned char)(b[2]*255.0f); - _v[3]=(unsigned char)(b[3]*255.0f); + this->_v[0]=(unsigned char)(b[0]*255.0f); + this->_v[1]=(unsigned char)(b[1]*255.0f); + this->_v[2]=(unsigned char)(b[2]*255.0f); + this->_v[3]=(unsigned char)(b[3]*255.0f); } diff --git a/vcg/space/triangle3.h b/vcg/space/triangle3.h index 90dedb68..9cec5f81 100644 --- a/vcg/space/triangle3.h +++ b/vcg/space/triangle3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2004/07/15 13:22:37 cignoni +Added the standard P() access function instead of the shortcut P0() + Revision 1.2 2004/07/15 10:17:42 pietroni correct access to point funtions call in usage of triangle3 (ex. t.P(0) in t.P0(0)) @@ -88,16 +91,15 @@ bool InterpolationParameters(const CoordType & bq, ScalarType &a, ScalarType &b, { const ScalarType EPSILON = ScalarType(0.000001); - -#define x1 (cP(0).x()) -#define y1 (cP(0).y()) -#define z1 (cP(0).z()) -#define x2 (cP(1).x()) -#define y2 (cP(1).y()) -#define z2 (cP(1).z()) -#define x3 (cP(2).x()) -#define y3 (cP(2).y()) -#define z3 (cP(2).z()) +#define x1 (cP0.x()) +#define y1 (cP0.y()) +#define z1 (cP0.z()) +#define x2 (cP1.x()) +#define y2 (cP1.y()) +#define z2 (cP1.z()) +#define x3 (cP2.x()) +#define y3 (cP2.y()) +#define z3 (cP2.z()) #define px (bq.x()) #define py (bq.y()) #define pz (bq.z()) diff --git a/wrap/gui/frustum.h b/wrap/gui/frustum.h index 78b93563..72e25c25 100644 --- a/wrap/gui/frustum.h +++ b/wrap/gui/frustum.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.9 2005/03/02 15:13:45 ponchio +Minimal fix in remoteness (Bugged anyway) + Revision 1.8 2005/02/22 14:33:04 ponchio small bugs @@ -92,8 +95,8 @@ template T Frustum::Resolution(float dist) { template bool Frustum::IsOutside(Point3 &point) { Point3 r = Project(point); - if(r[0] < viewport[0] || r[0] > viewport[0]+viewport[2] || - r[1] < viewport[1] || r[1] > viewport[1]+viewport[3]) + if(r[0] < View::viewport[0] || r[0] > View::viewport[0]+View::viewport[2] || + r[1] < View::viewport[1] || r[1] > View::viewport[1]+View::viewport[3]) return true; return false; } @@ -105,18 +108,18 @@ template float Frustum::Remoteness(Point3 &point, T radius) { T rad = 1 + radius / (resolution * dist); T mindist = 0; T tmp; - tmp = viewport[0] - r[0] - rad; + tmp = View::viewport[0] - r[0] - rad; if(tmp > mindist) mindist = tmp; - tmp = r[0] - rad - (viewport[0] + viewport[2]); + tmp = r[0] - rad - (View::viewport[0] + View::viewport[2]); if(tmp > mindist) mindist = tmp; - tmp = viewport[1] - r[1] - rad; + tmp = View::viewport[1] - r[1] - rad; if(tmp > mindist) mindist = tmp; - tmp = r[1] - rad - (viewport[1] + viewport[3]); + tmp = r[1] - rad - (View::viewport[1] + View::viewport[3]); if(tmp > mindist) mindist = tmp; if(mindist == 0) return 0; - return 1 + (mindist / (viewport[0] + viewport[2])); + return 1 + (mindist / (View::viewport[0] + View::viewport[2])); } template bool Frustum::IsOutside(Point3 &point, T radius) { @@ -135,10 +138,10 @@ template T Frustum::Distance(Point3 &point, int plane) { template void Frustum::GetView() { View::GetView(); - float t = (float)(viewport[1] + viewport[3]); - float b = (float)viewport[1]; - float r = (float)(viewport[0] + viewport[2]); - float l = (float)viewport[0]; + float t = (float)(View::viewport[1] +View:: viewport[3]); + float b = (float)View::viewport[1]; + float r = (float)(View::viewport[0] + View::viewport[2]); + float l = (float)View::viewport[0]; Point3 nw = UnProject(Point3(l, b, 0.0f)); Point3 sw = UnProject(Point3(l, t, 0.0f)); @@ -160,7 +163,7 @@ template void Frustum::GetView() { //compute resolution: sizeo of a pixel unitary distance from view_point resolution = ((ne + NE) - (nw + NW)).Norm() / - (viewport[2] * ((ne + NE) - view_point).Norm()); + (View::viewport[2] * ((ne + NE) - view_point).Norm()); } }//namespace