コード例 #1
0
//--------------------------------------------------------------
void ofxBulletSoftBody::add() {
    _bAdded = true;
    _world->getWorld()->addSoftBody(_softBody);
    
    if( _type != OFX_BULLET_TRI_MESH_SHAPE ) {
        setMass(1);
    }
    setStiffness(0.9, 0.9, 0.9);
    
    setSolverIterations(4);
    
//    _softBody->getCollisionShape()->setMargin(getMargin() * 2);
}
コード例 #2
0
ciMsaFluidSolver& ciMsaFluidSolver::setup(int NX, int NY)
{
	setDeltaT();
	setFadeSpeed();
	setSolverIterations();
	enableVorticityConfinement(false);
	setWrap( false, false );
	
	//maa
	viscocity =  FLUID_DEFAULT_VISC;
	colorDiffusion = FLUID_DEFAULT_COLOR_DIFFUSION;
	
	return setSize( NX, NY);
}
コード例 #3
0
ofxMSAFluidSolver& ofxMSAFluidSolver::setup(int NX, int NY)
{
	ofLog(OF_LOG_VERBOSE, "ofxMSAFluidSolver::init( " + ofToString(NX) + ", " + ofToString(NY) + " )");
	
	doDensity = true;
	doProject = true;
	
	setDeltaT();
	setFadeSpeed();
	setSolverIterations();
	enableVorticityConfinement(false);
	setWrap( false, false );
	
	//maa
	viscocity =  FLUID_DEFAULT_VISC;
	colorDiffusion = FLUID_DEFAULT_COLOR_DIFFUSION;
	
	return setSize( NX, NY);
}