Skip to content

Commit d3f37e7

Browse files
committed
Update LevelSetTubesImpl.h
Correct ScalarType computations. Signed-off-by: ghurstunither <[email protected]>
1 parent 952a863 commit d3f37e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openvdb/openvdb/tools/impl/LevelSetTubesImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ class TaperedCapsuleVoxelizer
932932
// but if mORad2 < 0, truncate the line segment to where radius equals 0
933933
// this way things like pullyPoints make geometric sense.
934934
if (mORad2 < ScalarType(0)){
935-
const ScalarType t = (r2 <= r1 ? -mRad2 : mRad1)/(mRad1 - mRad2);
935+
const ScalarType t = (r2 <= r1 ? r2/(r2 - r1) : r1/(r1 - r2));
936936

937937
const math::Vec3<ScalarType> pt_0 = r2 <= r1 ? pt1 : pt2;
938938
const ScalarType r_0 = r2 <= r1 ? r1 : r2;

0 commit comments

Comments
 (0)