VisualizationFoundation CAT2DLineGP

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


public class CAT2DLineGP

Class to create the graphic primitive of a 2D line.


Constructor and Destructor Index


o CAT2DLineGP()
Default constructor.
o CAT2DLineGP(float[],int,int,int)
Constructs a 2D line graphic primitives from point coordinates.
o CAT2DLineGP(CATMathPoint2Df[],int,int,int)
Constructs a 2D line graphic primitives from points.

Method Index


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

Constructor and Destructor


o CAT2DLineGP
public CAT2DLineGP()
Default constructor.
o CAT2DLineGP
public CAT2DLineGP( const iPoints,
const iNbPoints=2,
const iAlloc=ALLOCATE,
const iLinetype= LINES)
Constructs a 2D line graphic primitives from point coordinates.
Parameters:
iPoints
Array of point coordinates: XYXYXY... Its size is equal to two 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 duplicate 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, ...
                           point 1 X--------------------X point 2
                                                       point 3 X-----------------------X point 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, ...
                           point 1 X--------------------X point 2
                                                       /
                                                     /
                                                   /
                                          point 3 X----------------------X point 4
    			
  • LINE_LOOP : Same as LINE_LOOP, excepted that one more line will be drawn between the last and the first points.
                                        point 1 X--------X point 2
                                                 \      /
                                                  \    /      
                                                   \  /
                                                    \/
                                                    /\
                                                   /  \
                                          point 3 X----X point 4
    			
The default value is LINES.
o CAT2DLineGP
public CAT2DLineGP( const iPoints,
const nbPoints=2,
const alloc=ALLOCATE,
const iLinetype= LINES)
Constructs a 2D line graphic primitives from points.
Parameters:
iPoints
Array of 2D points. Its size is equal to 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 duplicate 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, ...
                           point 1 X--------------------X point 2
                                                       point 3 X-----------------------X point 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, ...
                           point 1 X--------------------X point 2
                                                       /
                                                     /
                                                   /
                                          point 3 X----------------------X point 4
    			
  • LINE_LOOP : Same as LINE_LOOP, excepted that one more line will be drawn between the last and the first points.
                                        point 1 X--------X point 2
                                                 \      /
                                                  \    /      
                                                   \  /
                                                    \/
                                                    /\
                                                   /  \
                                          point 3 X----X point 4
    			
The default value is LINES.

Methods


o Draw
public virtual Draw( iRender)
Draws the 2D line.
Parameters:
iRender
The render through which the 2D line is drawn.
o Get
public Get( oPoints,
oNbPoint,
oLineType)
Retrieves line parameters, such as points coordinates, number of points and line type. Role: To retrieve line parameters. This method must be called like this :
                float * 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, another line will be drawn between points 3 and 4, ...
                           point 1 X--------------------X point 2
                                                       point 3 X-----------------------X point 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, ...
                           point 1 X--------------------X point 2
                                                       /
                                                     /
                                                   /
                                          point 3 X----------------------X point 4
    			
  • LINE_LOOP : Same as LINE_LOOP, excepted that one more line will be drawn between the last and the first points.
                                        point 1 X--------X point 2
                                                 \      /
                                                  \    /      
                                                   \  /
                                                    \/
                                                    /\
                                                   /  \
                                          point 3 X----X point 4
    			

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

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