VisualizationFoundation CAT3DCylinderGPEditHelper
Usage: you must use this class as is. You should never derive it.
public class CAT3DCylinderGPEditHelper
Class to edit CAT3DCylinderGP 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
CAT3DCylinderGPEditHelper()
- Constructor.
- o
~CAT3DCylinderGPEditHelper()
- Destructor.
Method Index
- o
GetCylinder()
- Return the currently edited CAT3DCylinderGP
- o
GetTextureCoordinates(float**,int*)
- Retrieves the texture coordinates.
- o
IsEditionPossible(CAT3DCylinderGP*,CATRep*)
- Get if the edition of the given graphic primitive is possible, and if not, why.
- o
Reset(CAT3DCylinderGP*,CATRep*)
- Change the EditHelper's data from a new primitive with its edition context
In case of success, if the EditHelper is not empty, the old edition context is notified.
- o
SetTextureCoordinates(float const*,unsigned int)
- Sets the texture coordinates.
Constructor and Destructor
o CAT3DCylinderGPEditHelper
public CAT3DCylinderGPEditHelper( | ) |
-
Constructor.
o ~CAT3DCylinderGPEditHelper
public ~CAT3DCylinderGPEditHelper( | ) |
-
Destructor.
If the EditHelper is not empty, the edition context is notified.
Methods
o GetCylinder
-
Return the currently edited CAT3DCylinderGP
- Returns:
- The currently edited CAT3DCylinderGP
If the EditHelper was empty, NULL is returned.
o GetTextureCoordinates
public GetTextureCoordinates( | | oTextureCoord, |
| | oDimension) |
-
Retrieves the texture coordinates.
This method must be used like this:
float * textureCoord;
GetTextureCoord(&textureCoord);
- Parameters:
-
- oTextureCoord
- Retrieves the array of texture coordinates.
Each vertex has an associated position
in the texture map. The number of texture coordinates groups is always equal to the number of
vertices.
- oDimension
- Retrieve the number of coordinates per vertex.
o IsEditionPossible
public static IsEditionPossible( | | iCyl, |
| | iRep) |
-
Get if the edition of the given graphic primitive is possible, and if not, why.
- Parameters:
-
- iCyl
- The cylinder to be edited
- iRep
- The Rep which should contain the cylinder
- Returns:
- A CATGraphicPrimitiveEditHelper::EditAuthorization value, depending of the context.
o Reset
public Reset( | | iCyl, |
| | iRep) |
-
Change the EditHelper's data from a new primitive with its edition context
In case of success, if the EditHelper is not empty, the old edition context is notified.
- Parameters:
-
- iPipe
- The CAT3DCylinderGP instance to be edited.
If the cylinder is not contained in any Rep, this parameter can be NULL
- iRep
- Rep containing the Cylinder. Only CAT3DCustomRep are supported at the moment.
- Returns:
- If the cylinder can be edited in the provided context, S_OK, otherwise, E_FAIL
It should be noted that if the cylinder is contained in more than one Rep, it will always fail.
o SetTextureCoordinates
public SetTextureCoordinates( | | iTC, |
| | iDim) |
-
Sets the texture coordinates.
- Parameters:
-
- iTextureCoord
- Array of texture coordinates. Each vertex has an associated position
in the texture map. The number of texture coordinates groups is always equal to the number of
vertices.
- iTextureFormat
- iTextureFormat is the number of fields associated to one vertex in the iTextureCoord array.
It is also the number of texture coordinates associated to each vertex.
Indeed, each vertex has associated coordinates in the texture map. The
number of coordinates depends on the map dimension: the texture map
may be in 1D, 2D or 3D.
Legal values:
- 1
- The texture map is a one dimension map. Each vertex has a single associated texture coordinate
- 2
- The texture map is a two-dimension map. Each vertex has two associated texture coordinates
- 3
- The texture map is a three-dimension map. Each vertex has three associated texture coordinates
This object is included in the file: CAT3DCylinderGPEditHelper.h
If needed, your Imakefile.mk should include the module: CATVisFoundation
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.