remove some conversion warnings
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1276 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -171,15 +171,15 @@ float ModAspectRatioT<MeshT>::collapse_priority(const CollapseInfo& _ci) {
|
||||
|
||||
if (Base::is_binary()) {
|
||||
return
|
||||
((r1_min > r0_min) || (r1_min > min_aspect_)) ? Base::LEGAL_COLLAPSE :
|
||||
Base::ILLEGAL_COLLAPSE;
|
||||
((r1_min > r0_min) || (r1_min > min_aspect_)) ? float(Base::LEGAL_COLLAPSE) :
|
||||
float(Base::ILLEGAL_COLLAPSE);
|
||||
|
||||
} else {
|
||||
if (r1_min > r0_min)
|
||||
return 1.0 - r1_min;
|
||||
return 1.f - float(r1_min);
|
||||
else
|
||||
return
|
||||
(r1_min > min_aspect_) ? 2.0 - r1_min : float(Base::ILLEGAL_COLLAPSE);
|
||||
(r1_min > min_aspect_) ? 2.f - float(r1_min) : float(Base::ILLEGAL_COLLAPSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,8 +191,8 @@ void ModAspectRatioT<MeshT>::set_error_tolerance_factor(double _factor) {
|
||||
// the smaller the factor, the larger min_aspect_ gets
|
||||
// thus creating a stricter constraint
|
||||
// division by (2.0 - error_tolerance_factor_) is for normalization
|
||||
double min_aspect = min_aspect_ * (2.0 - _factor) / (2.0 - this->error_tolerance_factor_);
|
||||
set_aspect_ratio(1.0/min_aspect);
|
||||
float min_aspect = min_aspect_ * (2.f - float(_factor)) / (2.f - float(this->error_tolerance_factor_));
|
||||
set_aspect_ratio(1.f/min_aspect);
|
||||
this->error_tolerance_factor_ = _factor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class ModAspectRatioT: public ModBaseT<MeshT> {
|
||||
ModAspectRatioT(MeshT& _mesh, float _min_aspect = 5.0, bool _is_binary =
|
||||
true) :
|
||||
Base(_mesh, _is_binary), mesh_(Base::mesh()), min_aspect_(
|
||||
1.0 / _min_aspect) {
|
||||
1.f / _min_aspect) {
|
||||
mesh_.add_property(aspect_);
|
||||
}
|
||||
|
||||
@@ -108,12 +108,12 @@ class ModAspectRatioT: public ModBaseT<MeshT> {
|
||||
|
||||
/// get aspect ratio
|
||||
float aspect_ratio() const {
|
||||
return 1.0 / min_aspect_;
|
||||
return 1.f / min_aspect_;
|
||||
}
|
||||
|
||||
/// set aspect ratio
|
||||
void set_aspect_ratio(float _f) {
|
||||
min_aspect_ = 1.0 / _f;
|
||||
min_aspect_ = 1.f / _f;
|
||||
}
|
||||
|
||||
/// precompute face aspect ratio
|
||||
|
||||
@@ -273,7 +273,7 @@ void ModHausdorffT<MeshT>::set_error_tolerance_factor(double _factor) {
|
||||
// the smaller the factor, the smaller tolerance gets
|
||||
// thus creating a stricter constraint
|
||||
// division by error_tolerance_factor_ is for normalization
|
||||
Scalar tolerance = tolerance_ * _factor / this->error_tolerance_factor_;
|
||||
Scalar tolerance = tolerance_ * Scalar(_factor / this->error_tolerance_factor_);
|
||||
set_tolerance(tolerance);
|
||||
this->error_tolerance_factor_ = _factor;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ private:
|
||||
void set_binary(bool _b) {}
|
||||
|
||||
InfoList pmi_;
|
||||
VPropHandleT<int> idx_;
|
||||
VPropHandleT<size_t> idx_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user