Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
MxEdgeErrorMetricGeometry Class Reference

MeshViz Geometrical edge error metric. More...

#include <MeshVizXLM/tessellator/MxEdgeErrorMetricGeometry.h>

+ Inheritance diagram for MxEdgeErrorMetricGeometry:

Public Member Functions

 MxEdgeErrorMetricGeometry (double maxError)
 Constructor that sets the tolerance factor maxError.
 
virtual bool isEdgeLinear (const MbVec3d &coord0, const MbVec3d &coord1, const MbVec3d &coordM) const
 Check if 3 points are linear based on their coordinates and the tolerance factor maxError.
 
void setMaxError (double maxError)
 Set the tolerance factor maxError.
 
virtual size_t getTimeStamp () const
 Returns the current time stamp on this edge error metric.
 
- Public Member Functions inherited from MiEdgeErrorMetric< MbVec3d >
virtual ~MiEdgeErrorMetric ()
 

Detailed Description

MeshViz Geometrical edge error metric.

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().

See also
MiTessellator

Definition at line 48 of file MxEdgeErrorMetricGeometry.h.

Constructor & Destructor Documentation

◆ MxEdgeErrorMetricGeometry()

MxEdgeErrorMetricGeometry::MxEdgeErrorMetricGeometry ( double  maxError)
inline

Constructor that sets the tolerance factor maxError.

Definition at line 55 of file MxEdgeErrorMetricGeometry.h.

Member Function Documentation

◆ getTimeStamp()

virtual size_t MxEdgeErrorMetricGeometry::getTimeStamp ( ) const
inlinevirtual

Returns the current time stamp on this edge error metric.

It changes each time
the method setMaxError() is called.

Implements MiEdgeErrorMetric< MbVec3d >.

Definition at line 87 of file MxEdgeErrorMetricGeometry.h.

◆ isEdgeLinear()

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
Parameters
[in]coord0coordinate of the first end point of the segment.
[in]coord1coordinate of the second end point of the segment.
[in]coordMcoordinate corresponding the theoretical middle point of the segment.
Returns
true if the distance from the point coordM to the segment [coord0,coord1] < maxError

Implements MiEdgeErrorMetric< MbVec3d >.

◆ setMaxError()

void MxEdgeErrorMetricGeometry::setMaxError ( double  maxError)
inline

Set the tolerance factor maxError.


This method also updates the time stamp of the current instance of MxEdgeErrorMetricGeometry.

Parameters
[in]maxErrornew value of the tolerance factor.

Definition at line 77 of file MxEdgeErrorMetricGeometry.h.


The documentation for this class was generated from the following file: