#include <GLViewer_BaseDrawers.h>
Public Member Functions | |
GLViewer_MarkerDrawer () | |
~GLViewer_MarkerDrawer () | |
virtual void | create (float, float, bool) |
Redefined method. More... | |
Public Member Functions inherited from GLViewer_Drawer | |
GLViewer_Drawer () | |
A constructor. More... | |
virtual | ~GLViewer_Drawer () |
A destructor. More... | |
virtual void | addObject (GLViewer_Object *theObject) |
Adds object to drawer display list. More... | |
virtual void | clear () |
Clears drawer display list. More... | |
QString | getObjectType () const |
Returns object type (needs for dynamic search of right drawer ) More... | |
int | getPriority () const |
Returns object priority. More... | |
void | setAntialiasing (const bool on) |
The function enables and disables antialiasing in Open GL (for points, lines and polygons). More... | |
virtual bool | translateToHPGL (QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aHPGLCS) |
A function translate object in to HPGL file on disk. More... | |
virtual bool | translateToPS (QFile &hFile, GLViewer_CoordSystem *aViewerCS, GLViewer_CoordSystem *aPSCS) |
A function translate object in to PostScript file on disk. More... | |
void | drawTexture (GLuint texture, GLint size, GLfloat x, GLfloat y) |
Draw square texture. More... | |
void | drawTexture (GLuint texture, GLint x_size, GLint y_size, GLfloat x, GLfloat y) |
Draw texture. More... | |
void | drawTexturePart (GLuint texture, GLfloat x_ratio, GLfloat y_ratio, GLfloat x_size, GLfloat y_size, GLfloat x, GLfloat y, GLfloat scale=0) |
Draw texture part. More... | |
void | drawText (const QString &text, GLfloat xPos, GLfloat yPos, const QColor &color, QFont *aFont, int theSeparator, DisplayTextFormat=DTF_BITMAP) |
Draw text string. More... | |
void | drawGLText (QString text, float x, float y, int hPosition=GLText_Center, int vPosition=GLText_Center, QColor color=Qt::black, bool smallFont=false) |
Draw text string. More... | |
void | setFont (const QFont &font) |
Sets a default font to be used by drawGLText method. More... | |
QFont | font () const |
Returns a default font used by drawGLText method. More... | |
void | setTextFormat (const DisplayTextFormat format) |
Sets a default text displaying format to be used by drawGLText method. More... | |
DisplayTextFormat | textFormat () const |
Returns a default text displaying format used by drawGLText method. More... | |
void | setTextScale (const GLfloat factor) |
Sets a text string displaying scale factor (used only with text format DTF_TEXTURE_SCALABLE) More... | |
GLfloat | textScale () const |
Returns a text string displaying scale factor. More... | |
GLViewer_Rect | textRect (const QString &) const |
Returns a rectangle of text (without viewer scale) More... | |
Private Member Functions | |
void | drawMarker (float &x, float &y, float &radius, QColor &color, GLViewer_AspectLine *aspect) |
Draws marker in point (x,y) of. More... | |
Additional Inherited Members | |
Public Types inherited from GLViewer_Drawer | |
enum | { GLText_Center = 0, GLText_Left, GLText_Right, GLText_Top, GLText_Bottom } |
Text position relatively object. More... | |
Static Public Member Functions inherited from GLViewer_Drawer | |
static void | destroyAllTextures () |
Clears all generated textures. More... | |
static GLuint | loadTexture (const QString &fileName, GLint *x_size=0, GLint *y_size=0, GLint *t_size=0) |
Loads texture from file. More... | |
static void | drawRectangle (GLViewer_Rect *theRect, QColor=Qt::black) |
Draw rectangle with predefined color. More... | |
Protected Member Functions inherited from GLViewer_Drawer | |
virtual void | drawText (GLViewer_Object *theObject) |
Draw object text. More... | |
Static Protected Member Functions inherited from GLViewer_Drawer | |
static void | drawRectangle (GLViewer_Rect *, GLfloat, GLfloat=0, QColor=Qt::black, bool=false, QColor=Qt::white) |
Draw basic primitives: rectangle, contour, polygon, vertex, cross, arrow. More... | |
static void | drawContour (GLViewer_Rect *, QColor, GLfloat, GLushort, bool) |
static void | drawContour (const GLViewer_PntList &, QColor, GLfloat) |
static void | drawPolygon (GLViewer_Rect *, QColor, GLushort, bool) |
static void | drawPolygon (const GLViewer_PntList &, QColor) |
static void | drawVertex (GLfloat, GLfloat, QColor) |
static void | drawCross (GLfloat, GLfloat, QColor) |
static void | drawArrow (const GLfloat red, const GLfloat green, const GLfloat blue, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLboolean=GL_FALSE) |
Protected Attributes inherited from GLViewer_Drawer | |
float | myXScale |
X Scale factor. More... | |
float | myYScale |
Y scale factor. More... | |
QList< GLViewer_Object * > | myObjects |
List of objects. More... | |
GLuint | myTextList |
List generated textures. More... | |
QString | myObjectType |
Type of supporting object. More... | |
int | myPriority |
Dislay priority. More... | |
QFont | myFont |
Default font for drawGLText() method. More... | |
DisplayTextFormat | myTextFormat |
Default text displaying format for drawGLText() method. More... | |
GLfloat | myTextScale |
Scale factor for text string draw, by default 0.125 (used only with text format DTF_TEXTURE_SCALABLE) More... | |
Drawer for GLViewer_MarkerSet
GLViewer_MarkerDrawer::GLViewer_MarkerDrawer | ( | ) |
Default constructor
References cos_table, GLViewer_Drawer::myObjectType, SEGMENTS, sin_table, and STEP.
GLViewer_MarkerDrawer::~GLViewer_MarkerDrawer | ( | ) |
Destructor
|
virtual |
Draws object in GLViewer
xScale | - current scale along X-direction |
yScale | - current scale along Y-direction |
onlyUpdate | - = true if only update highlight-select information |
Implements GLViewer_Drawer.
References drawMarker(), GLViewer_Drawer::drawText(), GLViewer_MarkerSet::exportNumbers(), GLViewer_Object::getAspectLine(), GLViewer_Object::getGLText(), GLViewer_AspectLine::getLineColors(), GLViewer_MarkerSet::getMarkerSize(), GLViewer_MarkerSet::getNumMarkers(), GLViewer_Text::getText(), GLViewer_MarkerSet::getXCoord(), GLViewer_MarkerSet::getYCoord(), GLViewer_Drawer::myObjects, GLViewer_Drawer::myXScale, and GLViewer_Drawer::myYScale.
|
private |
radius | with |
color | and |
aspect |
Draws marker
theXCoord | - X position |
theYCoord | - Y position |
theRadius | - radius |
theColor | - color |
theAspectLine | - line aspect |
References cos_table, GLViewer_AspectLine::getLineType(), GLViewer_AspectLine::getLineWidth(), GLViewer_Drawer::myXScale, GLViewer_Drawer::myYScale, SEGMENTS, and sin_table.