mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-17 18:14:38 +00:00
Some compiler warnings removed
This commit is contained in:
parent
393b2b0e23
commit
32fe64bd87
@ -12,7 +12,7 @@ void DynamicMeshSubFilter::initParameterSet(QAction* action,MeshDocument& md, Ri
|
||||
par.addParam(new RichDynamicFloat("timeline", 0, 0, 100, "Timeline %", "Controls the timeline of the simulation"));
|
||||
}
|
||||
|
||||
bool DynamicMeshSubFilter::applyFilter(QAction* filter, MeshDocument &md, RichParameterSet& par, vcg::CallBackPos* cb){
|
||||
bool DynamicMeshSubFilter::applyFilter(QAction*, MeshDocument &md, RichParameterSet& par, vcg::CallBackPos* cb){
|
||||
if(parametersAreNotCorrect(md, par))
|
||||
return false;
|
||||
|
||||
@ -22,7 +22,7 @@ bool DynamicMeshSubFilter::applyFilter(QAction* filter, MeshDocument &md, RichPa
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DynamicMeshSubFilter::parametersAreNotCorrect(MeshDocument& md, RichParameterSet& par){
|
||||
bool DynamicMeshSubFilter::parametersAreNotCorrect(MeshDocument&, RichParameterSet& par){
|
||||
return par.getInt("seconds") < 0 || par.getInt("fps") <= 0 || par.getInt("iterations") <= 0 || par.getInt("contacts") <= 0 || par.getFloat("bounciness") < 0 || par.getFloat("bounciness") > 1;
|
||||
}
|
||||
|
||||
@ -35,8 +35,8 @@ bool DynamicMeshSubFilter::configurationHasChanged(MeshDocument& md, RichParamet
|
||||
changed |= m_gravity != par.getFloat("gravity");
|
||||
changed |= m_friction != par.getFloat("friction");
|
||||
|
||||
if(md.size() == m_files.size())
|
||||
for(int i = 0; i < m_files.size(); i++)
|
||||
if(unsigned(md.size()) == m_files.size())
|
||||
for(unsigned i = 0; i < m_files.size(); i++)
|
||||
changed |= m_files.at(i) != md.getMesh(i)->fileName;
|
||||
else
|
||||
changed = true;
|
||||
|
||||
@ -51,7 +51,7 @@ void GravitySubFilter::initialize(MeshDocument& md, RichParameterSet& par, vcg::
|
||||
m_layersTrans.clear();
|
||||
m_layersTrans.resize(md.size());
|
||||
|
||||
for(int i = 0; i < m_layersTrans.size(); i++){
|
||||
for(unsigned i = 0; i < m_layersTrans.size(); i++){
|
||||
m_layersTrans[i].reserve(m_steps);
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ int MeshSubFilter::m_currentFilterType = 0;
|
||||
MeshSubFilter::MeshSubFilter(){
|
||||
}
|
||||
|
||||
void MeshSubFilter::initParameterSet(QAction* action,MeshDocument& md, RichParameterSet & par){
|
||||
void MeshSubFilter::initParameterSet(QAction*, MeshDocument&, RichParameterSet & par){
|
||||
par.addParam(new RichInt("fps", 100, "Frames per second", "The number of times per second the physics simulation is updated"));
|
||||
par.addParam(new RichInt("iterations", 20, "Physics method iterations", "The number of iterations of the iterative physics equation solver method"));
|
||||
par.addParam(new RichInt("contacts", 20, "Max contacts", "Maximum number of contact points to generate per object pair"));
|
||||
@ -13,7 +13,7 @@ void MeshSubFilter::initParameterSet(QAction* action,MeshDocument& md, RichParam
|
||||
par.addParam(new RichFloat("friction", 10, "Friction", "The coulomb friction coefficient of a collision"));
|
||||
}
|
||||
|
||||
void MeshSubFilter::initialize(MeshDocument& md, RichParameterSet&, vcg::CallBackPos* cb){
|
||||
void MeshSubFilter::initialize(MeshDocument&, RichParameterSet&, vcg::CallBackPos*){
|
||||
//TODO: Not working properly with meshlab for now; when the issue will be patched in meshlab, this code and the MM_TRANSFMATRIX
|
||||
// postCondition in filter_physics.h can be uncommented */
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ void ODEFacade::collisionCallback(dGeomID o1, dGeomID o2){
|
||||
dBodyID body1 = dGeomGetBody(o1);
|
||||
dBodyID body2 = dGeomGetBody(o2);
|
||||
|
||||
for(int i = 0; i < m_contacts.size(); i++){
|
||||
for(unsigned i = 0; i < m_contacts.size(); i++){
|
||||
m_contacts[i].surface.mode = dContactBounce;
|
||||
m_contacts[i].surface.mu = m_friction;
|
||||
m_contacts[i].surface.bounce = m_bounciness;
|
||||
|
||||
@ -84,7 +84,7 @@ void RandomDropFilter::initialize(MeshDocument& md, RichParameterSet& par, vcg::
|
||||
m_layersTrans.clear();
|
||||
m_layersTrans.resize(md.size());
|
||||
|
||||
for(int i = 0; i < m_layersTrans.size(); i++){
|
||||
for(unsigned i = 0; i < m_layersTrans.size(); i++){
|
||||
m_layersTrans[i].reserve(m_steps);
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ void RandomFillFilter::initParameterSet(QAction* action,MeshDocument& md, RichPa
|
||||
par.addParam(new RichBool("useRandomVertices", true, "Random spawn points", "If true the filling objects will spawn at random positions in the container mesh instead of being spawn at the center of mass"));
|
||||
}
|
||||
|
||||
bool RandomFillFilter::applyFilter(QAction* filter, MeshDocument &md, RichParameterSet& par, vcg::CallBackPos* cb){
|
||||
bool RandomFillFilter::applyFilter(QAction*, MeshDocument &md, RichParameterSet& par, vcg::CallBackPos* cb){
|
||||
if(parametersAreNotCorrect(md, par))
|
||||
return false;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user