Browse Source

modify some files

main
forty-twoo 2 years ago
parent
commit
e8d24767b2
  1. 7
      examples/example3_curve_curve_intersection/main.cpp
  2. 6
      include/bvh.hpp
  3. 1
      include/intersection.hpp
  4. 4
      include/newton.hpp
  5. 3
      include/show_libigl.hpp
  6. 9
      src/intersection.cpp
  7. 1
      src/newton.cpp

7
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 <igl/opengl/glfw/Viewer.h> #include <igl/opengl/glfw/Viewer.h>
#include <tinynurbs/tinynurbs.h> #include <tinynurbs/tinynurbs.h>
#include "bvh.hpp" #include "bvh.hpp"

6
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_ #ifndef BVH_H_
#define BVH_H_ #define BVH_H_

1
include/intersection.hpp

@ -2,6 +2,7 @@
#define INTERSECTION_H_ #define INTERSECTION_H_
#include "bvh.hpp" #include "bvh.hpp"
bool CurveCurveBVHIntersect(BVH_AABB_NodePtr &BoxPtr1, BVH_AABB_NodePtr &BoxPtr2, std::vector<std::pair<BVH_AABB_NodePtr, BVH_AABB_NodePtr>> &IstNodePtr); bool CurveCurveBVHIntersect(BVH_AABB_NodePtr &BoxPtr1, BVH_AABB_NodePtr &BoxPtr2, std::vector<std::pair<BVH_AABB_NodePtr, BVH_AABB_NodePtr>> &IstNodePtr);
#endif #endif

4
include/newton.hpp

@ -0,0 +1,4 @@
#ifndef NEWTON_H_
#define NEWTON_H_
#endif

3
include/show_libigl.hpp

@ -1,3 +1,4 @@
#ifndef SHOW_LIBIGL_H_ #ifndef SHOW_LIBIGL_H_
#define 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 YELLOW Eigen ::RowVector3d(1, 1, 0)
#define PINK Eigen ::RowVector3d(0.8, 0.2, 0.6) #define PINK Eigen ::RowVector3d(0.8, 0.2, 0.6)
void ShowCurve_Igl(tinynurbs::RationalCurve<double> &curve, double sampleNum, Eigen::RowVector3d color); void ShowCurve_Igl(tinynurbs::RationalCurve<double> &curve, double sampleNum, Eigen::RowVector3d color)
void ShowSurface_Igl(tinynurbs::RationalSurface<double> &surface, double sampleNumU, double sampleNumV, Eigen::RowVector3d color); void ShowSurface_Igl(tinynurbs::RationalSurface<double> &surface, double sampleNumU, double sampleNumV, Eigen::RowVector3d color);
void ShowBVHNode_Igl(BVH_AABB_NodePtr bvhNode, Eigen::RowVector3d color); void ShowBVHNode_Igl(BVH_AABB_NodePtr bvhNode, Eigen::RowVector3d color);
void ShowAABB_Igl(AABB bound, Eigen::RowVector3d color); void ShowAABB_Igl(AABB bound, Eigen::RowVector3d color);

9
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 "intersection.hpp"
#include "show_libigl.hpp" #include "show_libigl.hpp"
@ -82,7 +89,5 @@ bool CurveCurveBVHIntersect(BVH_AABB_NodePtr &BoxPtr1, BVH_AABB_NodePtr &BoxPtr2
return true; return true;
} }
else else
{
return false; return false;
}
} }

1
src/newton.cpp

@ -0,0 +1 @@
#include "newton.hpp"
Loading…
Cancel
Save