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:
Diffstat (limited to 'extern/mantaflow/preprocessed/grid.h')
-rw-r--r--extern/mantaflow/preprocessed/grid.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/extern/mantaflow/preprocessed/grid.h b/extern/mantaflow/preprocessed/grid.h
index 3d6f8558b8f..9c3d954771e 100644
--- a/extern/mantaflow/preprocessed/grid.h
+++ b/extern/mantaflow/preprocessed/grid.h
@@ -204,14 +204,12 @@ class GridBase : public PbClass {
inline void checkIndex(int i, int j, int k) const;
//! Check if indices are within bounds, otherwise error (should only be called when debugging)
inline void checkIndex(IndexInt idx) const;
- //! Check if index is within given boundaries
- inline bool isInBounds(const Vec3i &p, int bnd) const;
- //! Check if index is within given boundaries
- inline bool isInBounds(const Vec3i &p) const;
- //! Check if index is within given boundaries
+ //! Check if vector int is within given boundaries
+ inline bool isInBounds(const Vec3i &p, int bnd = 0) const;
+ //! Check if vector real is within given boundaries
inline bool isInBounds(const Vec3 &p, int bnd = 0) const
{
- return isInBounds(toVec3i(p), bnd);
+ return isInBounds(toVec3iFloor(p), bnd);
}
//! Check if linear index is in the range of the array
inline bool isInBounds(IndexInt idx) const;
@@ -1785,11 +1783,6 @@ inline void GridBase::checkIndex(IndexInt idx) const
}
}
-bool GridBase::isInBounds(const Vec3i &p) const
-{
- return (p.x >= 0 && p.y >= 0 && p.z >= 0 && p.x < mSize.x && p.y < mSize.y && p.z < mSize.z);
-}
-
bool GridBase::isInBounds(const Vec3i &p, int bnd) const
{
bool ret = (p.x >= bnd && p.y >= bnd && p.x < mSize.x - bnd && p.y < mSize.y - bnd);