more refactoring
This commit is contained in:
@@ -60,7 +60,30 @@ namespace cv
|
||||
//! takes coordiante frame data and builds transfrom to global coordinate frame
|
||||
CV_EXPORTS Affine3f makeTransformToGlobal(const Vec3f& axis_x, const Vec3f& axis_y, const Vec3f& axis_z, const Vec3f& origin = Vec3f::all(0));
|
||||
|
||||
//! constructs camera pose from posiont, focal_point and up_vector (see gluLookAt() for more infromation
|
||||
CV_EXPORTS Affine3f makeCameraPose(const Vec3f& position, const Vec3f& focal_point, const Vec3f& up_vector);
|
||||
|
||||
//! checks float value for Nan
|
||||
inline bool isNan(float x)
|
||||
{
|
||||
unsigned int *u = reinterpret_cast<unsigned int *>(&x);
|
||||
return ((u[0] & 0x7f800000) == 0x7f800000) && (u[0] & 0x007fffff);
|
||||
}
|
||||
|
||||
//! checks double value for Nan
|
||||
inline bool isNan(double x)
|
||||
{
|
||||
unsigned int *u = reinterpret_cast<unsigned int *>(&x);
|
||||
return (u[1] & 0x7ff00000) == 0x7ff00000 && (u[0] != 0 || (u[1] & 0x000fffff) != 0);
|
||||
}
|
||||
|
||||
//! checks vectors for Nans
|
||||
template<typename _Tp, int cn> inline bool isNan(const Vec<_Tp, cn>& v)
|
||||
{ return isNan(v.val[0]) || isNan(v.val[1]) || isNan(v.val[2]); }
|
||||
|
||||
//! checks point for Nans
|
||||
template<typename _Tp> inline bool isNan(const Point3_<_Tp>& p)
|
||||
{ return isNan(p.x) || isNan(p.y) || isNan(p.z); }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user