Random drop filter refined

This commit is contained in:
Paolo Cignoni cignoni 2009-12-31 12:52:05 +00:00
parent 55debe8019
commit 3232bb7681
5 changed files with 28 additions and 11 deletions

View File

@ -0,0 +1,22 @@
#include "MeshSubFilter.h"
MeshSubFilter::MeshSubFilter() : m_stepSize(0.01), m_steps(-1), m_seconds(-1){
}
void MeshSubFilter::initParameterSet(QAction* action,MeshDocument& md, RichParameterSet & par){
par.addParam(new RichInt("seconds", 1, "Simulation interval in seconds", "Physics simulation interval in seconds"));
par.addParam(new RichDynamicFloat("timeline", 0, 0, 100, "Timeline %", "Physics simulation is run"));
}
bool MeshSubFilter::applyFilter(QAction* filter, MeshDocument &md, RichParameterSet& par, vcg::CallBackPos* cb){
if(configurationHasChanged(par))
initialize(md, par);
return true;
}
bool MeshSubFilter::configurationHasChanged(RichParameterSet& par){
bool changed = m_seconds != par.getInt("seconds");
m_seconds = par.getInt("seconds");
return changed;
}

View File

@ -5,8 +5,8 @@
#ifndef MESHSUBFILTER_H
#define MESHSUBFILTER_H
#include <meshlab/meshmodel.h>
#include <meshlab/interfaces.h>
#include <common/meshmodel.h>
#include <common/interfaces.h>
#include <vcg/math/matrix44.h>

View File

@ -5,7 +5,7 @@
#ifndef PHYSICS_ENGINE_FACADE_H
#define PHYSICS_ENGINE_FACADE_H
#include <meshlab/meshmodel.h>
#include <common/meshmodel.h>
#include <vcg/math/matrix44.h>

View File

@ -13,8 +13,8 @@
#include <QStringList>
#include <QString>
#include <meshlab/meshmodel.h>
#include <meshlab/interfaces.h>
#include <common/meshmodel.h>
#include <common/interfaces.h>
class FilterPhysics : public QObject, public MeshFilterInterface
{

View File

@ -1,6 +1,5 @@
include (../../shared.pri)
DEFINES += dSINGLE
INCLUDEPATH += ../../meshlab
HEADERS = filter_physics.h \
ODEFacade.h \
PhysicsEngineFacade.h \
@ -10,13 +9,9 @@ HEADERS = filter_physics.h \
SOURCES = filter_physics.cpp \
ODEFacade.cpp \
GravitySubFilter.cpp \
../../common/filterparameter.cpp \
MeshSubFilter.cpp \
RandomDropFilter.cpp
TARGET = filter_physics
TEMPLATE = lib
QT += opengl
CONFIG += plugin \
x86
CONFIG += x86
LIBS += -L/usr/local/lib \
-lode