From e8d24767b25ef4bddfa9e2d79840ecf9a519c945 Mon Sep 17 00:00:00 2001 From: forty-twoo <1013417276@qq.com> Date: Sat, 26 Nov 2022 18:56:54 +0800 Subject: [PATCH] modify some files --- examples/example3_curve_curve_intersection/main.cpp | 7 +++++++ include/bvh.hpp | 6 ++++++ include/intersection.hpp | 1 + include/newton.hpp | 4 ++++ include/show_libigl.hpp | 3 ++- src/intersection.cpp | 9 +++++++-- src/newton.cpp | 1 + 7 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 include/newton.hpp create mode 100644 src/newton.cpp diff --git a/examples/example3_curve_curve_intersection/main.cpp b/examples/example3_curve_curve_intersection/main.cpp index defa5f3..f4a412b 100644 --- a/examples/example3_curve_curve_intersection/main.cpp +++ b/examples/example3_curve_curve_intersection/main.cpp @@ -1,3 +1,10 @@ +/* + * @File Created: 2022-11-26, 16:52:29 + * @Last Modified: 2022-11-26, 18:51:06 + * @Author: forty-twoo + * @Copyright (c) 2022, Caiyue Li(li_caiyue@zju.edu.cn), All rights reserved. + */ + #include #include #include "bvh.hpp" diff --git a/include/bvh.hpp b/include/bvh.hpp index 5fd0204..79ad658 100644 --- a/include/bvh.hpp +++ b/include/bvh.hpp @@ -1,3 +1,9 @@ +/* + * @File Created: 2022-11-24, 20:13:58 + * @Last Modified: 2022-11-26, 18:45:16 + * @Author: forty-twoo + * Copyright (c) 2022, Caiyue Li (li_caiyue@zju.edu.cn), All rights reserved. + */ #ifndef BVH_H_ #define BVH_H_ diff --git a/include/intersection.hpp b/include/intersection.hpp index 9fd77e7..f992a61 100644 --- a/include/intersection.hpp +++ b/include/intersection.hpp @@ -2,6 +2,7 @@ #define INTERSECTION_H_ #include "bvh.hpp" + bool CurveCurveBVHIntersect(BVH_AABB_NodePtr &BoxPtr1, BVH_AABB_NodePtr &BoxPtr2, std::vector> &IstNodePtr); #endif \ No newline at end of file diff --git a/include/newton.hpp b/include/newton.hpp new file mode 100644 index 0000000..56c0c44 --- /dev/null +++ b/include/newton.hpp @@ -0,0 +1,4 @@ +#ifndef NEWTON_H_ +#define NEWTON_H_ + +#endif \ No newline at end of file diff --git a/include/show_libigl.hpp b/include/show_libigl.hpp index b501672..6675c45 100644 --- a/include/show_libigl.hpp +++ b/include/show_libigl.hpp @@ -1,3 +1,4 @@ + #ifndef SHOW_LIBIGL_H_ #define SHOW_LIBIGL_H_ @@ -14,7 +15,7 @@ extern igl::opengl::glfw::Viewer viewer; #define YELLOW Eigen ::RowVector3d(1, 1, 0) #define PINK Eigen ::RowVector3d(0.8, 0.2, 0.6) -void ShowCurve_Igl(tinynurbs::RationalCurve &curve, double sampleNum, Eigen::RowVector3d color); +void ShowCurve_Igl(tinynurbs::RationalCurve &curve, double sampleNum, Eigen::RowVector3d color) void ShowSurface_Igl(tinynurbs::RationalSurface &surface, double sampleNumU, double sampleNumV, Eigen::RowVector3d color); void ShowBVHNode_Igl(BVH_AABB_NodePtr bvhNode, Eigen::RowVector3d color); void ShowAABB_Igl(AABB bound, Eigen::RowVector3d color); diff --git a/src/intersection.cpp b/src/intersection.cpp index d6f280c..643600e 100644 --- a/src/intersection.cpp +++ b/src/intersection.cpp @@ -1,3 +1,10 @@ +/* + * @File Created: 2022-11-26, 12:26:41 + * @Last Modified: 2022-11-26, 18:50:57 + * @Author: forty-twoo + * @Copyright (c) 2022, Caiyue Li(li_caiyue@zju.edu.cn), All rights reserved. + */ + #include "intersection.hpp" #include "show_libigl.hpp" @@ -82,7 +89,5 @@ bool CurveCurveBVHIntersect(BVH_AABB_NodePtr &BoxPtr1, BVH_AABB_NodePtr &BoxPtr2 return true; } else - { return false; - } } \ No newline at end of file diff --git a/src/newton.cpp b/src/newton.cpp new file mode 100644 index 0000000..6793c61 --- /dev/null +++ b/src/newton.cpp @@ -0,0 +1 @@ +#include "newton.hpp" \ No newline at end of file