VisualizationFoundation CAT3DLineGP

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


public class CAT3DLineGP

Class to create the graphic primitive of one or several 3D lines.
Role: The first line is drawn between the first two points. Then, the next lines are drawn with the next points according to the line style. Example a CAT3DLineGP defined with 4 points :


         LINES style:               point 1 X--------------------X point 2
                                                   point 3 X-----------------------X point 4


         LINE_STRIP style:          point 1 X--------------------X point 2
                                                                /
                                                               /
                                                              /
                                                     point 3 X----------------------X point 4

         LINE_LOOP style:           point 1 X--------X point 2
                                             \      /
                                              \    /      
                                               \  /
                                                \/
                                                /\
                                               /  \
                                      point 3 X----X point 4
 


Constructor and Destructor Index


o CAT3DLineGP()
Default constructor.
o CAT3DLineGP(float[],int,int,int)
Constructs a 3D line graphic primitive from points coordinates.

Method Index


o Draw(CATRender&)
Draws the 3D lines.
o Get(float**,int*,int*)
o GetReadOnly(float const**,int*,int*)
Retrieves line parameters, such as points coordinates, number of points and line type.

Constructor and Destructor


o CAT3DLineGP
public CAT3DLineGP()
Default constructor.
o CAT3DLineGP
public CAT3DLineGP( const iPoints,
const iNbPoints=2,
const iAlloc=ALLOCATE,
const iLineType= LINES)
Constructs a 3D line graphic primitive from points coordinates.
Parameters:
iPoints
The array of points coordinates: XYZXYZXYZ... Its size is equal to three times the number of points.
iNbPoints
The number of points.
iAlloc
Flag used to specify whether points must be duplicated or not.
Legal values:
ALLOCATE
All data are duplicated into the graphic primitive
DONT_ALLOCATE
The graphic primitive has a pointer to the data given as parameter
The default value is ALLOCATE.
iLineType
Flag to specify the line type to use.
Legal values:
LINES
The number of points must be even. A line will be drawn between points 1 and 2, another 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, another 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.
The default value is LINES.

Methods


o Draw
public virtual Draw( iRender)
Draws the 3D lines.
Parameters:
iRender
The render through wich the 3D line is drawn.
o Get
public Get( oPoints,
oNbPoints,
oLineType)
Deprecated:
R216 see GetReadOnly for read access and CAT3DLineGPEditHelper for write access
o GetReadOnly
public GetReadOnly( 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;

                GetReadOnly(&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.

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

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