#ifndef STIM_AABB3_H #define STIM_AABB3_H #include #include namespace stim{ //template //using aabb3 = aabbn; /// Structure for a 3D axis aligned bounding box template struct aabb3 : public aabbn{ CUDA_CALLABLE aabb3() : aabbn() {} CUDA_CALLABLE aabb3(T x0, T y0, T z0, T x1, T y1, T z1){ low[0] = x0; low[1] = y0; low[2] = z0; high[0] = x0; high[1] = x1; high[2] = x2; } CUDA_CALLABLE aabb3(T x, T y, T z) { low[0] = high[0] = x; low[1] = high[1] = y; low[2] = high[2] = z; } CUDA_CALLABLE void insert(T x, T y, T z) { T p[3]; p[0] = x; p[1] = y; p[2] = z; aabbn::insert(p); } CUDA_CALLABLE void trim_low(T x, T y, T z) { T p[3]; p[0] = x; p[1] = y; p[2] = z; aabbn::trim_low(p); } CUDA_CALLABLE void trim_high(T x, T y, T z) { T p[3]; p[0] = x; p[1] = y; p[2] = z; aabbn::trim_high(p); } }; } #endif