VisualizationFoundation CAT3DEdgeGPEditHelper

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


public class CAT3DEdgeGPEditHelper

Class to edit CAT3DEdgeGP 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 CAT3DEdgeGPEditHelper()
Constructor.
o ~CAT3DEdgeGPEditHelper()
Destructor.

Method Index


o Get(CAT3DBoundingGP**,CAT3DBoundingGP**,float const**,int**,int*)
Retrieves edge's vertices and faces informations.
o GetEdge()
Return the currently edited CAT3DEdgeGP
o IsEditionPossible(CAT3DEdgeGP*,CATRep*)
Get if the edition of the given graphic primitive is possible, and if not, why.
o Reset(CAT3DEdgeGP*,CATRep*)
Set the currenlty edited CAT3DEdgeGP with its edition context.
o ResetExtended(CAT3DEdgeGP*,CATRep*,unsigned int)
Set the currenlty edited CAT3DEdgeGP with its edition context.

Data Member Index


o ReplaceByDuplicateIfMultiAggreg

Constructor and Destructor


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

Methods


o Get
public Get( oFref1,
oFref2,
oVerticesFref1,
oIndices,
oIndicesSize)
Retrieves edge's vertices and faces informations.
Role: As this method is designed to return values on its parameters, it has to be called like this :
 CAT3DBoundingGP * fref1, *fref2;
 float * verticesFref1;
 ...
 Get(&fref1, &fref2, &verticesFref1, ...);
 

Parameters:
oFref1
Retrieves a pointer to the edge first face.
oFref2
Retrieves a pointer to the edge second face.
oVerticesFref1
Retrieves the first face vertices coordinates array: XYZXYZXYZ... The edge vertices can be retrieved from this array thanks to their indices stored in *oIndices.
oIndices
Retrieves the array of edge vertices indices. These indices allow the the access to vertices coordinates thanks to the *oVerticesFref1 array. For example, to get the edge first vertex coordinates, one must use the *oVerticesFref1 array combined with the *oIndices array, like this : v0.x = (*oVerticesFref1)[(*oIndices)[0]], v0.y = (*oVerticesFref1)[(*oIndices)[0]+1], v0.z = (*oVerticesFref1)[(*oIndices)[0]+2].
oIndicesSize
Retrieves the oIndices array size.
o GetEdge
public GetEdge()
Return the currently edited CAT3DEdgeGP
Returns:
The currently edited CAT3DEdgeGP. If the EditHelper was empty, NULL is returned.
o IsEditionPossible
public static IsEditionPossible( iEdge,
iRep)
Get if the edition of the given graphic primitive is possible, and if not, why.
Parameters:
iEdge
The edge to be edited
iRep
The Rep which should contain the edge
Returns:
A CATGraphicPrimitiveEditHelper::EditAuthorization value, depending of the context.
o Reset
public Reset( iGP,
iRep)
Set the currenlty edited CAT3DEdgeGP with its edition context. In case of success, if the EditHelper is not empty, the old edition context is notified.
Parameters:
iFace
The CAT3DEdgeGP instance which will be edited.
iRep
The Rep containing the CAT3DEdgeGP. Currently supported rep are CATSurfacicRep and CAT3DCustomRep. If the edge is not contained in any Rep, this parameter can be NULL
Returns:
If the edge can be edited in the provided context, S_OK, otherwise, E_FAIL It should be noted that if the edge is contained in more than one Rep, it will always fail. If the edge is contained in a Stripped SurfacicRep, it will fail.
o ResetExtended
public ResetExtended( iGP,
iRep,
iFlags)
Set the currenlty edited CAT3DEdgeGP 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 CAT3DEdgeGP instance which will be edited.
iRep
The Rep containing the CAT3DEdgeGP. Currently supported rep are CATSurfacicRep and CAT3DCustomRep. If the edge 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 edge is aggregated in more than one Rep, this flag will make a copy of the edge and replace the original edge in the rep.
Returns:
If the edge can be edited in the provided context, S_OK, otherwise, E_FAIL If the edge 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: CAT3DEdgeGPEditHelper.h
If needed, your Imakefile.mk should include the module: CATVisFoundation

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