#include <GLViewer_Grid.h>
|
| GLViewer_Grid () |
| A default constructor. More...
|
|
| GLViewer_Grid (GLfloat width, GLfloat height, GLfloat winW, GLfloat winH, GLfloat xSize, GLfloat ySize, GLfloat xPan, GLfloat yPan, GLfloat xScale, GLfloat yScale) |
| A constructor. More...
|
|
| ~GLViewer_Grid () |
|
void | draw () |
| Draws grid. More...
|
|
void | setGridColor (GLfloat r, GLfloat g, GLfloat b) |
| Sets color of grid in RGB format. More...
|
|
void | setAxisColor (GLfloat r, GLfloat g, GLfloat b) |
| Sets color of grid axes in RGB format. More...
|
|
void | setGridWidth (float) |
|
void | setCenterRadius (int) |
| Sets Radius of center point( begin coords ) More...
|
|
void | setSize (float xs, float ys) |
| Sets steps along x and y directions. More...
|
|
void | setPan (float xp, float yp) |
| Sets offset along x and y direction. More...
|
|
bool | setZoom (float zoom) |
| Sets common scale factor along x and y direction. More...
|
|
void | setResize (float winW, float winH, float Zoom) |
| Recomputes grid in new size and scale of view. More...
|
|
void | getSize (float &, float &) const |
|
void | getPan (float &, float &) const |
|
void | getScale (float &, float &) const |
|
void | setScaleFactor (int) |
| Sets step of scale. More...
|
|
int | getScaleFactor () |
|
Class GLViewer_Grid 2D rectangular grid for GLViewer Grid is adapt cells for current view
GLViewer_Grid::GLViewer_Grid |
( |
| ) |
|
GLViewer_Grid::GLViewer_Grid |
( |
GLfloat |
width, |
|
|
GLfloat |
height, |
|
|
GLfloat |
winW, |
|
|
GLfloat |
winH, |
|
|
GLfloat |
xSize, |
|
|
GLfloat |
ySize, |
|
|
GLfloat |
xPan, |
|
|
GLfloat |
yPan, |
|
|
GLfloat |
xScale, |
|
|
GLfloat |
yScale |
|
) |
| |
Constructor
- Parameters
-
width | and |
height | - width and height of grid |
winW | and |
winH | - width and height of window |
xSize | and |
ySize | - steps along x and y direction |
xPan | and |
yPan | - offsets along x and y direction |
xScale | and |
yScal | - scale factors along x and y direction |
References myAxisColor, and myGridColor.
GLViewer_Grid::~GLViewer_Grid |
( |
| ) |
|
void GLViewer_Grid::draw |
( |
| ) |
|
void GLViewer_Grid::getPan |
( |
float & |
xPan, |
|
|
float & |
yPan |
|
) |
| const |
- Returns
- panning along x and y axis
- Parameters
-
xPan | - for panning along x axis |
yPan | - for panning along y axis |
References myXPan, and myYPan.
void GLViewer_Grid::getScale |
( |
float & |
xScale, |
|
|
float & |
yScale |
|
) |
| const |
- Returns
- scaling along x and y axis
- Parameters
-
xScale | - for scaling along x axis |
yScale | - for scaling along y axis |
References myXScale, and myYScale.
int GLViewer_Grid::getScaleFactor |
( |
| ) |
|
void GLViewer_Grid::getSize |
( |
float & |
xSize, |
|
|
float & |
ySize |
|
) |
| const |
- Returns
- grid size along x and y axis
- Parameters
-
xSize | - for size along x axis |
ySize | - for size along y axis |
References myXSize, and myYSize.
bool GLViewer_Grid::initList |
( |
| ) |
|
|
protected |
Initialize grid display list
References myAxisColor, myCenterRadius, myCenterWidth, myGridColor, myGridHeight, myGridList, myGridWidth, myIsUpdate, myLineWidth, myScaleFactor, myXPan, myXScale, myXSize, myYPan, myYScale, myYSize, SEGMENTS, and STEP.
void GLViewer_Grid::setAxisColor |
( |
GLfloat |
r, |
|
|
GLfloat |
g, |
|
|
GLfloat |
b |
|
) |
| |
void GLViewer_Grid::setCenterRadius |
( |
int |
r | ) |
|
void GLViewer_Grid::setGridColor |
( |
GLfloat |
r, |
|
|
GLfloat |
g, |
|
|
GLfloat |
b |
|
) |
| |
void GLViewer_Grid::setGridWidth |
( |
float |
w | ) |
|
void GLViewer_Grid::setPan |
( |
float |
xPan, |
|
|
float |
yPan |
|
) |
| |
Sets panning of grid
- Parameters
-
xPan | - panning along X axis |
yPan | - panning along Y axis |
References myIsUpdate, myXPan, and myYPan.
void GLViewer_Grid::setResize |
( |
float |
WinW, |
|
|
float |
WinH, |
|
|
float |
zoom |
|
) |
| |
void GLViewer_Grid::setScaleFactor |
( |
int |
| ) |
|
void GLViewer_Grid::setSize |
( |
float |
xSize, |
|
|
float |
ySize |
|
) |
| |
Sets grid size along X and Y axis
- Parameters
-
xSize | - size along X axis |
ySize | - size along Y axis |
References myIsUpdate, myXSize, and myYSize.
bool GLViewer_Grid::setZoom |
( |
float |
zoom | ) |
|
GLfloat GLViewer_Grid::myAxisColor[3] |
|
protected |
GLint GLViewer_Grid::myCenterRadius |
|
protected |
GLfloat GLViewer_Grid::myCenterWidth |
|
protected |
GLfloat GLViewer_Grid::myGridColor[3] |
|
protected |
GLfloat GLViewer_Grid::myGridHeight |
|
protected |
GLuint GLViewer_Grid::myGridList |
|
protected |
GLfloat GLViewer_Grid::myGridWidth |
|
protected |
GLboolean GLViewer_Grid::myIsUpdate |
|
protected |
GLfloat GLViewer_Grid::myLineWidth |
|
protected |
GLint GLViewer_Grid::myScaleFactor |
|
protected |
GLfloat GLViewer_Grid::myWinH |
|
protected |
GLfloat GLViewer_Grid::myWinW |
|
protected |
GLfloat GLViewer_Grid::myXPan |
|
protected |
GLfloat GLViewer_Grid::myXScale |
|
protected |
GLfloat GLViewer_Grid::myXSize |
|
protected |
GLfloat GLViewer_Grid::myYPan |
|
protected |
GLfloat GLViewer_Grid::myYScale |
|
protected |
GLfloat GLViewer_Grid::myYSize |
|
protected |
The documentation for this class was generated from the following files: