diff --git a/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt b/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt new file mode 100644 index 0000000000..50c854478b --- /dev/null +++ b/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required (VERSION 2.8.12) + +project (cafHexInterpolator) + +set( PROJECT_FILES + cafHexInterpolator.h +) + + +add_library( ${PROJECT_NAME} + ${PROJECT_FILES} +) + +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_link_libraries( ${PROJECT_NAME} LibCore ) + +source_group("" FILES ${PROJECT_FILES}) diff --git a/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator.h b/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator.h index fc1662a23f..af57af35ab 100644 --- a/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator.h +++ b/Fwk/AppFwk/cafHexInterpolator/cafHexInterpolator.h @@ -213,6 +213,13 @@ public: return interpolateInNormElm( pointInNormElm, values); } + static std::array vertexWeights(const std::array& hexCorners, + const cvf::Vec3d& point ) + { + cvf::Vec3d pointInNormElm = findNormalizedCoords(hexCorners, point); + return interpolationCoeffs(pointInNormElm); + } + private: static double interpolateInNormElm( const cvf::Vec3d & pointInNormElm, const std::array& values)