Changeset 1025 for GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx
- Timestamp:
- 06/20/06 13:28:51 (18 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/SMF/smf.cxx
r774 r1025 9 9 #include <gfx/SMF/smfstate.h> 10 10 11 using namespace qslim;11 using namespace simplif; 12 12 13 13 inline int streq(const char *a,const char *b) { return strcmp(a,b)==0; } 14 14 15 float qslim::SMF_version = 1.0;16 char * qslim::SMF_version_string = "1.0";15 float simplif::SMF_version = 1.0; 16 char *simplif::SMF_version_string = "1.0"; 17 17 char *SMF_source_revision = "$Id: smf.cxx,v 1.1 1997/06/16 22:11:40 garland Exp $"; 18 18 -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/SMF/smf.h
r774 r1025 17 17 18 18 19 namespace qslim19 namespace simplif 20 20 { 21 21 #define SMF_MAXLINE 4096 -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/SMF/smfstate.cxx
r774 r1025 8 8 inline int streq(const char *a,const char *b) { return strcmp(a,b)==0; } 9 9 10 using namespace qslim;10 using namespace simplif; 11 11 12 12 SMF_State::SMF_State(const SMF_ivars& ivar, SMF_State *link) -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/SMF/smfstate.h
r774 r1025 2 2 #define GFXSMF_STATE_INCLUDED 3 3 4 namespace qslim4 namespace simplif 5 5 { 6 6 class SMF_State -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/geom/3D.cxx
r774 r1025 3 3 #include <gfx/geom/3D.h> 4 4 5 using namespace qslim;5 using namespace simplif; 6 6 7 7 Vec3 randomPoint(const Vec3& v1, const Vec3& v2) … … 21 21 } 22 22 23 real qslim::triangleArea(const Vec3& v1, const Vec3& v2, const Vec3& v3)23 real simplif::triangleArea(const Vec3& v1, const Vec3& v2, const Vec3& v3) 24 24 { 25 25 Vec3 a = v2 - v1; … … 38 38 real L3 = norm2(v1-v3); 39 39 40 return FOUR_ROOT3 * qslim::triangleArea(v1,v2,v3) / (L1+L2+L3);40 return FOUR_ROOT3 * simplif::triangleArea(v1,v2,v3) / (L1+L2+L3); 41 41 } 42 42 -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/geom/3D.h
r774 r1025 10 10 // 11 11 12 namespace qslim12 namespace simplif 13 13 { 14 14 extern Vec3 randomPoint(const Vec3&, const Vec3&); // on segment -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/geom/ProjectH.cxx
r774 r1025 27 27 #define DOTP(a, b) (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]) 28 28 29 using namespace qslim;29 using namespace simplif; 30 30 31 31 static real Distance2(real x[3], real *y) -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/geom/ProxGrid.cxx
r774 r1025 6 6 #include <gfx/geom/ProxGrid.h> 7 7 8 using namespace qslim;8 using namespace simplif; 9 9 10 10 ProxGrid::ProxGrid(const Vec3& lo, const Vec3& hi, real dist) -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/geom/ProxGrid.h
r774 r1025 7 7 8 8 9 namespace qslim9 namespace simplif 10 10 { 11 11 class ProxGrid_Cell : public buffer<Vec3 *> -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Mat2.cxx
r774 r1025 2 2 #include <gfx/math/Mat2.h> 3 3 4 using namespace qslim;4 using namespace simplif; 5 5 6 6 Mat2 Mat2::identity(Vec2(1,0), Vec2(0,1)); -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Mat2.h
r774 r1025 4 4 #include <gfx/math/Vec2.h> 5 5 6 namespace qslim6 namespace simplif 7 7 { 8 8 class Mat2 -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Mat3.cxx
r774 r1025 2 2 #include <gfx/math/Mat3.h> 3 3 4 using namespace qslim;4 using namespace simplif; 5 5 6 6 Mat3 Mat3::identity(Vec3(1,0,0), Vec3(0,1,0), Vec3(0,0,1)); -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Mat3.h
r774 r1025 5 5 #include <ostream> 6 6 7 namespace qslim7 namespace simplif 8 8 { 9 9 class Mat3 … … 64 64 65 65 // // Input/Output methods 66 // friend std::ostream& operator<<(std::ostream&, const qslim::Mat3&);67 // friend std::istream& operator>>(std::istream&, qslim::Mat3&);66 // friend std::ostream& operator<<(std::ostream&, const simplif::Mat3&); 67 // friend std::istream& operator>>(std::istream&, simplif::Mat3&); 68 68 }; 69 69 … … 134 134 135 135 /* 136 inline std::ostream& operator<<(std::ostream& out, const qslim::Mat3& M)136 inline std::ostream& operator<<(std::ostream& out, const simplif::Mat3& M) 137 137 { 138 138 return out << M.row[0] << endl << M.row[1] << endl << M.row[2]; … … 144 144 } 145 145 */ 146 extern bool jacobi(const qslim::Mat3& m, qslim::Vec3& vals, qslim::Vec3 vecs[3]);146 extern bool jacobi(const simplif::Mat3& m, simplif::Vec3& vals, simplif::Vec3 vecs[3]); 147 147 148 148 -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Mat4.cxx
r774 r1025 2 2 #include <gfx/math/Mat4.h> 3 3 4 using namespace qslim;4 using namespace simplif; 5 5 6 6 Mat4 Mat4::identity(Vec4(1,0,0,0),Vec4(0,1,0,0),Vec4(0,0,1,0),Vec4(0,0,0,1)); -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Mat4.h
r774 r1025 13 13 #include <gfx/math/Vec4.h> 14 14 15 namespace qslim15 namespace simplif 16 16 { 17 17 class Mat4 -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Vec2.h
r774 r1025 10 10 ************************************************************************/ 11 11 12 namespace qslim12 namespace simplif 13 13 { 14 14 class Vec2 { … … 78 78 // 79 79 80 inline void qslim::Vec2::copy(const qslim::Vec2& v)80 inline void simplif::Vec2::copy(const simplif::Vec2& v) 81 81 { 82 82 elt[0]=v.elt[0]; elt[1]=v.elt[1]; 83 83 } 84 84 85 inline bool qslim::Vec2::operator==(const qslim::Vec2& v) const85 inline bool simplif::Vec2::operator==(const simplif::Vec2& v) const 86 86 { 87 87 real dx=elt[X]-v[X], dy=elt[Y]-v[Y]; … … 89 89 } 90 90 91 inline bool qslim::Vec2::operator!=(const qslim::Vec2& v) const91 inline bool simplif::Vec2::operator!=(const simplif::Vec2& v) const 92 92 { 93 93 real dx=elt[X]-v[X], dy=elt[Y]-v[Y]; … … 95 95 } 96 96 97 inline qslim::Vec2& qslim::Vec2::operator=(const qslim::Vec2& v)97 inline simplif::Vec2& simplif::Vec2::operator=(const simplif::Vec2& v) 98 98 { 99 99 copy(v); … … 101 101 } 102 102 103 inline qslim::Vec2& qslim::Vec2::operator+=(const qslim::Vec2& v)103 inline simplif::Vec2& simplif::Vec2::operator+=(const simplif::Vec2& v) 104 104 { 105 105 elt[0] += v[0]; elt[1] += v[1]; … … 107 107 } 108 108 109 inline qslim::Vec2& qslim::Vec2::operator-=(const qslim::Vec2& v)109 inline simplif::Vec2& simplif::Vec2::operator-=(const simplif::Vec2& v) 110 110 { 111 111 elt[0] -= v[0]; elt[1] -= v[1]; … … 113 113 } 114 114 115 inline qslim::Vec2& qslim::Vec2::operator*=(qslim::real s)115 inline simplif::Vec2& simplif::Vec2::operator*=(simplif::real s) 116 116 { 117 117 elt[0] *= s; elt[1] *= s; … … 119 119 } 120 120 121 inline qslim::Vec2& qslim::Vec2::operator/=(qslim::real s)121 inline simplif::Vec2& simplif::Vec2::operator/=(simplif::real s) 122 122 { 123 123 elt[0] /= s; elt[1] /= s; … … 125 125 } 126 126 127 inline qslim::Vec2 qslim::Vec2::operator+(const qslim::Vec2& v) const127 inline simplif::Vec2 simplif::Vec2::operator+(const simplif::Vec2& v) const 128 128 { 129 129 return Vec2(elt[0]+v[0], elt[1]+v[1]); 130 130 } 131 131 132 inline qslim::Vec2 qslim::Vec2::operator-(const qslim::Vec2& v) const132 inline simplif::Vec2 simplif::Vec2::operator-(const simplif::Vec2& v) const 133 133 { 134 134 return Vec2(elt[0]-v[0], elt[1]-v[1]); 135 135 } 136 136 137 inline qslim::Vec2 qslim::Vec2::operator-() const138 { 139 return qslim::Vec2(-elt[0], -elt[1]);140 } 141 142 inline qslim::Vec2 qslim::Vec2::operator*(qslim::real s) const137 inline simplif::Vec2 simplif::Vec2::operator-() const 138 { 139 return simplif::Vec2(-elt[0], -elt[1]); 140 } 141 142 inline simplif::Vec2 simplif::Vec2::operator*(simplif::real s) const 143 143 { 144 144 return Vec2(elt[0]*s, elt[1]*s); 145 145 } 146 146 147 inline qslim::Vec2 qslim::Vec2::operator/(qslim::real s) const147 inline simplif::Vec2 simplif::Vec2::operator/(simplif::real s) const 148 148 { 149 149 return Vec2(elt[0]/s, elt[1]/s); 150 150 } 151 151 152 inline qslim::real qslim::Vec2::operator*(const qslim::Vec2& v) const152 inline simplif::real simplif::Vec2::operator*(const simplif::Vec2& v) const 153 153 { 154 154 return elt[0]*v[0] + elt[1]*v[1]; … … 156 156 157 157 // Make scalar multiplication commutative 158 inline qslim::Vec2 operator*(qslim::real s, const qslim::Vec2& v) { return v*s; }158 inline simplif::Vec2 operator*(simplif::real s, const simplif::Vec2& v) { return v*s; } 159 159 160 160 … … 164 164 // 165 165 166 namespace qslim166 namespace simplif 167 167 { 168 inline real norm(const qslim::Vec2& v) { return sqrt(v[0]*v[0] + v[1]*v[1]); }169 inline real norm2(const qslim::Vec2& v) { return v[0]*v[0] + v[1]*v[1]; }170 inline real length(const qslim::Vec2& v) { return norm(v); }171 172 inline real unitize( qslim::Vec2& v)173 { 174 qslim::real l=norm2(v);168 inline real norm(const simplif::Vec2& v) { return sqrt(v[0]*v[0] + v[1]*v[1]); } 169 inline real norm2(const simplif::Vec2& v) { return v[0]*v[0] + v[1]*v[1]; } 170 inline real length(const simplif::Vec2& v) { return norm(v); } 171 172 inline real unitize(simplif::Vec2& v) 173 { 174 simplif::real l=norm2(v); 175 175 if( l!=1.0 && l!=0.0 ) 176 176 { -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Vec3.h
r774 r1025 12 12 #include "../std.h" 13 13 14 namespace qslim14 namespace simplif 15 15 { 16 16 class Vec3 { -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/Vec4.h
r774 r1025 10 10 ************************************************************************/ 11 11 12 namespace qslim12 namespace simplif 13 13 { 14 14 class Vec4 { -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/cholesky.cxx
r774 r1025 12 12 // 13 13 14 using namespace qslim;14 using namespace simplif; 15 15 16 16 bool cholesky(Mat4& a, Vec4& p) -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/jacobi.cxx
r774 r1025 20 20 // 21 21 22 using namespace qslim;22 using namespace simplif; 23 23 24 24 static -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/math/random.h
r774 r1025 5 5 #include <limits.h> 6 6 7 namespace qslim7 namespace simplif 8 8 { 9 9 // -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/std.h
r774 r1025 18 18 19 19 20 namespace qslim20 namespace simplif 21 21 { 22 22 // -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Array.h
r774 r1025 5 5 #include "../std.h" 6 6 7 namespace qslim7 namespace simplif 8 8 { 9 9 template<class T> -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Buffer.h
r774 r1025 4 4 #include <gfx/tools/Array.h> 5 5 6 namespace qslim6 namespace simplif 7 7 { 8 8 template<class T> -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/Heap.h
r774 r1025 12 12 // 13 13 14 namespace qslim14 namespace simplif 15 15 { 16 16 class Heapable -
GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/gfx/tools/heap.cxx
r774 r1025 3 3 #include <gfx/tools/Heap.h> 4 4 5 using namespace qslim;5 using namespace simplif; 6 6 7 7 void Heap::swap(int i,int j)
Note: See TracChangeset
for help on using the changeset viewer.