Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Thuerey <nils@thuerey.de>2006-11-06 00:51:27 +0300
committerNils Thuerey <nils@thuerey.de>2006-11-06 00:51:27 +0300
commit8b77d4241bd0a9763330a41d524349db9d1ee643 (patch)
treeffe81264ed2b8f9a5d8f92d1ec9486730858cd4b /intern/elbeem
parent2d0c6040dad66696f064cdab8325f901f93b2acf (diff)
- some more minor fixes, this time for MSVC
Diffstat (limited to 'intern/elbeem')
-rw-r--r--intern/elbeem/intern/attributes.cpp2
-rw-r--r--intern/elbeem/intern/isosurface.cpp2
-rw-r--r--intern/elbeem/intern/parametrizer.cpp48
-rw-r--r--intern/elbeem/intern/solver_util.cpp2
4 files changed, 40 insertions, 14 deletions
diff --git a/intern/elbeem/intern/attributes.cpp b/intern/elbeem/intern/attributes.cpp
index 0cf5315161a..fc8a0f4a14a 100644
--- a/intern/elbeem/intern/attributes.cpp
+++ b/intern/elbeem/intern/attributes.cpp
@@ -275,10 +275,12 @@ void __forceAnimChannelInstantiation() {
AnimChannel< double > tmp2;
AnimChannel< string > tmp3;
AnimChannel< ntlVector3Dim<float> > tmp4;
+ AnimChannel< ntlVector3Dim<double> > tmp5;
tmp1.debugPrintChannel();
tmp2.debugPrintChannel();
tmp3.debugPrintChannel();
tmp4.debugPrintChannel();
+ tmp5.debugPrintChannel();
}
diff --git a/intern/elbeem/intern/isosurface.cpp b/intern/elbeem/intern/isosurface.cpp
index 223435bc75a..9646e8581da 100644
--- a/intern/elbeem/intern/isosurface.cpp
+++ b/intern/elbeem/intern/isosurface.cpp
@@ -635,7 +635,7 @@ void IsoSurface::triangulate( void )
float smoSubdfac = 1.;
if(mSubdivs>0) {
//smoSubdfac = 1./(float)(mSubdivs);
- smoSubdfac = pow(0.55,(float)mSubdivs); // slightly stronger
+ smoSubdfac = pow(0.55,(double)mSubdivs); // slightly stronger
}
if(mSmoothSurface>0. || mSmoothNormals>0.) debMsgStd("IsoSurface::triangulate",DM_MSG,"Smoothing...",10);
if(mSmoothSurface>0.0) {
diff --git a/intern/elbeem/intern/parametrizer.cpp b/intern/elbeem/intern/parametrizer.cpp
index ae2bc7f3079..0bbdc2ee363 100644
--- a/intern/elbeem/intern/parametrizer.cpp
+++ b/intern/elbeem/intern/parametrizer.cpp
@@ -10,7 +10,7 @@
#include <sstream>
#include "parametrizer.h"
-// debug output flag
+// debug output flag, has to be off for win32 for some reason...
#define DEBUG_PARAMCHANNELS 0
/*! param seen debug string array */
@@ -149,7 +149,9 @@ void Parametrizer::parseAttrList()
*****************************************************************************/
void Parametrizer::setFrameNum(int frame) {
mFrameNum = frame;
- if(DEBUG_PARAMCHANNELS) errMsg("DEBUG_PARAMCHANNELS","setFrameNum frame-num="<<mFrameNum);
+#if DEBUG_PARAMCHANNELS>0
+ errMsg("DEBUG_PARAMCHANNELS","setFrameNum frame-num="<<mFrameNum);
+#endif // DEBUG_PARAMCHANNELS>0
}
/*! get time of an animation frame (renderer) */
// also used by: mpParam->getCurrentAniFrameTime() , e.g. for velocity dump
@@ -161,7 +163,9 @@ ParamFloat Parametrizer::getAniFrameTime( int frame ) {
errMsg("Parametrizer::setFrameNum","Invalid frame time:"<<anift<<" at frame "<<frame<<", resetting to "<<resetv);
anift = resetv;
}
+#if DEBUG_PARAMCHANNELS>0
if((0)|| (DEBUG_PARAMCHANNELS)) errMsg("DEBUG_PARAMCHANNELS","getAniFrameTime frame="<<frame<<", frametime="<<anift<<" ");
+#endif // DEBUG_PARAMCHANNELS>0
return anift;
}
@@ -198,7 +202,9 @@ ParamFloat Parametrizer::calculateCellSize(void)
ParamFloat Parametrizer::calculateOmega( double time ) {
ParamFloat viscStar = calculateLatticeViscosity(time);
ParamFloat relaxTime = (6.0 * viscStar + 1) * 0.5;
- if(DEBUG_PARAMCHANNELS) errMsg("DEBUG_PARAMCHANNELS","calculateOmega viscStar="<<viscStar<<" relaxtime="<<relaxTime);
+#if DEBUG_PARAMCHANNELS>0
+ errMsg("DEBUG_PARAMCHANNELS","calculateOmega viscStar="<<viscStar<<" relaxtime="<<relaxTime);
+#endif // DEBUG_PARAMCHANNELS>0
return (1.0/relaxTime);
}
@@ -207,7 +213,9 @@ ParamVec Parametrizer::calculateGravity( double time ) {
ParamVec grav = mcGravity.get(time);
ParamFloat forceFactor = (mTimestep *mTimestep)/mCellSize;
ParamVec latticeGravity = grav * forceFactor;
- if(DEBUG_PARAMCHANNELS) errMsg("DEBUG_PARAMCHANNELS","calculateGravity grav="<<grav<<" ff"<<forceFactor<<" lattGrav="<<latticeGravity);
+#if DEBUG_PARAMCHANNELS>0
+ errMsg("DEBUG_PARAMCHANNELS","calculateGravity grav="<<grav<<" ff"<<forceFactor<<" lattGrav="<<latticeGravity);
+#endif // DEBUG_PARAMCHANNELS>0
return latticeGravity;
}
@@ -219,7 +227,9 @@ ParamFloat Parametrizer::calculateLatticeViscosity( double time ) {
errMsg("Parametrizer::calculateLatticeViscosity"," Missing arguments!");
}
ParamFloat viscStar = mcViscosity.get(time) * mTimestep / (mCellSize*mCellSize);
- if(DEBUG_PARAMCHANNELS) errMsg("DEBUG_PARAMCHANNELS","calculateLatticeViscosity viscStar="<<viscStar);
+#if DEBUG_PARAMCHANNELS>0
+ errMsg("DEBUG_PARAMCHANNELS","calculateLatticeViscosity viscStar="<<viscStar);
+#endif // DEBUG_PARAMCHANNELS>0
return viscStar;
}
@@ -475,41 +485,55 @@ errMsg("Warning","Used z-dir for gstar!");
void Parametrizer::setViscosity(ParamFloat set) {
mcViscosity = AnimChannel<ParamFloat>(set);
seenThis( PARAM_VISCOSITY );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcViscosity set = "<< mcViscosity.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcViscosity set = "<< mcViscosity.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
void Parametrizer::initViscosityChannel(vector<ParamFloat> val, vector<double> time) {
mcViscosity = AnimChannel<ParamFloat>(val,time);
seenThis( PARAM_VISCOSITY );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcViscosity initc = "<< mcViscosity.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcViscosity initc = "<< mcViscosity.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
/*! set the external force */
void Parametrizer::setGravity(ParamFloat setx, ParamFloat sety, ParamFloat setz) {
mcGravity = AnimChannel<ParamVec>(ParamVec(setx,sety,setz));
seenThis( PARAM_GRAVITY );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcGravity set = "<< mcGravity.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcGravity set = "<< mcGravity.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
void Parametrizer::setGravity(ParamVec set) {
mcGravity = AnimChannel<ParamVec>(set);
seenThis( PARAM_GRAVITY );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcGravity set = "<< mcGravity.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcGravity set = "<< mcGravity.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
void Parametrizer::initGravityChannel(vector<ParamVec> val, vector<double> time) {
mcGravity = AnimChannel<ParamVec>(val,time);
seenThis( PARAM_GRAVITY );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcGravity initc = "<< mcGravity.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcGravity initc = "<< mcGravity.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
/*! set time of an animation frame (renderer) */
void Parametrizer::setAniFrameTimeChannel(ParamFloat set) {
mcAniFrameTime = AnimChannel<ParamFloat>(set);
seenThis( PARAM_ANIFRAMETIME );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcAniFrameTime set = "<< mcAniFrameTime.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcAniFrameTime set = "<< mcAniFrameTime.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
void Parametrizer::initAniFrameTimeChannel(vector<ParamFloat> val, vector<double> time) {
mcAniFrameTime = AnimChannel<ParamFloat>(val,time);
seenThis( PARAM_ANIFRAMETIME );
- if(DEBUG_PARAMCHANNELS) { errMsg("DebugChannels","Parametrizer::mcAniFrameTime initc = "<< mcAniFrameTime.printChannel() ); }
+#if DEBUG_PARAMCHANNELS>0
+ { errMsg("DebugChannels","Parametrizer::mcAniFrameTime initc = "<< mcAniFrameTime.printChannel() ); }
+#endif // DEBUG_PARAMCHANNELS>0
}
// OLD interface stuff
diff --git a/intern/elbeem/intern/solver_util.cpp b/intern/elbeem/intern/solver_util.cpp
index f3552299cb7..3f9f5850032 100644
--- a/intern/elbeem/intern/solver_util.cpp
+++ b/intern/elbeem/intern/solver_util.cpp
@@ -892,7 +892,7 @@ void LbmFsgrSolver::advanceParticles() {
// check speed, perhaps normalize
gfxReal vlensqr = normNoSqrt(v);
if(vlensqr > 0.166*0.166) {
- v *= 1./sqrtf(vlensqr)*0.166;
+ v *= 1./sqrtf((float)vlensqr)*0.166;
}
// compute cell velocity
LbmFloat *tcel = RACPNT(level, oi,oj,ok, workSet);