41 #include <pcl/gpu/utils/device/vector_math.hpp>
54 __device__ __host__ __forceinline__
55 float4
compute_plane(
const float3& v,
const float3& v1,
const float3& v2,
const float3& p)
57 float3 n =
cross(v1 - v, v2 - v);
61 if (
dot(n, p) + d < 0)
66 return make_float4(n.x, n.y, n.z, d);
69 __device__ __host__ __forceinline__ float3
tr(
const PointType& p) {
return make_float3(p.x, p.y, p.z); }
73 __device__ __forceinline__
74 bool operator()(
const std::uint64_t& e1,
const int& e2)
const
76 int i1 = (int)(e1 >> 32);
81 __device__ __host__ __forceinline__
float compue_inv_normal_norm(
const float4& p) {
return 1.f/sqrt(p.x*p.x + p.y*p.y + p.z*p.z); }
84 __device__ __host__ __forceinline__ float4&
operator*=(float4& p,
float v) { p.x*=v; p.y*=v; p.z*=v; p.w*=v;
return p; }
__device__ __forceinline__ float3 tr(const T &v)
__device__ __forceinline__ float3 & operator*=(float3 &vec, const float &v)
__device__ __host__ __forceinline__ float compue_inv_normal_norm(const float4 &p)
__device__ __forceinline__ float dot(const float3 &v1, const float3 &v2)
__device__ __host__ __forceinline__ float4 compute_plane(const float3 &v, const float3 &v1, const float3 &v2, const float3 &p)
Computers plane from 3 points (v, v1, v2), ensures that point P lies positive subspace.
__device__ __host__ __forceinline__ float3 cross(const float3 &v1, const float3 &v2)
__device__ __forceinline__ bool operator()(const std::uint64_t &e1, const int &e2) const