GMOperatorsInterfaces Interface CATICGMDistancePointBody
Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATICGMDistancePointBody
Class defining the operator for finding the minimum distance between
a CATMathPoint
and a CATBody
.
To use the operator:
- Create it with the
CATCGMCreateDistancePointBody
global function, giving the CATBody
as input,
- Call SetPoint method with a ,
- Run the operator,
- Retrieve the results with the GetResult... methods
Method Index
- o
GetPoint(CATMathPoint&)
- Get the input point.
- o
GetResultCell()
- Get the result
CATCell
.
- o
GetResultDistance()
- Get the result distance.
- o
GetResultMathPoint(CATMathPoint&)
- Get the result
CATMathPoint
.
- o
GetResultPoint()
- Get the result
CATPoint
.
- o
GetSignMode()
- Get the sign mode.
- o
Run()
- Runs this operator.
- o
SetPoint(CATMathPoint&)
- Set the input point.
- o
SetSignMode(CATDistanceSignMode)
- Define the sign mode.
Methods
o GetPoint
public virtual GetPoint( | | oPoint) |
-
Get the input point.
- Parameters:
-
- oPoint
- The point (that has been set using SetPoint method) from which the minimum
distance to the given body is to be found
o GetResultCell
public virtual GetResultCell( | ) |
-
Get the result
CATCell
.
- Description:
- Returns the
in given body on which the result point lies (calculated by the operator in the last run). This
can be
,
or
. It can also be
, if the sign mode is
CATDistanceSignModeZero
and if the point is found to be inside the volume.
- Returns:
- The cell in the given body on which the result point lies.
o GetResultDistance
public virtual GetResultDistance( | ) |
-
Get the result distance.
- Description:
- Returns the minimum distance between the given point and body calculated by the operator in the last run.
- If the sign mode is
CATDistanceSignModeSigned
, then result distance
may be negative. If it is negative, then it means that the point is inside the body and
the absolute value gives the minimum distance of the point from the shell of the body.
- If the sign mode is
CATDistanceSignModeZero
, and if the point is inside
the body, then result distance value is returned is zero.
- If the sign mode is
CATDistanceSignModeUnsigned
, and if the point is inside
the body, then result distance value is always non-negative and is equal to the distance of
the point from the shell of the body.
- Returns:
- Result distance between the point and the body.
o GetResultMathPoint
public virtual GetResultMathPoint( | | oMathPoint) |
-
Get the result
CATMathPoint
.
- Description:
- Returns the result
on the given body (calculated by the operator in the last run).
- Parameters:
-
- oPoint
- The result
on the given body.
o GetResultPoint
public virtual GetResultPoint( | ) |
-
Get the result
CATPoint
.
- Description:
- Returns the result
on the given body calculated by the operator in the last run.
- Returns:
- The result
on the given body. This gives the result in the context of the result cell.
- If the result cell is a
, then the returned
will be of type
- If the result cell is a
, then the returned
will be of type
- If the result cell is a
, then the returned
will be of type
- If the result cell is a
, then the returned
will be of type
Note: The returned
is created in the same container as the given
and it is owned by the caller. A new point is created each time this method is called. After use, call the
method.
o GetSignMode
public virtual GetSignMode( | ) |
-
Get the sign mode.
CATDistanceSignModeDefault
is interpreted as CATDistanceSignModeSigned
.
See the documentation of
to know more about the different sign modes
- Returns:
- Sign mode defined in the operator
- See also:
-
o Run
-
Runs this operator.
Note: You must call SetPoint before Run.
- Returns:
- 0 if the operator runs successfully and 1 otherwise.
o SetPoint
public virtual SetPoint( | const | iPoint) |
-
Set the input point.
Note: If you want to find the distance of more than one points from the same body,
then to get better performance, you can call SetPoint and Run as many times on
the same operator, rather than creating a new operator every time for each point.
- Parameters:
-
- iPoint
- The point from which the minimum distance to the given body is to be found
o SetSignMode
public virtual SetSignMode( | | iSignMode) |
-
Define the sign mode. The default is "Signed" mode.
CATDistanceSignModeDefault
is interpreted as CATDistanceSignModeSigned
.
See the documentation of
to know more about the different sign modes available and their meanings.
- Parameters:
-
- iSignMode
- Sign mode to be defined
- See also:
-
This object is included in the file: CATICGMDistancePointBody.h
If needed, your Imakefile.mk should include the module: CATGMOperatorsInterfaces
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.