VisualizationFoundation CAT3DLineGPEditHelper

Usage: you must use this class as is. You should never derive it.


public class CAT3DLineGPEditHelper

Class to edit CAT3DLineGP graphic primitive CATGraphicPrimitive must be edited in context, this class handles edition authorization.
NB : Do not keep EditHelper alive wore than necessary. Edition context notifcation is done on destruction. That's why heap allocation is forbidden.


Constructor and Destructor Index


o CAT3DLineGPEditHelper()
Constructor.
o ~CAT3DLineGPEditHelper()
Destructor.

Method Index


o Get(float**,int*,int*)
Retrieves line parameters, such as points coordinates, number of points and line type.
o GetLine()
Get the currently edited CAT3DLineGP.
o IsEditionPossible(CAT3DLineGP*,CATRep*)
Get if the edition of the given graphic primitive is possible, and if not, why.
o Reset(CAT3DLineGP*,CATRep*)
Set the currenlty edited CAT3DLineGP with its edition context In case of success, if the EditHelper is not empty, the old edition context is notified.
o ResetExtended(CAT3DLineGP*,CATRep*,unsigned int)
Set the currenlty edited CAT3DLineGP with its edition context.

Data Member Index


o ReplaceByDuplicateIfMultiAggreg

Constructor and Destructor


o CAT3DLineGPEditHelper
public CAT3DLineGPEditHelper()
Constructor.
o ~CAT3DLineGPEditHelper
public ~CAT3DLineGPEditHelper()
Destructor. If the EditHelper is not empty, the edition context is notified.

Methods


o Get
public Get( oPoints,
oNbPoints,
oLineType)
Retrieves line parameters, such as points coordinates, number of points and line type. Role:This method must be called in the following way :
                float const* points;
                int nbPoints, lineType;

                Get(&points, &nbPoints, &lineType);
 
Parameters:
oPoints
Retrieves the points coordinates array. Array of points coordinates: XYZXYZXYZ... Its size is equal to three times the number of points.
oNbPoints
Retrieves the number of points.
oLineType
Retrieves the line type.
Legal values:
LINES
The number of points must be even. A line will be drawn between points 1 and 2, an other line will be drawn between points 3 and 4, ...
LINE_STRIP
The number of points can be either even or odd. A line will be drawn between points 1 and 2, then, an other line will be drawn between points 2 and 3, ...
LINE_LOOP
Same as LINE_LOOP, excepted that one more line will be drawn between the last and the first points.
o GetLine
public GetLine()
Get the currently edited CAT3DLineGP.
Returns:
The currently edited CAT3DLineGP. If the EditHelper was empty, NULL is returned.
o IsEditionPossible
public static IsEditionPossible( iLine,
iRep)
Get if the edition of the given graphic primitive is possible, and if not, why.
Parameters:
iLine
The line to be edited
iRep
The Rep which should contain the line
Returns:
A CATGraphicPrimitiveEditHelper::EditAuthorization value, depending of the context.
o Reset
public Reset( iGP,
iRep)
Set the currenlty edited CAT3DLineGP with its edition context In case of success, if the EditHelper is not empty, the old edition context is notified.
Parameters:
iFace
The CAT3DLineGP instance which will be edited.
iRep
The Rep containing the CAT3DLineGP. Currently supported rep are CATSurfacicRep and CAT3DCustomRep. If the line is not contained in any Rep, this parameter can be NULL
Returns:
If the line can be edited in the provided context, S_OK, otherwise, E_FAIL It should be noted that if the line is contained in more than one Rep, it will always fail. If the line is contained in a Stripped SurfacicRep, it will fail.
o ResetExtended
public ResetExtended( iGP,
iRep,
iFlags)
Set the currenlty edited CAT3DLineGP with its edition context. Compared to Reset, this methods supports additional flags which can perform operation to ensure that some edition features will be supported. In case of success, if the EditHelper is not empty, the old edition context is notified.
Parameters:
iFace
The CAT3DLineGP instance which will be edited.
iRep
The Rep containing the CAT3DLineGP. Currently supported rep are CATSurfacicRep and CAT3DCustomRep. If the line is not contained in any Rep, this parameter can be NULL
iFlags
Additional flags which will perform operation needed to access some edition features. -ReplaceByDuplicateIfMultiAggreg : If the line is aggregated in more than one Rep, this flag will make a copy of the line and replace the original line in the rep.
Returns:
If the line can be edited in the provided context, S_OK, otherwise, E_FAIL It should be noted that if the line is contained in more than one Rep, it will always fail. If the line is contained in a Stripped SurfacicRep, it will fail.

Data Members


o ReplaceByDuplicateIfMultiAggreg
  public static const unsigned int ReplaceByDuplicateIfMultiAggreg

This object is included in the file: CAT3DLineGPEditHelper.h
If needed, your Imakefile.mk should include the module: CATVisFoundation

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.