mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 11:04:39 +00:00
Random drop filter refined
This commit is contained in:
parent
55debe8019
commit
3232bb7681
22
src/fgt/filter_physics/MeshSubFilter.cpp
Normal file
22
src/fgt/filter_physics/MeshSubFilter.cpp
Normal 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;
|
||||
}
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user