GMOperatorsInterfaces Interface CATICGMDistanceMinBodyBody
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICGMDistanceMinBodyBody
Class defining the operator that computes the minimum distance between two bodies.
To use the operator:
- Create it with the CATCGMCreateDistanceMinTopo 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),
- Release the operator with the Release method after use.
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.
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).
Methods
o GetDistance
public virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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 virtual 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
(
. 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: CATICGMDistanceMinBodyBody.h
If needed, your Imakefile.mk should include the module: CATGMOperatorsInterfaces
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.