diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H index 1c55ad2d05c5c620730aa1a292c0931c38fc00ae..7664b3cc863d290162731e6f598dda1c0b7acfce 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H +++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/PointHit.H @@ -117,6 +117,8 @@ public: // Member Functions + // Access + //- Is there a hit bool hit() const { @@ -167,6 +169,8 @@ public: return eligibleMiss_; } + // Edit + void setHit() { hit_ = true; diff --git a/src/OpenFOAM/meshes/primitiveShapes/objectHit/objectHit.H b/src/OpenFOAM/meshes/primitiveShapes/objectHit/objectHit.H index dd8a081b6dfa49907d0691be857d30affe042919..e4637ecde19be2c49a87da49e28dacde35d96546 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/objectHit/objectHit.H +++ b/src/OpenFOAM/meshes/primitiveShapes/objectHit/objectHit.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,6 +83,8 @@ public: // Member Functions + // Access + //- Is there a hit inline bool hit() const { @@ -96,6 +98,19 @@ public: } + // Edit + + void setHit() + { + hit_ = true; + } + + void setMiss() + { + hit_ = false; + } + + // Ostream operator inline friend Ostream& operator<<(Ostream& os, const objectHit& obj)