mirror of https://github.com/CGAL/cgal
Merge branch 'Polyhedron_demo-fix_windows_warnings-sloriot'
This commit is contained in:
commit
fb0687dfb7
|
|
@ -336,28 +336,28 @@ public:
|
|||
|
||||
void end_row() {
|
||||
if(least_squares_) {
|
||||
unsigned int nf = af_.size() ;
|
||||
unsigned int nl = al_.size() ;
|
||||
for(unsigned int i=0; i<nf; i++) {
|
||||
for(unsigned int j=0; j<nf; j++) {
|
||||
std::size_t nf = af_.size() ;
|
||||
std::size_t nl = al_.size() ;
|
||||
for(std::size_t i=0; i<nf; i++) {
|
||||
for(std::size_t j=0; j<nf; j++) {
|
||||
A_->add_coef(if_[i], if_[j], af_[i] * af_[j]) ;
|
||||
}
|
||||
}
|
||||
CoeffType S = - bk_ ;
|
||||
for(unsigned int j=0; j<nl; j++) {
|
||||
for(std::size_t j=0; j<nl; j++) {
|
||||
S += al_[j] * xl_[j] ;
|
||||
}
|
||||
for(unsigned int i=0; i<nf; i++) {
|
||||
for(std::size_t i=0; i<nf; i++) {
|
||||
(*b_)[if_[i]] -= af_[i] * S ;
|
||||
}
|
||||
} else {
|
||||
unsigned int nf = af_.size() ;
|
||||
unsigned int nl = al_.size() ;
|
||||
for(unsigned int i=0; i<nf; i++) {
|
||||
std::size_t nf = af_.size() ;
|
||||
std::size_t nl = al_.size() ;
|
||||
for(std::size_t i=0; i<nf; i++) {
|
||||
A_->add_coef(current_row_, if_[i], af_[i]) ;
|
||||
}
|
||||
(*b_)[current_row_] = bk_ ;
|
||||
for(unsigned int i=0; i<nl; i++) {
|
||||
for(std::size_t i=0; i<nl; i++) {
|
||||
(*b_)[current_row_] -= al_[i] * xl_[i] ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ void Viewer::endSelection(const QPoint& point)
|
|||
pickMatrix_[15]=1;
|
||||
}
|
||||
|
||||
void Viewer::makeArrow(float R, int prec, qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, AxisData &data)
|
||||
void Viewer::makeArrow(double R, int prec, qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, AxisData &data)
|
||||
{
|
||||
qglviewer::Vec temp = to-from;
|
||||
QVector3D dir = QVector3D(temp.x, temp.y, temp.z);
|
||||
|
|
@ -555,7 +555,7 @@ void Viewer::makeArrow(float R, int prec, qglviewer::Vec from, qglviewer::Vec to
|
|||
for(int d = 0; d<360; d+= 360/prec)
|
||||
{
|
||||
//point A1
|
||||
float D = d*M_PI/180.0;
|
||||
double D = d*M_PI/180.0;
|
||||
QVector4D p(R*sin(D),0.66,R*cos(D), 1.0);
|
||||
QVector4D n(sin(D), 0, cos(D), 1.0);
|
||||
QVector4D pR = mat*p;
|
||||
|
|
@ -751,13 +751,13 @@ void Viewer::resizeGL(int w, int h)
|
|||
buffers[0].release();
|
||||
|
||||
buffers[1].bind();
|
||||
buffers[1].allocate(n_Axis.data(), n_Axis.size() * sizeof(float));
|
||||
buffers[1].allocate(n_Axis.data(), static_cast<int>(n_Axis.size() * sizeof(float)));
|
||||
rendering_program.enableAttributeArray("normal");
|
||||
rendering_program.setAttributeBuffer("normal",GL_FLOAT,0,3);
|
||||
buffers[1].release();
|
||||
|
||||
buffers[2].bind();
|
||||
buffers[2].allocate(c_Axis.data(), c_Axis.size() * sizeof(float));
|
||||
buffers[2].allocate(c_Axis.data(), static_cast<int>(c_Axis.size() * sizeof(float)));
|
||||
rendering_program.enableAttributeArray("colors");
|
||||
rendering_program.setAttributeBuffer("colors",GL_FLOAT,0,3);
|
||||
buffers[2].release();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ protected:
|
|||
void keyPressEvent(QKeyEvent*);
|
||||
void pickMatrix(GLdouble x, GLdouble y, GLdouble width, GLdouble height,
|
||||
GLint viewport[4]);
|
||||
void makeArrow(float R, int prec, qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, AxisData &data);
|
||||
void makeArrow(double R, int prec, qglviewer::Vec from, qglviewer::Vec to, qglviewer::Vec color, AxisData &data);
|
||||
void resizeGL(int w, int h);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue