GLC_Distance is the minimum distance between to elements. More...
#include <glc_distance.h>
Classes | |
| struct | DistanceResult |
Public Member Functions | |
Constructor / Destructor | |
| GLC_Distance () | |
| Default constructor. | |
| GLC_Distance (const GLC_3DViewInstance &, const GLC_3DViewInstance &) | |
| Construct a distmin with 2 GLC_3DViewInstance. | |
| GLC_Distance (const GLC_Distance &) | |
| Copy Constructor. | |
| virtual | ~GLC_Distance () |
| Default destructor. | |
Set Functions | |
| void | clear () |
| Clear the 2 groups. | |
| void | addInstanceInGroup1 (const GLC_3DViewInstance &) |
| Add instance in group 1. | |
| void | addInstancesInGroup1 (const QList< GLC_3DViewInstance > &) |
| Add instances list in group 1. | |
| void | addInstanceInGroup2 (const GLC_3DViewInstance &) |
| Add instance in group 1. | |
| void | addInstancesInGroup2 (const QList< GLC_3DViewInstance > &) |
| Add instances list in group 1. | |
| void | computeMinimumDistance () |
| Compute the minimum distance between the 2 groups. | |
| void | setRelativeError (double error) |
| Set the relative Error value. | |
| void | setAbsoluteError (double error) |
| Set the absolute Error value. | |
Get Functions | |
| double | distMin () const |
| Return the minimum distance between the 2 groups. | |
| GLC_Point3d | point1 () const |
| Return First point of the distance. | |
| GLC_Point3d | point2 () const |
| Return Second point of the distance. | |
| double | relativeError () const |
| Return the relative error. | |
| double | absoluteError () const |
| Return the absolute error. | |
Private Member Functions | |
| DistanceResult | minimumDistance (QList< GLC_3DViewInstance > &, QList< GLC_3DViewInstance > &) const |
| Return distance mini beween to instance. | |
| void | getPQPPoint (double &, double &, double &, const double, const double, const double, const GLC_Matrix4x4 &) const |
| Get the PQP Point after matricial transformation. | |
| void | addMeshTrianglesToPQP (PQP_Model *, const QList< GLC_Mesh * >, const GLC_Matrix4x4 &) const |
| Add mesh triangles to PQP model. | |
Private Attributes | |
| QList< GLC_3DViewInstance > | m_ListOfInstances1 |
| The first list of instance. | |
| QList< GLC_3DViewInstance > | m_ListOfInstances2 |
| The Second list of instance. | |
| GLC_Point3d | m_Point1 |
| The Minimum Distance point 1. | |
| GLC_Point3d | m_Point2 |
| The Minimum Distance point 2. | |
| double | m_DistanceMini |
| The minimum distance. | |
| double | m_RelativeError |
| The PQP relative error. | |
| double | m_AbsoluteError |
| The PQP abolute error. | |
GLC_Distance is the minimum distance between to elements.
GLC_Distance is used to compute the minimum distance between to Elements.
Definition at line 45 of file glc_distance.h.
| GLC_Distance::GLC_Distance | ( | ) |
Default constructor.
Definition at line 36 of file glc_distance.cpp.
| GLC_Distance::GLC_Distance | ( | const GLC_3DViewInstance & | instance1, | |
| const GLC_3DViewInstance & | instance2 | |||
| ) |
Construct a distmin with 2 GLC_3DViewInstance.
Definition at line 50 of file glc_distance.cpp.
References m_ListOfInstances1, and m_ListOfInstances2.
| GLC_Distance::GLC_Distance | ( | const GLC_Distance & | distance | ) |
Copy Constructor.
Definition at line 65 of file glc_distance.cpp.
| GLC_Distance::~GLC_Distance | ( | ) | [virtual] |
Default destructor.
Definition at line 78 of file glc_distance.cpp.
| double GLC_Distance::absoluteError | ( | ) | const [inline] |
Return the absolute error.
Definition at line 127 of file glc_distance.h.
| void GLC_Distance::addInstanceInGroup1 | ( | const GLC_3DViewInstance & | instance | ) |
Add instance in group 1.
Definition at line 98 of file glc_distance.cpp.
References m_ListOfInstances1.
| void GLC_Distance::addInstanceInGroup2 | ( | const GLC_3DViewInstance & | instance | ) |
Add instance in group 1.
Definition at line 110 of file glc_distance.cpp.
References m_ListOfInstances2.
| void GLC_Distance::addInstancesInGroup1 | ( | const QList< GLC_3DViewInstance > & | instances | ) |
Add instances list in group 1.
Definition at line 104 of file glc_distance.cpp.
References m_ListOfInstances1.
| void GLC_Distance::addInstancesInGroup2 | ( | const QList< GLC_3DViewInstance > & | instances | ) |
Add instances list in group 1.
Definition at line 116 of file glc_distance.cpp.
References m_ListOfInstances2.
| void GLC_Distance::addMeshTrianglesToPQP | ( | PQP_Model * | pPQP_Model, | |
| const QList< GLC_Mesh * > | listOfMeshes, | |||
| const GLC_Matrix4x4 & | instanceMatrix | |||
| ) | const [private] |
Add mesh triangles to PQP model.
Definition at line 291 of file glc_distance.cpp.
References GLC_Mesh::containsFans(), GLC_Mesh::containsStrips(), GLC_Mesh::containsTriangles(), GLC_Mesh::getFansIndex(), getPQPPoint(), GLC_Mesh::getStripsIndex(), GLC_Mesh::getTrianglesIndex(), GLC_Mesh::lodContainsMaterial(), GLC_Geometry::material(), GLC_Geometry::materialCount(), GLC_Geometry::materialIds(), and GLC_Mesh::positionVector().
Referenced by minimumDistance().
| void GLC_Distance::clear | ( | void | ) |
Clear the 2 groups.
Definition at line 88 of file glc_distance.cpp.
References m_DistanceMini, m_ListOfInstances1, m_ListOfInstances2, m_Point1, m_Point2, and GLC_Vector3d::setVect().
| void GLC_Distance::computeMinimumDistance | ( | ) |
Compute the minimum distance between the 2 groups.
Definition at line 122 of file glc_distance.cpp.
References GLC_Distance::DistanceResult::m_Distance, m_DistanceMini, m_ListOfInstances1, m_ListOfInstances2, m_Point1, GLC_Distance::DistanceResult::m_Point1, m_Point2, GLC_Distance::DistanceResult::m_Point2, and minimumDistance().
| double GLC_Distance::distMin | ( | ) | const [inline] |
Return the minimum distance between the 2 groups.
Definition at line 111 of file glc_distance.h.
| void GLC_Distance::getPQPPoint | ( | double & | p0, | |
| double & | p1, | |||
| double & | p2, | |||
| const double | x, | |||
| const double | y, | |||
| const double | z, | |||
| const GLC_Matrix4x4 & | instanceMatrix | |||
| ) | const [private] |
Get the PQP Point after matricial transformation.
Definition at line 281 of file glc_distance.cpp.
References GLC_Vector3d::x().
Referenced by addMeshTrianglesToPQP().
| GLC_Distance::DistanceResult GLC_Distance::minimumDistance | ( | QList< GLC_3DViewInstance > & | GLC_3DViewList1, | |
| QList< GLC_3DViewInstance > & | GLC_3DViewList2 | |||
| ) | const [private] |
Return distance mini beween to instance.
services functions
Create the list ot the instance1 meshs
Create the list ot the instance2 meshs
Definition at line 148 of file glc_distance.cpp.
References addMeshTrianglesToPQP(), GLC_3DViewInstance::geomAt(), m_AbsoluteError, GLC_Distance::DistanceResult::m_Distance, GLC_Distance::DistanceResult::m_Point1, GLC_Distance::DistanceResult::m_Point2, m_RelativeError, GLC_3DViewInstance::matrix(), GLC_3DViewInstance::numberOfGeometry(), point1(), and point2().
Referenced by computeMinimumDistance().
| GLC_Point3d GLC_Distance::point1 | ( | void | ) | const [inline] |
Return First point of the distance.
Definition at line 115 of file glc_distance.h.
Referenced by minimumDistance().
| GLC_Point3d GLC_Distance::point2 | ( | void | ) | const [inline] |
Return Second point of the distance.
Definition at line 119 of file glc_distance.h.
Referenced by minimumDistance().
| double GLC_Distance::relativeError | ( | ) | const [inline] |
Return the relative error.
Definition at line 123 of file glc_distance.h.
| void GLC_Distance::setAbsoluteError | ( | double | error | ) | [inline] |
Set the absolute Error value.
Definition at line 101 of file glc_distance.h.
| void GLC_Distance::setRelativeError | ( | double | error | ) | [inline] |
Set the relative Error value.
Definition at line 97 of file glc_distance.h.
double GLC_Distance::m_AbsoluteError [private] |
The PQP abolute error.
Definition at line 172 of file glc_distance.h.
Referenced by minimumDistance().
double GLC_Distance::m_DistanceMini [private] |
The minimum distance.
Definition at line 166 of file glc_distance.h.
Referenced by clear(), and computeMinimumDistance().
QList<GLC_3DViewInstance> GLC_Distance::m_ListOfInstances1 [private] |
The first list of instance.
Definition at line 154 of file glc_distance.h.
Referenced by addInstanceInGroup1(), addInstancesInGroup1(), clear(), computeMinimumDistance(), and GLC_Distance().
QList<GLC_3DViewInstance> GLC_Distance::m_ListOfInstances2 [private] |
The Second list of instance.
Definition at line 157 of file glc_distance.h.
Referenced by addInstanceInGroup2(), addInstancesInGroup2(), clear(), computeMinimumDistance(), and GLC_Distance().
GLC_Point3d GLC_Distance::m_Point1 [private] |
The Minimum Distance point 1.
Definition at line 160 of file glc_distance.h.
Referenced by clear(), and computeMinimumDistance().
GLC_Point3d GLC_Distance::m_Point2 [private] |
The Minimum Distance point 2.
Definition at line 163 of file glc_distance.h.
Referenced by clear(), and computeMinimumDistance().
double GLC_Distance::m_RelativeError [private] |
The PQP relative error.
Definition at line 169 of file glc_distance.h.
Referenced by minimumDistance().