Geometrical edge error metric. More...
#include <MeshVizXLM/tessellator/MxEdgeErrorMetricGeometry.h>
Public Member Functions | |
MxEdgeErrorMetricGeometry (double maxError) | |
virtual bool | isEdgeLinear (const MbVec3d &coord0, const MbVec3d &coord1, const MbVec3d &coordM) const |
void | setMaxError (double maxError) |
virtual size_t | getTimeStamp () const |
This class is an example implementation of the interface MiEdgeErrorMetric. It is used to check if an edge can be considered linear or not based on the coordinates of its end points coord0 and coord1, the coordinate coordM of the parametric middle point, and a tolerance factor maxError.
This class can be used as an argument to the method MiTessellator::getNewTessellatorGeometry().
TessellatedLine, TessellatedSkin, TessellatedSurface, QuadraticLine, QuadraticSurface
MxEdgeErrorMetricGeometry::MxEdgeErrorMetricGeometry | ( | double | maxError | ) | [inline] |
Constructor that sets the tolerance factor maxError.
virtual size_t MxEdgeErrorMetricGeometry::getTimeStamp | ( | ) | const [inline, virtual] |
Returns the current time stamp on this edge error metric.
It changes each time the method setMaxError() is called.
Implements MiEdgeErrorMetric< MbVec3d >.
virtual bool MxEdgeErrorMetricGeometry::isEdgeLinear | ( | const MbVec3d & | coord0, | |
const MbVec3d & | coord1, | |||
const MbVec3d & | coordM | |||
) | const [virtual] |
Check if 3 points are linear based on their coordinates and the tolerance factor maxError.
If the method returns true, the segment defined by [coord0,coordM,coord1] is considered to be linear by the geometrical tessellator (see MiTessellator).
the segment is linear if d < maxError
[in] | coord0 | coordinate of the first end point of the segment. |
[in] | coord1 | coordinate of the second end point of the segment. |
[in] | coordM | coordinate corresponding the theoretical middle point of the segment. |
Implements MiEdgeErrorMetric< MbVec3d >.
void MxEdgeErrorMetricGeometry::setMaxError | ( | double | maxError | ) | [inline] |
Set the tolerance factor maxError.
This method also updates the time stamp of the current instance of MxEdgeErrorMetricGeometry.
[in] | maxError | new value of the tolerance factor. |