27 #ifndef GLVIEWER_BASEOBJECTS_H
28 #define GLVIEWER_BASEOBJECTS_H
35 #include <TColStd_SequenceOfInteger.hxx>
38 #pragma warning( disable:4251 )
49 GLViewer_MarkerSet(
int number = 1,
float size = 5.0,
const QString& toolTip =
"GLMarker" );
57 virtual GLboolean
highlight( GLfloat x, GLfloat y, GLfloat tol = 15.0, GLboolean isCircle = GL_FALSE );
59 virtual GLboolean
select( GLfloat x, GLfloat y, GLfloat tol,
GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
60 GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
65 virtual void moveObject(
float,
float,
bool fromGroup =
false );
78 void setXCoord( GLfloat* xCoord,
int size );
80 void setYCoord( GLfloat* yCoord,
int size );
87 void setNumMarkers( GLint );
102 bool addOrRemoveSelected(
int index );
104 void addSelected(
const TColStd_SequenceOfInteger& );
106 void setSelected(
const TColStd_SequenceOfInteger& );
129 GLViewer_Polyline(
int number = 1,
float size = 5.0,
const QString& toolTip =
"GLPolyline" );
136 virtual GLboolean
highlight( GLfloat x, GLfloat y, GLfloat tol = 15.0, GLboolean isCircle = GL_FALSE );
138 virtual GLboolean
select( GLfloat x, GLfloat y, GLfloat tol,
GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
139 GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
144 virtual void moveObject(
float,
float,
bool fromGroup =
false );
157 void setXCoord( GLfloat* xCoord,
int size );
159 void setYCoord( GLfloat* yCoord,
int size );
166 void setNumber( GLint );
171 void setClosed( GLboolean closed ) { myIsClosed = closed; }
213 const QColor&
color = QColor( 0, 255, 0 ),
const QString& toolTip =
"GLText" );
221 virtual GLboolean
highlight( GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle = GL_FALSE );
223 virtual GLboolean
select( GLfloat x, GLfloat y, GLfloat tol,
GLViewer_Rect rect, GLboolean isFull = GL_FALSE,
224 GLboolean isCircle = GL_FALSE, GLboolean isShift = GL_FALSE );
229 virtual void moveObject(
float,
float,
bool fromGroup =
false );
253 #pragma warning ( default:4251 )
#define GLVIEWER_API
Macro for exports.
Definition: GLViewer.h:37
Class implementing mathematical model of 2D coordinate system.
Definition: GLViewer_CoordSystem.h:45
Definition: GLViewer_Drawer.h:193
Definition: GLViewer_BaseObjects.h:46
QList< int > myPrevHNumbers
Definition: GLViewer_BaseObjects.h:118
GLfloat myMarkerSize
Definition: GLViewer_BaseObjects.h:112
GLint getNumMarkers() const
returns markers number
Definition: GLViewer_BaseObjects.h:89
TColStd_SequenceOfInteger mySelectedIndexes
Definition: GLViewer_BaseObjects.h:119
QList< int > myUHNumbers
Definition: GLViewer_BaseObjects.h:114
GLfloat * getYCoord() const
Returns y coords.
Definition: GLViewer_BaseObjects.h:84
GLfloat * myXCoord
Definition: GLViewer_BaseObjects.h:110
GLfloat * myYCoord
Definition: GLViewer_BaseObjects.h:111
QList< int > myHNumbers
Definition: GLViewer_BaseObjects.h:113
QList< int > myCurSelNumbers
Definition: GLViewer_BaseObjects.h:116
void setMarkerSize(const float size)
Sets merker radius.
Definition: GLViewer_BaseObjects.h:91
QList< int > mySelNumbers
Definition: GLViewer_BaseObjects.h:115
float getMarkerSize() const
Returns merker radius.
Definition: GLViewer_BaseObjects.h:93
QList< int > getSelectedElements()
Returns selected numbers.
Definition: GLViewer_BaseObjects.h:100
GLint myNumber
Definition: GLViewer_BaseObjects.h:109
GLfloat * getXCoord() const
Returns x coords.
Definition: GLViewer_BaseObjects.h:82
QList< int > myUSelNumbers
Definition: GLViewer_BaseObjects.h:117
Definition: GLViewer_Object.h:65
virtual QByteArray getByteCopy()
A function for coding object to the byte copy.
Definition: GLViewer_Object.cxx:140
virtual bool translateToHPGL(QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aHPGLCS)=0
A function translate object in to HPGL file on disk.
virtual void setSelected(GLboolean state)
Installs select status to object.
Definition: GLViewer_Object.h:158
virtual GLboolean unselect()=0
Clears all select information.
virtual bool translateToPS(QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aPSCS)=0
A function translate object in to PostScript file on disk.
virtual GLboolean unhighlight()=0
Clears all highlight information.
virtual GLboolean select(GLfloat x, GLfloat y, GLfloat tol, GLViewer_Rect rect, GLboolean isFull=GL_FALSE, GLboolean isCircle=GL_FALSE, GLboolean isShift=GL_FALSE)=0
Computes select presentation.
virtual GLboolean highlight(GLfloat x, GLfloat y, GLfloat tol, GLboolean isCircle=GL_FALSE)=0
Computes highlight presentation.
virtual GLViewer_Rect * getUpdateRect()=0
Returns update object rectangle.
virtual void setDrawer(GLViewer_Drawer *theDrawer)
Installing already exist drawer with same type.
Definition: GLViewer_Object.h:78
virtual bool initializeFromByteCopy(QByteArray)
A function for decoding object from the byte copy.
Definition: GLViewer_Object.cxx:212
virtual GLViewer_Drawer * createDrawer()=0
Creates correspond drawer.
virtual void moveObject(float dx, float dy, bool fromGroup=false)=0
Moves object per by recomputing.
virtual void compute()=0
Main method. Computes all needed information about object for presentation in drawer.
Definition: GLViewer_BaseObjects.h:127
QList< int > mySelNumbers
Definition: GLViewer_BaseObjects.h:196
void setHighSelAll(GLboolean highSelAll)
On/off highlight as whole object status.
Definition: GLViewer_BaseObjects.h:176
GLfloat * getXCoord() const
Returns x coords.
Definition: GLViewer_BaseObjects.h:161
QList< int > myUSelNumbers
Definition: GLViewer_BaseObjects.h:197
GLint myNumber
Definition: GLViewer_BaseObjects.h:190
GLboolean isClosed() const
Checks closed status of polyline.
Definition: GLViewer_BaseObjects.h:173
GLboolean myHighSelAll
Definition: GLViewer_BaseObjects.h:192
QList< int > getSelectedElements()
Returns numbers of selected lines.
Definition: GLViewer_BaseObjects.h:185
QList< int > myUHNumbers
Definition: GLViewer_BaseObjects.h:195
GLfloat * myYCoord
Definition: GLViewer_BaseObjects.h:189
GLfloat * myXCoord
Definition: GLViewer_BaseObjects.h:188
QList< int > myPrevHNumbers
Definition: GLViewer_BaseObjects.h:199
GLboolean myHighFlag
Definition: GLViewer_BaseObjects.h:202
QList< int > myCurSelNumbers
Definition: GLViewer_BaseObjects.h:198
GLboolean myIsClosed
Definition: GLViewer_BaseObjects.h:191
GLfloat * getYCoord() const
Returns y coords.
Definition: GLViewer_BaseObjects.h:163
void setClosed(GLboolean closed)
On/off closed status of polyline.
Definition: GLViewer_BaseObjects.h:171
TColStd_SequenceOfInteger mySelectedIndexes
Definition: GLViewer_BaseObjects.h:200
QList< int > myHNumbers
Definition: GLViewer_BaseObjects.h:194
GLboolean isHighSelAll() const
Checks highlight as whole object status.
Definition: GLViewer_BaseObjects.h:178
GLint getNumber() const
Returns number of points.
Definition: GLViewer_BaseObjects.h:168
Definition: GLViewer_Geom.h:69
Definition: GLViewer_BaseObjects.h:210
int getHeight()
Definition: GLViewer_BaseObjects.h:242
int myWidth
Definition: GLViewer_BaseObjects.h:248
int myHeight
Definition: GLViewer_BaseObjects.h:249
void setWidth(int w)
Definition: GLViewer_BaseObjects.h:243
int getWidth()
Definition: GLViewer_BaseObjects.h:241
void setHeight(int h)
Definition: GLViewer_BaseObjects.h:244
bool myHighFlag
Definition: GLViewer_BaseObjects.h:247
Quantity_Color color(const QColor &)
Convert QColor object to Quantity_Color object.
Definition: OCCViewer.cxx:28