|  | RobWorkProject
    23.9.11-
    | 
A metric for calculating plane-to-plane distance. More...
#include <Plane.hpp>
Inherits Metric< rw::geometry::Plane >.
| Public Member Functions | |
| PlaneMetric (double angToDistWeight=1.0) | |
| Constructor.  More... | |
|  Public Member Functions inherited from Metric< rw::geometry::Plane > | |
| virtual | ~Metric () | 
| Destructor. | |
| scalar_type | distance (const value_type &q) const | 
| The distance from the zero element to q. | |
| scalar_type | distance (const value_type &a, const value_type &b) const | 
| The distance from element a to b.  More... | |
| int | size () const | 
| The dimension of elements on which this metric operates.  More... | |
| Protected Member Functions | |
| double | doDistance (const Plane &q) const | 
| Calculates distance from the plane to reference plane (X-Y surface) | |
| double | doDistance (const Plane &a, const Plane &b) const | 
| Calculates distance between two planes.  More... | |
| int | doSize () const | 
| The dimension of elements on which this metric operates.  More... | |
|  Protected Member Functions inherited from Metric< rw::geometry::Plane > | |
| Metric () | |
| Protected constructor called by subclassed. | |
| Metric (const Metric &) | |
| Disable copying of superclass. | |
| Metric & | operator= (const Metric &) | 
| Disable assignment of superclass. | |
| Protected Attributes | |
| double | _angToDistWeight | 
| Additional Inherited Members | |
|  Public Types inherited from Metric< rw::geometry::Plane > | |
| typedef rw::geometry::Plane | value_type | 
| The type of element on which the metric operates. | |
| typedef T::value_type | scalar_type | 
| The type of the scalar. | |
| typedef rw::core::Ptr< Metric< rw::geometry::Plane > > | Ptr | 
| A pointer to a Metric<T>. | |
| typedef rw::core::Ptr< const Metric< rw::geometry::Plane > > | CPtr | 
| A pointer to a const Metric<T>. | |
A metric for calculating plane-to-plane distance.
| 
 | inline | 
Constructor.
| angToDistWeight | [in] weighting of angle compared to linear distance. | 
Calculates distance between two planes.
The distance is calculated according to formula:
val = 0.5*angle(p1.normal, p2.normal)*angToDistWeight + 0.5*fabs(p1.d-p2.d);
Angle is normalized, so that planes with opposite normals are treated as the same plane.
Implements Metric< rw::geometry::Plane >.
| 
 | inlineprotectedvirtual | 
The dimension of elements on which this metric operates.
The returns -1 if the elements don't have a measure of dimension or if the metric works for elements of all dimensions.
Reimplemented from Metric< rw::geometry::Plane >.
| 
 | protected | 
| weighting | of angle compared to linear distance. |