Classes | Namespaces | Functions
Geometric

Classes

class  sal3d::Geometric::Plane
 Class that represents a plane in 3D space. More...
class  sal3d::Geometric::Sphere
 Class that represents a sphere in 3D space. More...

Namespaces

namespace  sal3d::Geometric
 

Namespace for the Geometric functions and classes.


Functions

Plane sal3d::Geometric::getRobustTangentPlane (const COP &cop, float expectedInliersRatio, float &inliersRatio)
 Extracts a plane from a COP.
Plane sal3d::Geometric::getRobustTangentPlane (const COP &cop, float expectedInliersRatio, std::vector< Point3D > &inliers, float &inliersRatio)
 Extracts a plane from a COP and returns the inliers.
Plane sal3d::Geometric::getAveragePlane (const COP &cop)
 Calculates an average plane from the COP points.
float sal3d::Geometric::distanceToPlane (const Point3D &point, const Plane &plane, Point3D &intersectionPoint)
 Calculates the distance between a given point and a plane in 3D space.
Sphere sal3d::Geometric::fitSphere (std::vector< Point3D > points)
 Calculates a sphere given four or more points.
Sphere sal3d::Geometric::fitCOPToSphere (const COP &cop)
 Calculates a sphere given a COP.

Function Documentation

float sal3d::Geometric::distanceToPlane ( const Point3D &  point,
const Plane &  plane,
Point3D &  intersectionPoint 
) [inline]

Calculates the distance between a given point and a plane in 3D space.

This function requires linking with geometric.lib (import library for geometric.dll).

Besides the distance, the algorithm also returns the intersection point, that is, the point belonging to the plane from where the distance was calculated.

Parameters:
[in]pointPoint3D from which the distance will be calculated.
[in]planePlane to which the distance will be calculated.
[in]intersectionPointintersection point between the virtual line (point to plane) and the plane.
Returns:
The distance from point to plane.

References sal3d::Geometric::Plane::c_plane(), and sal3d::Point3D::c_point_3d().

Sphere sal3d::Geometric::fitCOPToSphere ( const COP &  cop) [inline]

Calculates a sphere given a COP.

This function requires linking with geometric.lib (import library for geometric.dll).

Given a COP, this functions returns the best fitting Sphere containing the points in it.

Parameters:
[in]copThe COP used to calculate the sphere.
Returns:
The sphere that contains the points in the COP.

References sal3d::COP::c_cop().

Sphere sal3d::Geometric::fitSphere ( std::vector< Point3D >  points) [inline]

Calculates a sphere given four or more points.

This function requires linking with geometric.lib (import library for geometric.dll).

Given a vector of Point3Ds, this functions returns the best fitting Sphere containing them.

Parameters:
[in]pointsThe points used to calculate the sphere.
Returns:
The sphere that contains the points.
Plane sal3d::Geometric::getAveragePlane ( const COP &  cop) [inline]

Calculates an average plane from the COP points.

This function requires linking with geometric.lib (import library for geometric.dll).

Takes all the points in a COP, and calculates the plane to which the points have a minimum squared distance.

Parameters:
[in]copInput points
Returns:
The Plane calculated from the cop.

References sal3d::COP::c_cop().

Plane sal3d::Geometric::getRobustTangentPlane ( const COP &  cop,
float  expectedInliersRatio,
float &  inliersRatio 
) [inline]

Extracts a plane from a COP.

This function requires linking with geometric.lib (import library for geometric.dll).

Based on the expected ratio of inliers, this function looks for the plane containing the maximum number of points of the COP. The smaller the expected ratio is, the longer it will take for the algorithm to finish, as it has to test with more planes to statistically obtain a good result.

When finished, the algorithm also returns the actual ratio of inliers, i.e., points belonging to the found plane.

Parameters:
[in]copCOP from which the plane will be extracted.
[in]expectedInliersRatioestimated ratio of inliers in the plane. Ranges from [0..1].
[in]inliersRatioshows the ratio of points that belong to the Plane that was found. Ranges from [0..1].
Returns:
The Plane extracted from the cop.

References sal3d::COP::c_cop(), sal3d::COP::height(), and sal3d::COP::width().

Plane sal3d::Geometric::getRobustTangentPlane ( const COP &  cop,
float  expectedInliersRatio,
std::vector< Point3D > &  inliers,
float &  inliersRatio 
) [inline]

Extracts a plane from a COP and returns the inliers.

This function requires linking with geometric.lib (import library for geometric.dll).

Based on the expected ratio of inliers, this function looks for the plane containing the maximum number of points of the COP. The smaller the expected ratio is, the longer it will take for the algorithm to finish, as it has to test with more planes to statistically obtain a good result.

When finished, the algorithm also returns a vector of the inliers, i.e., points belonging to the found plane, and their ratio.

Parameters:
[in]copCOP from which the plane will be extracted.
[in]expectedInliersRatioestimated ratio of inliers in the plane. Ranges from [0..1].
[in]inliersA vector of points that belong to the plane.
[in]inliersRatioshows the ratio of points that belong to the Plane that was found. Ranges from [0..1].
Returns:
The Plane extracted from the cop.

References sal3d::COP::c_cop(), sal3d::COP::height(), and sal3d::COP::width().