You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
699 B
28 lines
699 B
//
|
|
// Created by 14727 on 2022/12/11.
|
|
//
|
|
|
|
#ifndef NURBSEVALUATOR_AABB_CUH
|
|
#define NURBSEVALUATOR_AABB_CUH
|
|
|
|
#include "vec.cuh"
|
|
#include "cstdio"
|
|
|
|
class AABB {
|
|
public:
|
|
// 边界
|
|
FVec3 pMin, pMax;
|
|
__device__ __host__ AABB();
|
|
__device__ __host__ explicit AABB(const FVec3& p);
|
|
__device__ __host__ AABB(const FVec3& p1, const FVec3& p2);
|
|
|
|
// aabb包围盒合并操作,包围盒和点
|
|
__device__ __host__ AABB Union(const FVec3& p);
|
|
// aabb包围盒合并操作,两个包围盒
|
|
__device__ __host__ AABB Union(const AABB& b2);
|
|
// 判断两个aabb包围盒是否重叠
|
|
__device__ __host__ bool IsOverlap(const AABB& b2);
|
|
};
|
|
|
|
|
|
#endif //NURBSEVALUATOR_AABB_CUH
|
|
|