All Frameworks Class Hierarchy This Framework Indexes
TopologicalOperatorsLight Class CATDistanceMinBodyBody
Usage: you must use this class as is. You should never derive it.
public class CATDistanceMinBodyBody
Class defining the operator that computes the minimum distance between two bodies.
To use the operator:
- Create it with the CATCreateDistanceMinTopo global function,
- Set parameters to tune its use (ADVANCED mode),
- Run the operator (ADVANCED mode),
- Retrieve the results with the Get methods,
- If needed, change an input body and rerun the modified operator (ADVANCED mode),
- delete it after use with the usual C++ delete operator.
Note: If the operator is used in BASIC mode, the operation is directly computed at the
operator creation. So that you directly access the result without Running the operator.
But you cannot tune the parameters, nor reuse it in another run with other input bodies.
Constructor and Destructor Index
- o
~CATDistanceMinBodyBody()
-
Method Index
- o
GetDistance()
- Returns the computed minimum distance between the two bodies.
- o
GetPointComputationMode()
- Returns the computation mode (ADVANCED mode).
- o
GetPoints(CATPoint*&,CATPoint*&)
- Returns the points realizing the minimum distance (ADVANCED mode).
- o
GetSupportCells(CATCell*&,CATCell*&)
- Returns the cells on which are the points realizing the minimum distance (ADVANCED mode).
- o
ReplaceBody(CATBody*,CATBody*)
- Defines another computation (ADVANCED mode).
- o
Run()
- Computes the distance (ADVANCED mode).
- o
SetDistanceMax(double)
- Defines a maximum distance between the two bodies (ADVANCED mode).
- o
SetPointComputationMode(CATBoolean)
- Asks for the computation of the points realizing the minimum distance (ADVANCED mode).
Constructor and Destructor
o ~CATDistanceMinBodyBody
| public virtual ~CATDistanceMinBodyBody( | ) |
-
Methods
o GetDistance
-
Returns the computed minimum distance between the two bodies.
- Returns:
- The minimum distance. If the distance could not be computed, returns -1.
o GetPointComputationMode
| public GetPointComputationMode( | ) |
-
Returns the computation mode (ADVANCED mode).
- Returns:
- The computation mode.
Legal values:
TRUE if the points must be computed, FALSE otherwise.
o GetPoints
| public GetPoints( | | oPoint1, |
| | oPoint2) |
-
Returns the points realizing the minimum distance (ADVANCED mode).
Useless points must be deleted. Their life cycle is not managed by the operator.
- Parameters:
-
- oPoint1
- The pointer to the point on the first body.
- oPoint2
- The pointer to the point on the second body.
o GetSupportCells
| public GetSupportCells( | | oCell1, |
| | oCell2) |
-
Returns the cells on which are the points realizing the minimum distance (ADVANCED mode).
The SetPointComputationMode method should be called before, otherwise NULL pointers are returned.
The life cyle of the cells is managed by the operator.
- Parameters:
-
- oCell1
- The pointer to the cell on the first body.
- oCell2
- The pointer to the cell on the second body.
o ReplaceBody
| public ReplaceBody( | | iBodyToReplace, |
| | iNewBody) |
-
Defines another computation (ADVANCED mode).
If points were computed, they are deleted.
- Parameters:
-
- iBodyToReplace
- The pointer to the body to be replaced in the definition of the operator.
- iNewBody
- The pointer to the body replacing iBodyToReplace in this operator.
o Run
-
Computes the distance (ADVANCED mode).
o SetDistanceMax
| public SetDistanceMax( | | iDistance) |
-
Defines a maximum distance between the two bodies (ADVANCED mode).
- Parameters:
-
- iDistance
- The value of the distance known to be an upper bound of the distance between the
two bodies. This can optimize the performance of the computation.
o SetPointComputationMode
| public SetPointComputationMode( | | iTrueOrFalse) |
-
Asks for the computation of the points realizing the minimum distance (ADVANCED mode).
This method is to be used prior to calling the GetSupportCells method.
The life cycle of the points is managed by the operator: they are deleted at the
operator deletion, or when another computation is asked for
(
CATDistanceMinBodyBody.ReplaceBody. This is not applicable to the GetPoints method. Points retrieved by using GetPoints must be deleted when they become useless.
- Parameters:
-
- iTrueOrFalse
- The computation mode.
Legal values:
TRUE if the points must be computed, FALSE otherwise.
This object is included in the file: CATDistanceMinBodyBody.h
If needed, your Imakefile.mk should include the module: CATTopologicalOperatorsLight