Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tube and Dilated Mesh Level Set Constructors #1935

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions openvdb/openvdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ set(OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES
tools/ChangeBackground.h
tools/Clip.h
tools/Composite.h
tools/ConvexVoxelizer.h
tools/Count.h
tools/Dense.h
tools/DenseSparseTools.h
Expand All @@ -484,6 +485,7 @@ set(OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES
tools/GridTransformer.h
tools/Interpolation.h
tools/LevelSetAdvect.h
tools/LevelSetDilatedMesh.h
tools/LevelSetFilter.h
tools/LevelSetFracture.h
tools/LevelSetMeasure.h
Expand All @@ -492,6 +494,7 @@ set(OPENVDB_LIBRARY_TOOLS_INCLUDE_FILES
tools/LevelSetRebuild.h
tools/LevelSetSphere.h
tools/LevelSetTracker.h
tools/LevelSetTubes.h
tools/LevelSetUtil.h
tools/Mask.h
tools/Merge.h
Expand Down
2 changes: 1 addition & 1 deletion openvdb/openvdb/math/Vec2.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class Vec2: public Tuple<2, T>
Vec2<T> unitSafe() const
{
T l2 = lengthSqr();
return l2 ? *this/static_cast<T>(sqrt(l2)) : Vec2<T>(1,0);
return l2 != T(0) ? *this/static_cast<T>(sqrt(l2)) : Vec2<T>(1,0);
}

/// Multiply each element of this vector by @a scalar.
Expand Down
2 changes: 1 addition & 1 deletion openvdb/openvdb/math/Vec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class Vec3: public Tuple<3, T>
Vec3<T> unitSafe() const
{
T l2 = lengthSqr();
return l2 ? *this / static_cast<T>(sqrt(l2)) : Vec3<T>(1, 0 ,0);
return l2 != T(0) ? *this / static_cast<T>(sqrt(l2)) : Vec3<T>(1, 0 ,0);
}

// Number of cols, rows, elements
Expand Down
Loading
Loading