Tulip 6.1.0
Large graphs analysis and drawing
Loading...
Searching...
No Matches
tlp::GlGrid Class Reference

#include <GlGrid.h>

Inheritance diagram for tlp::GlGrid:
Collaboration diagram for tlp::GlGrid:

Public Member Functions

 GlGrid ()
 GlGrid (const Coord &frontTopLeft, const Coord &backBottomRight, const Size &cell, const Color &color, bool displays[3])
void draw (float lod, Camera *camera) override
void getDisplayDim (bool displayDim[3]) const
void getXML (std::string &outString) override
void setDisplayDim (bool displayDim[3])
void setWithXML (const std::string &inString, unsigned int &currentPosition) override
void translate (const Coord &mouvement) override
Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
 ~GlSimpleEntity () override
virtual BoundingBox getBoundingBox ()
int getStencil ()
bool isVisible () const
virtual void setStencil (int stencil)
virtual void setVisible (bool visible)

Protected Attributes

Coord backBottomRight
Size cell
Color color
bool displayDim [3]
Coord frontTopLeft
bool hollowGrid
Protected Attributes inherited from tlp::GlSimpleEntity
BoundingBox boundingBox
std::vector< GlComposite * > parents
int stencil
bool visible

Detailed Description

General class used to render grids as GlSimpleEntity.

Definition at line 35 of file GlGrid.h.

Constructor & Destructor Documentation

◆ GlGrid() [1/2]

tlp::GlGrid::GlGrid ( )
inline

Constructor.

Warning
Don't use this constructor : see other constructor

Definition at line 42 of file GlGrid.h.

◆ GlGrid() [2/2]

tlp::GlGrid::GlGrid ( const Coord & frontTopLeft,
const Coord & backBottomRight,
const Size & cell,
const Color & color,
bool displays[3] )

Constructor.

Parameters
frontTopLeftThe minimum of the bounding box of the grid.
backBottomRightThe maximum of the bounding box of the grid.
cellThe size of a single cell of the grid.
colorThe color of the lines of the grid.
displaysThe dimensions of the grid to display.
hollowGridIndicates if the grid should be hollowed.

Member Function Documentation

◆ draw()

void tlp::GlGrid::draw ( float lod,
Camera * camera )
overridevirtual

Virtual function used to draw the grid.

Implements tlp::GlSimpleEntity.

◆ getDisplayDim()

void tlp::GlGrid::getDisplayDim ( bool displayDim[3]) const

Accessor in reading to the dimensions to display.

◆ getXML()

void tlp::GlGrid::getXML ( std::string & outString)
overridevirtual

Function to export data in outString (in XML format).

Implements tlp::GlSimpleEntity.

◆ setDisplayDim()

void tlp::GlGrid::setDisplayDim ( bool displayDim[3])

Accessor in writing to the dimensions to display.

◆ setWithXML()

void tlp::GlGrid::setWithXML ( const std::string & inString,
unsigned int & currentPosition )
overridevirtual

Function to set data with inString (in XML format).

Implements tlp::GlSimpleEntity.

◆ translate()

void tlp::GlGrid::translate ( const Coord & mouvement)
override

Translate entity.

Member Data Documentation

◆ backBottomRight

Coord tlp::GlGrid::backBottomRight
protected

Back bottom right point of the grid, the "maximum"

Definition at line 89 of file GlGrid.h.

◆ cell

Size tlp::GlGrid::cell
protected

The size of a cell of the grid

Definition at line 91 of file GlGrid.h.

◆ color

Color tlp::GlGrid::color
protected

The color of the grid

Definition at line 90 of file GlGrid.h.

◆ displayDim

bool tlp::GlGrid::displayDim[3]
protected

Which dimensions should be displayed ? Note that only one dimension at most should be disabled

Definition at line 85 of file GlGrid.h.

◆ frontTopLeft

Coord tlp::GlGrid::frontTopLeft
protected

Front top left point of the grid, the "minimum"

Definition at line 88 of file GlGrid.h.

◆ hollowGrid

bool tlp::GlGrid::hollowGrid
protected

Should the grid be hollowed ?

Definition at line 87 of file GlGrid.h.