mirror of https://github.com/CGAL/cgal
Fix conversion warnings
This commit is contained in:
parent
f17d903d75
commit
bf8205642e
|
|
@ -460,9 +460,9 @@ public:
|
|||
static void add_point_in_buffer(const KPoint& kp, std::vector<float>& buffer)
|
||||
{
|
||||
Local_point p=get_local_point(kp);
|
||||
buffer.push_back(p.x());
|
||||
buffer.push_back(p.y());
|
||||
buffer.push_back(p.z());
|
||||
buffer.push_back(static_cast<float>(p.x()));
|
||||
buffer.push_back(static_cast<float>(p.y()));
|
||||
buffer.push_back(static_cast<float>(p.z()));
|
||||
}
|
||||
|
||||
/// adds `kv` coordinates to `buffer`
|
||||
|
|
@ -471,9 +471,9 @@ public:
|
|||
bool inverse_normal=false)
|
||||
{
|
||||
Local_vector n=(inverse_normal?-get_local_vector(kv):get_local_vector(kv));
|
||||
buffer.push_back(n.x());
|
||||
buffer.push_back(n.y());
|
||||
buffer.push_back(n.z());
|
||||
buffer.push_back(static_cast<float>(n.x()));
|
||||
buffer.push_back(static_cast<float>(n.y()));
|
||||
buffer.push_back(static_cast<float>(n.z()));
|
||||
}
|
||||
|
||||
///adds `acolor` RGB components to `buffer`
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ CGAL_INLINE_FUNCTION
|
|||
void ManipulatedFrame::computeMouseSpeed(const QMouseEvent *const e) {
|
||||
const QPoint delta = (e->pos() - prevPos_);
|
||||
const qreal dist = sqrt(qreal(delta.x() * delta.x() + delta.y() * delta.y()));
|
||||
delay_ = last_move_time.restart();
|
||||
delay_ = static_cast<int>(last_move_time.restart());
|
||||
if (delay_ == 0)
|
||||
// Less than a millisecond: assume delay = 1ms
|
||||
mouseSpeed_ = dist;
|
||||
|
|
|
|||
|
|
@ -2248,7 +2248,7 @@ void CGAL::QGLViewer::keyPressEvent(QKeyEvent *e) {
|
|||
static QElapsedTimer doublePress;
|
||||
|
||||
if (modifiers == playPathKeyboardModifiers()) {
|
||||
int elapsed = doublePress.restart();
|
||||
qint64 elapsed = doublePress.restart();
|
||||
if ((elapsed < 250) && (index == previousPathId_))
|
||||
camera()->resetPath(index);
|
||||
else {
|
||||
|
|
@ -2263,7 +2263,7 @@ void CGAL::QGLViewer::keyPressEvent(QKeyEvent *e) {
|
|||
}
|
||||
previousPathId_ = index;
|
||||
} else if (modifiers == addKeyFrameKeyboardModifiers()) {
|
||||
int elapsed = doublePress.restart();
|
||||
qint64 elapsed = doublePress.restart();
|
||||
if ((elapsed < 250) && (index == previousPathId_)) {
|
||||
if (camera()->keyFrameInterpolator(index)) {
|
||||
disconnect(camera()->keyFrameInterpolator(index),
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ inline QColor generate_color(double h, double s_min = 0.35)
|
|||
std::size_t s_max=255;
|
||||
if(h >0.8 && h < 0.95) //span of ugly pink, desaturates make it less garish IMO
|
||||
s_max = 160;
|
||||
std::size_t s = std::rand() % (s_max-static_cast<std::size_t>(s_min*255)) +s_min*255;
|
||||
std::size_t s = std::rand() % (s_max-static_cast<std::size_t>(s_min*255)) + static_cast<int>(s_min*255);
|
||||
return QColor::fromHsvF(h,s/255.0,1.0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -755,8 +755,8 @@ write_surface_cells(const C3t3& c3t3, const Plane& /* plane */, std::ofstream& o
|
|||
|
||||
//const int TRANSPARENCY_ALPHA_VALUE = 100;
|
||||
CGAL::Bbox_3 bbox = c3t3.bbox();
|
||||
float relPos = (c->weighted_circumcenter().x() - bbox.xmin())
|
||||
/ (bbox.xmax() - bbox.xmin());
|
||||
float relPos = static_cast<float>((c->weighted_circumcenter().x() - bbox.xmin())
|
||||
/ (bbox.xmax() - bbox.xmin()));
|
||||
float TRANSPARENCY_ALPHA_VALUE =
|
||||
1.f -
|
||||
(relPos < 0.25f ?
|
||||
|
|
@ -842,7 +842,7 @@ write_surface_cells(const C3t3& c3t3, const Plane& /* plane */, std::ofstream& o
|
|||
{
|
||||
if (i == last_2D_vertex_index)
|
||||
{
|
||||
edgecolor.setAlpha(TRANSPARENCY_ALPHA_VALUE);
|
||||
edgecolor.setAlphaF(TRANSPARENCY_ALPHA_VALUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -777,7 +777,8 @@ void Basic_generator_plugin::generateGrid()
|
|||
|
||||
QString points_text;
|
||||
Point extrema[2];
|
||||
typename boost::graph_traits<Face_graph>::vertices_size_type nb_cells[2];
|
||||
using size_type = typename boost::graph_traits<Face_graph>::vertices_size_type;
|
||||
size_type nb_cells[2];
|
||||
bool triangulated = dock_widget->grid_checkBox->isChecked();
|
||||
points_text= dock_widget->grid_lineEdit->text();
|
||||
|
||||
|
|
@ -806,8 +807,8 @@ void Basic_generator_plugin::generateGrid()
|
|||
}
|
||||
extrema[0] = Point(coords[0], coords[1], coords[2]);
|
||||
extrema[1] = Point(coords[3], coords[4], coords[5]);
|
||||
nb_cells[0] = static_cast<std::size_t>(dock_widget->gridX_spinBox->value());
|
||||
nb_cells[1] = static_cast<std::size_t>(dock_widget->gridY_spinBox->value());
|
||||
nb_cells[0] = static_cast<size_type>(dock_widget->gridX_spinBox->value());
|
||||
nb_cells[1] = static_cast<size_type>(dock_widget->gridY_spinBox->value());
|
||||
|
||||
//nb_points = nb_cells+1
|
||||
Point_generator point_gen(nb_cells[0]+1, nb_cells[1]+1, extrema[0], extrema[1]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue