Commit d37e9e32 by Pierre Kraemer

### corrections on BivariatePolynomials

parent 6b21de4d
 ... ... @@ -146,12 +146,12 @@ public: // methods */ Frame(const VEC3& compressedFrame) ; ~Frame() {} ; ~Frame() {} /** * Returns a compressed version of the current local frame */ const VEC3& getCompressed() const { return m_EulerAngles ; } ; const VEC3& getCompressed() const { return m_EulerAngles ; } /** * Returns a decompressed frame (set of 3 VEC3) ... ... @@ -190,7 +190,7 @@ public: // methods lf.getFrame(X,Y,Z) ; out << std::endl << "Decompressed : " << std::endl << X << std::endl << Y << std::endl << Z ; return out ; } ; } private : // private constants // The reference frame (X,Y,Z) can be any orthonormal ... ...
 ... ... @@ -12,6 +12,8 @@ #include #include #include //#include //#include //#include ... ... @@ -26,9 +28,9 @@ template class BivariatePolynomials { private : const int degree ; // (bi-)degree of the polynomial (=4) const int nb_coefs ; // number of coefs (=15) Tcoef* coefs; // table of coefficients int degree ; // (bi-)degree of the polynomial (=4) int nb_coefs ; // number of coefs (=15) Tcoef* coefs; // table of coefficients public : // construction, destruction and initialization ... ... @@ -36,19 +38,19 @@ public : BivariatePolynomials(BivariatePolynomials const &); ~BivariatePolynomials(); int get_degree () { return degree; } int get_nb_coefs () { return nb_coefs; } int get_degree () const { return degree; } int get_nb_coefs () const { return nb_coefs; } // evaluation Tcoef evaluate_at (Tscalar u, Tscalar v) const; Tcoef evaluate_at (const Geom::Vec3& tu, const Geom::Vec3& tv, const Geom::Vec3& n, const Geom::Vec3& eval_dir) const; Tcoef evaluate_at (const Geom::Vector<3,Tscalar>& tu, const Geom::Vector<3,Tscalar>& tv, const Geom::Vector<3,Tscalar>& n, const Geom::Vector<3,Tscalar>& eval_dir) const; // I/O const Tcoef& get_coef (int du, int dv) const {assert ((du>=0 && dv <=degree && dv>=0 && dv <=degree) || !" bi-degree is incorrect"); return get_coef(index(l,m));} Tcoef& get_coef (int du, int dv) {assert ((du>=0 && dv <=degree && dv>=0 && dv <=degree) || !" bi-degree is incorrect"); return get_coef(index(l,m));} const Tcoef& get_coef (int du, int dv) const {assert ((du>=0 && dv <=degree && dv>=0 && dv <=degree) || !" bi-degree is incorrect"); return get_coef(index(du,dv));} Tcoef& get_coef (int du, int dv) {assert ((du>=0 && dv <=degree && dv>=0 && dv <=degree) || !" bi-degree is incorrect"); return get_coef(index(du,dv));} Tcoef* get_coef_tab () {return coefs;} Tcoef* get_coef_tab () const {return coefs;} template friend std::ostream & operator<< (std::ostream & os, const BivariatePolynomials & sh); ... ...
 ... ... @@ -75,7 +75,7 @@ Tcoef BivariatePolynomials::evaluate_at (Tscalar u, Tscalar v) co } template Tcoef BivariatePolynomials::evaluate_at (const Geom::Vec3& tu, const Geom::Vec3& tv, const Geom::Vec3& n, const Geom::Vec3& eval_dir) const; Tcoef BivariatePolynomials::evaluate_at (const Geom::Vector<3,Tscalar>& tu, const Geom::Vector<3,Tscalar>& tv, const Geom::Vector<3,Tscalar>& n, const Geom::Vector<3,Tscalar>& eval_dir) const { Tscalar u = tu*eval_dir; Tscalar v = tv*eval_dir; ... ... @@ -95,7 +95,7 @@ I/O template std::ostream & operator << (std::ostream & os, const BivariatePolynomials & p) { for (int d = 0; d <= sh.degree; d++) for (int d = 0; d <= p.degree; d++) { for (int du = d; du >=0 ; du--) os << p.get_coef(du,d-du) << "\t"; ... ...
 ... ... @@ -14,15 +14,15 @@ Form Half Collapse Position : 0 ... ... @@ -36,13 +36,6 @@ Decimate ... ... @@ -50,22 +43,30 @@ Fragment interpolation 0 0 - select VBO - Position : Tangent : 0 ... ... @@ -79,20 +80,36 @@ Qt::Vertical BiNormal : 20 40 0 0 - select VBO - Fragment interpolation 100 ... ... @@ -105,6 +122,33 @@ Half Collapse Decimate Qt::Vertical 20 40 ... ...