Skip to content

Commit

Permalink
Update LevelSetTubes.h
Browse files Browse the repository at this point in the history
Misc fixes.
  • Loading branch information
ghurstunither committed Oct 8, 2024
1 parent 5f297f1 commit 0494610
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions openvdb/openvdb/tools/LevelSetTubes.h
Original file line number Diff line number Diff line change
Expand Up @@ -893,10 +893,8 @@ class RoundConeVoxelizer

// cint_cnt == 1 and we're only in one ball

if (zt > conezb)
zb = conezb;
else
zt = conezb;
zt = math::Max(zt, conezb);
zb = math::Min(zb, conezb);

return true;
};
Expand Down Expand Up @@ -1013,11 +1011,12 @@ class RoundConeVoxelizer
// alpha is solid angle of cone
// r1 != r2, since the object is not a capsule
// P > abs(r1-r2), since one ball is not contained in the other
const double P = mV.length();
const double csc = P/mRdiff; // csc(alpha/2)
const double P = mV.length(),
csc = P/mRdiff, // csc(alpha/2)
sin = mRdiff/P; // sin(alpha/2)
mGamma = 1.0 - mRdiff2/(P*P); // cos(alpha/2)^2
mH1 = mORad2*csc;
mH2 = mORad1*csc;
mH1 = mORad2*(csc-sin);
mH2 = mORad1*(csc-sin);

mConeD = -((Vec3d)mV).unitSafe();
mConeV = (Vec3d)mPt1 - (double)mORad1 * csc * mConeD;
Expand Down

0 comments on commit 0494610

Please sign in to comment.