Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h

This commit is contained in:
Paolo Cignoni cignoni 2008-04-04 10:07:14 +00:00
parent 3eb4552864
commit 118e0b62b8
16 changed files with 96 additions and 45 deletions

View File

@ -95,12 +95,12 @@ public:
static bool SaveALN(const char *alnfile, std::vector<std::string> &names)
{
std::vector<Matrix44f> Tr(names.size());
std::vector<vcg::Matrix44f> Tr(names.size());
for(int i=0; i < static_cast<int>(Tr.size()); ++i) Tr[i].SetIdentity();
return SaveALN(alnfile,names, Tr);
}
template <class matrixfloat>
static bool SaveALN(const char *alnfile, std::vector<std::string> &names, std::vector<Matrix44 <matrixfloat> > &Tr)
static bool SaveALN(const char *alnfile, std::vector<std::string> &names, std::vector<vcg::Matrix44<matrixfloat> > &Tr)
{
// printf("Saving aln file %s\n",alnfile);
FILE *fp=fopen(alnfile,"w");

View File

@ -18,7 +18,7 @@ class FilterScript
public:
bool open(QString filename);
bool save(QString filename);
Matrix44f getMatrix(QDomElement *n);
vcg::Matrix44f getMatrix(QDomElement *n);
QList< QPair< QString , FilterParameterSet> > actionList;
typedef QList< QPair<QString, FilterParameterSet> >::iterator iterator;

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.141 2008/04/04 10:07:12 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.140 2008/02/05 18:06:47 benedetti
added calls to editing plugins' keyReleaseEvent and keyPressEvent
@ -86,6 +89,8 @@ Added notification of ortho projection
#include <wrap/gl/picking.h>
#include <wrap/qt/trackball.h>
using namespace std;
using namespace vcg;
GLArea::GLArea(QWidget *parent)

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.84 2008/04/04 10:07:10 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.83 2008/01/16 01:41:01 cignoni
added endedit slot
@ -217,15 +220,15 @@ class ColorSetting
{
public:
Color4b bColorBottom;
Color4b bColorTop;
Color4b lColor;
vcg::Color4b bColorBottom;
vcg::Color4b bColorTop;
vcg::Color4b lColor;
ColorSetting()
{
bColorBottom=Color4b(64,64,128,1);
bColorTop=Color4b(0,0,0,1);
lColor=Color4b(128,16,16,1);
bColorBottom=vcg::Color4b(64,64,128,1);
bColorTop=vcg::Color4b(0,0,0,1);
lColor=vcg::Color4b(128,16,16,1);
//bColorBottom=Color4b(192,192,192,1);
//bColorTop=Color4b(255,255,255,1);
@ -318,7 +321,7 @@ public:
void setLightModel();
void setView();
void resetTrackBall();
list<pair<QAction *,FilterParameterSet *> > *iDecoratorsList;
std::list<std::pair<QAction *,FilterParameterSet *> > *iDecoratorsList;
void setRenderer(MeshRenderInterface *rend, QAction *shader){ iRenderer = rend; currentShader = shader;}
MeshRenderInterface * getRenderer() { return iRenderer; }
@ -397,7 +400,7 @@ QMap<QString,QCursor> curMap;
bool trackBallVisible; // Draws the trackball ?
bool activeDefaultTrackball; // keep track on active trackball
bool hasToPick; // has to pick during the next redraw.
Point2i pointToPick;
vcg::Point2i pointToPick;
//shader support
MeshRenderInterface *iRenderer;

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.155 2008/04/04 10:07:08 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.154 2008/03/22 07:38:55 cignoni
To avoid that a filter changes something assumed by the current editing tool, before actually starting the filter we close the current editing tool (if any).
@ -202,6 +205,8 @@ Added Drag n drog opening of files (thanks to Valentino Fiorin)
#include <vcg/complex/trimesh/update/bounding.h>
#include <vcg/complex/trimesh/clean.h>
using namespace std;
using namespace vcg;
void MainWindow::updateRecentFileActions()
{

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.32 2008/04/04 10:03:54 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.31 2008/02/12 14:23:11 cignoni
correct drawing selection bug
@ -69,6 +72,7 @@ Removed Optional Face Normal and added some initalization after opening
#include <QString>
#include <QtGlobal>
#include <wrap/gl/math.h>
using namespace vcg;
bool MeshModel::Render(GLW::DrawMode _dm, GLW::ColorMode _cm, GLW::TextureMode _tm)
{

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.11 2008/04/04 10:07:14 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.10 2007/11/26 07:35:25 cignoni
Yet another small cosmetic change to the interface of the io filters.
@ -71,6 +74,7 @@
#include <vcg/complex/trimesh/update/bounding.h>
#include <vcg/complex/trimesh/clean.h>
using namespace std;
using namespace vcg;
bool BaseMeshIOPlugin::open(const QString &formatName, const QString &fileName, MeshModel &m, int& mask, CallBackPos *cb, QWidget *parent)

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.47 2008/04/04 10:03:50 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.46 2008/03/02 16:55:26 benedetti
removed DrawAxis() in favor of VCG's CoordinateFrame class
@ -119,6 +122,7 @@ Some changes in DrawAxis in order to compile under gcc
#include <wrap/gl/addons.h>
#include <meshlab/glarea.h>
using namespace vcg;
using namespace std;
const QString ExtraMeshDecoratePlugin::Info(QAction *action)
{

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.25 2008/04/04 10:03:49 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.24 2008/03/02 16:55:26 benedetti
removed DrawAxis() in favor of VCG's CoordinateFrame class
@ -118,13 +121,13 @@ private:
float niceRound2(float value,float base);
float niceRound(float value);
float calcSlope(const Point3d &a,const Point3d &b,float dim,int spacing,double *mm,double *mp,GLint *vp);
float calcSlope(const vcg::Point3d &a,const vcg::Point3d &b,float dim,int spacing,double *mm,double *mp,GLint *vp);
void drawQuotedLine(const Point3d &a,const Point3d &b,float aVal, float bVal,float tickDist,QGLWidget *gla, QFont qf);
void drawQuotedLine(const vcg::Point3d &a,const vcg::Point3d &b,float aVal, float bVal,float tickDist,QGLWidget *gla, QFont qf);
void chooseX(Box3f &box,double *modelview,double *projection,GLint *viewport,Point3d &x1,Point3d &x2);
void chooseY(Box3f &box,double *modelview,double *projection,GLint *viewport,Point3d &y1,Point3d &y2);
void chooseZ(Box3f &box,double *modelview,double *projection,GLint *viewport,Point3d &z1,Point3d &z2);
void chooseX(vcg::Box3f &box,double *modelview,double *projection,GLint *viewport,vcg::Point3d &x1,vcg::Point3d &x2);
void chooseY(vcg::Box3f &box,double *modelview,double *projection,GLint *viewport,vcg::Point3d &y1,vcg::Point3d &y2);
void chooseZ(vcg::Box3f &box,double *modelview,double *projection,GLint *viewport,vcg::Point3d &z1,vcg::Point3d &z2);
public:

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.5 2008/04/04 10:03:51 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.4 2008/03/02 15:15:50 pirosu
loss of precision management
@ -44,8 +47,9 @@ Added Quadric Simplification(with textures) Filter
#include "algebra5.h"
#include <vcg/math/quadric.h>
using namespace vcg::math;
namespace vcg
{
template<typename Scalar>
class Quadric5
{
@ -107,7 +111,7 @@ public:
// computes the real quadric and the geometric quadric using the face
// The geometric quadric is added to the parameter qgeo
void byFace(FaceType &f, math::Quadric<double> &q1, math::Quadric<double> &q2, math::Quadric<double> &q3)
void byFace(FaceType &f, vcg::math::Quadric<double> &q1, math::Quadric<double> &q2, math::Quadric<double> &q3)
{
double q = QualityFace(f);
@ -274,15 +278,15 @@ public:
}
// computes e1
sub_vec5(q,p,e1);
normalize_vec5(e1);
math::sub_vec5(q,p,e1);
math::normalize_vec5(e1);
// computes e2
sub_vec5(r,p,diffe);
outproduct5(e1,diffe,tmpmat);
prod_matvec5(tmpmat,e1,tmpvec);
sub_vec5(diffe,tmpvec,e2);
normalize_vec5(e2);
math::sub_vec5(r,p,diffe);
math::outproduct5(e1,diffe,tmpmat);
math::prod_matvec5(tmpmat,e1,tmpvec);
math::sub_vec5(diffe,tmpvec,e2);
math::normalize_vec5(e2);
// computes A
@ -302,14 +306,14 @@ public:
a[13] = 0;
a[14] = 1;
symprod_vvt5(tmpsymmat,e1);
sub_symmat5(a,tmpsymmat);
symprod_vvt5(tmpsymmat,e2);
sub_symmat5(a,tmpsymmat);
math::symprod_vvt5(tmpsymmat,e1);
math::sub_symmat5(a,tmpsymmat);
math::symprod_vvt5(tmpsymmat,e2);
math::sub_symmat5(a,tmpsymmat);
pe1 = inproduct5(p,e1);
pe2 = inproduct5(p,e2);
pe1 = math::inproduct5(p,e1);
pe2 = math::inproduct5(p,e2);
// computes b
@ -319,10 +323,10 @@ public:
tmpvec[3] = pe1*e1[3] + pe2*e2[3];
tmpvec[4] = pe1*e1[4] + pe2*e2[4];
sub_vec5(tmpvec,p,b);
math::sub_vec5(tmpvec,p,b);
// computes c
c = inproduct5(p,p)-pe1*pe1-pe2*pe2;
c = math::inproduct5(p,p)-pe1*pe1-pe2*pe2;
if(IsValid())return;
}
@ -596,12 +600,12 @@ computes bad the priority......this should be adjusted with the extra weight use
tmpmat[4][4] = a[14];
prod_matvec5(tmpmat,v,tmpvec);
math::prod_matvec5(tmpmat,v,tmpvec);
return inproduct5(v,tmpvec) + 2*inproduct5(b,v) + c;
return math::inproduct5(v,tmpvec) + 2*math::inproduct5(b,v) + c;
}
};
} // end namespace vcg;
#endif

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.9 2008/04/04 10:03:51 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.8 2007/10/16 16:47:36 cignoni
changed edgecollapse interface in order to the new allocator based deleting strategy
@ -62,13 +65,12 @@ Added Quadric Simplification(with textures) Filter
#include "algebra5.h"
#include "quadric5.h"
typedef SimpleTempData<CMeshO::VertContainer, QVector<QPair<vcg::TexCoord2<float>,Quadric5<double> > > > Quadric5Temp;
typedef SimpleTempData<CMeshO::VertContainer, math::Quadric<double> > QuadricTemp;
using namespace vcg;
using namespace std;
using namespace vcg::tri;
typedef SimpleTempData<CMeshO::VertContainer, QVector<QPair<vcg::TexCoord2<float>,Quadric5<double> > > > Quadric5Temp;
typedef SimpleTempData<CMeshO::VertContainer, math::Quadric<double> > QuadricTemp;
class TriEdgeCollapseQuadricTexParameter
{

View File

@ -26,6 +26,9 @@
/*
$Log$
Revision 1.7 2008/04/04 10:03:50 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.6 2008/02/12 14:21:39 cignoni
changed the function getParameter into the more meaningful getCustomParameter and added the freeze option
@ -65,7 +68,6 @@ Revision 1.7 2006/01/22 16:40:38 mariolatronico
- added rotate around origini / object center
*/
#include <QRegExp>
#include <QRegExpValidator>
#include <QtGui>
@ -73,6 +75,8 @@ Revision 1.7 2006/01/22 16:40:38 mariolatronico
#include "transformDialog.h"
#include <vcg/complex/trimesh/update/bounding.h>
#include <vcg/complex/trimesh/update/position.h>
using namespace std;
using namespace vcg;
TransformDialog::TransformDialog() : QDialog() {

View File

@ -26,6 +26,9 @@
/*
$Log$
Revision 1.5 2008/04/04 10:03:51 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.4 2008/02/12 14:21:39 cignoni
changed the function getParameter into the more meaningful getCustomParameter and added the freeze option
@ -134,7 +137,7 @@ public:
~TransformDialog();
// used to compute transformation on meshfilter.cpp
Matrix44f& getTransformation();
vcg::Matrix44f& getTransformation();
void setMesh(CMeshO *mesh);
void updateMatrixWidget();
void setMainWindow(MainWindowInterface *mw) {curmwi=mw;}
@ -142,14 +145,14 @@ public:
QString& getLog();
private: // members
CMeshO *mesh;
Point3f minBbox, maxBbox; // min and max of bounding box
Box3f bbox; // the mesh bounding box
vcg::Point3f minBbox, maxBbox; // min and max of bounding box
vcg::Box3f bbox; // the mesh bounding box
QButtonGroup *whichTransformBG;
QButtonGroup *rotateBG;
enum AxisType {AXIS_X,AXIS_Y,AXIS_Z} rotateAxis;
enum TransformType { TR_MOVE, TR_ROTATE, TR_SCALE } whichTransform;
// store the transformation
Matrix44f matrix;
vcg::Matrix44f matrix;
bool uniformScale; // true if want same scale for X,Y,Z
QString log; // used to store string to log
private: // functions

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.98 2008/04/04 10:03:53 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.97 2007/11/26 07:35:26 cignoni
Yet another small cosmetic change to the interface of the io filters.
@ -83,6 +86,7 @@
#include <QMessageBox>
using namespace std;
using namespace vcg;
bool ExtraMeshIOPlugin::open(const QString &formatName, const QString &fileName, MeshModel &m, int& mask, CallBackPos *cb, QWidget *parent)

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.2 2008/04/04 10:03:52 cignoni
Solved namespace ambiguities caused by the removal of a silly 'using namespace' in meshmodel.h
Revision 1.1 2007/12/02 07:57:48 cignoni
Added the new sample filter plugin that removes border faces
@ -36,6 +39,7 @@
#include <vcg/complex/trimesh/update/flag.h>
#include <vcg/complex/trimesh/clean.h>
using namespace std;
using namespace vcg;
FilterBorder::FilterBorder()

View File

@ -31,6 +31,8 @@ $Log: meshedit.cpp,v $
#include <meshlab/glarea.h>
#include "sampleedit.h"
#include <wrap/gl/pick.h>
using namespace std;
using namespace vcg;
SampleEditPlugin::SampleEditPlugin() {