Some channel fixes for fc

This commit is contained in:
Daniel Genrich
2008-07-07 20:28:56 +00:00
parent e409c2463d
commit 2ad696111e
3 changed files with 8 additions and 7 deletions

View File

@@ -219,6 +219,7 @@ int elbeemAddMesh(elbeemMesh *mesh) {
if((mesh->volumeInitType<VOLUMEINIT_VOLUME)||(mesh->volumeInitType>VOLUMEINIT_BOTH)) mesh->volumeInitType = VOLUMEINIT_VOLUME; if((mesh->volumeInitType<VOLUMEINIT_VOLUME)||(mesh->volumeInitType>VOLUMEINIT_BOTH)) mesh->volumeInitType = VOLUMEINIT_VOLUME;
obj->setVolumeInit(mesh->volumeInitType); obj->setVolumeInit(mesh->volumeInitType);
// use channel instead, obj->setInitialVelocity( ntlVec3Gfx(mesh->iniVelocity[0], mesh->iniVelocity[1], mesh->iniVelocity[2]) ); // use channel instead, obj->setInitialVelocity( ntlVec3Gfx(mesh->iniVelocity[0], mesh->iniVelocity[1], mesh->iniVelocity[2]) );
obj->initChannels( obj->initChannels(
mesh->channelSizeTranslation, mesh->channelTranslation, mesh->channelSizeTranslation, mesh->channelTranslation,
mesh->channelSizeRotation, mesh->channelRotation, mesh->channelSizeRotation, mesh->channelRotation,

View File

@@ -351,10 +351,10 @@ void ntlGeometryObject::initChannels(
if((ivel)&&(nIvel>0)) { ADD_CHANNEL_VEC(mcInitialVelocity, nIvel, ivel); } if((ivel)&&(nIvel>0)) { ADD_CHANNEL_VEC(mcInitialVelocity, nIvel, ivel); }
/* fluid control channels */ /* fluid control channels */
if((attrFStr)&&(nAttrFStr>0)) { printf("added!\n"); ADD_CHANNEL_FLOAT(mcAttrFStr, nAttrFStr, attrFStr); } if((attrFStr)&&(nAttrFStr>0)) { ADD_CHANNEL_FLOAT(mcAttrFStr, nAttrFStr, attrFStr); }
if((attrFRad)&&(nAttrFRad>0)) { ADD_CHANNEL_FLOAT(mcAttrFRad, nAttrFRad, attrFRad); } if((attrFRad)&&(nAttrFRad>0)) { ADD_CHANNEL_FLOAT(mcAttrFRad, nAttrFRad, attrFRad); }
if((velFStr)&&(nVelFStr>0)) { ADD_CHANNEL_FLOAT(mcVelFStr, nAct, velFStr); } if((velFStr)&&(nVelFStr>0)) { ADD_CHANNEL_FLOAT(mcVelFStr, nAct, velFStr); }
if((velFRad)&&(nVelFRad>0)) { ADD_CHANNEL_FLOAT(mcVelFRad, nVelFRad, velFRad); } if((velFRad)&&(nVelFRad>0)) { ADD_CHANNEL_FLOAT(mcVelFRad, nVelFRad, velFRad); }
checkIsAnimated(); checkIsAnimated();

View File

@@ -1065,7 +1065,7 @@ void fluidsimBake(struct Object *ob)
fsmesh.obstaclePartslip = obit->fluidsimSettings->partSlipValue; fsmesh.obstaclePartslip = obit->fluidsimSettings->partSlipValue;
fsmesh.volumeInitType = obit->fluidsimSettings->volumeInitType; fsmesh.volumeInitType = obit->fluidsimSettings->volumeInitType;
fsmesh.obstacleImpactFactor = obit->fluidsimSettings->surfaceSmoothing; // misused value fsmesh.obstacleImpactFactor = obit->fluidsimSettings->surfaceSmoothing; // misused value
/*
if(fsmesh.type == OB_FLUIDSIM_CONTROL) if(fsmesh.type == OB_FLUIDSIM_CONTROL)
{ {
// control fluids will get exported as whole // control fluids will get exported as whole
@@ -1079,12 +1079,12 @@ void fluidsimBake(struct Object *ob)
fsmesh.channelSizeVelocityforceRadius = fsmesh.channelSizeVelocityforceRadius =
fsmesh.channelSizeAttractforceStrength = allchannelSize; fsmesh.channelSizeAttractforceStrength = allchannelSize;
fsmesh.channelAttractforceRadius = channelAttractforceStrength[o]; fsmesh.channelAttractforceStrength = channelAttractforceStrength[o];
fsmesh.channelAttractforceRadius = channelAttractforceRadius[o]; fsmesh.channelAttractforceRadius = channelAttractforceRadius[o];
fsmesh.channelVelocityforceStrength = channelVelocityforceStrength[o]; fsmesh.channelVelocityforceStrength = channelVelocityforceStrength[o];
fsmesh.channelVelocityforceRadius = channelVelocityforceRadius[o]; fsmesh.channelVelocityforceRadius = channelVelocityforceRadius[o];
} }
else else*/
{ {
// set channels to 0 // set channels to 0
fsmesh.channelAttractforceStrength = fsmesh.channelAttractforceStrength =