Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GLViewer_LineList Class Reference

#include <GLViewer_Tools.h>

Public Member Functions

 GLViewer_LineList (int)
 
virtual ~GLViewer_LineList ()
 
int count () const
 Returns number of segments. More...
 
int size () const
 Returns real size. More...
 
bool addSegment (double coord1, double coord2)
 
bool removeSegment (int index)
 
bool removeSegment (double coord1, double coord2)
 
bool readSegment (int index, double &coord1, double &coord2)
 
int contains (double thePoint) const
 Returns index of segment, else -1. More...
 
void setMainCoord (double theVal)
 Sets level of segments. More...
 
double mainCoord () const
 
void clear ()
 
void print ()
 
void show (FieldDim)
 
GLViewer_LineListoperator= (GLViewer_LineList)
 

Private Attributes

double * myArray
 
int myRealSize
 
int mySegmentNumber
 
double myMainCoord
 

Detailed Description

Tools for distinct line This class implmented interface for segment operations: add, cut, remove and etc. Memory does not changed and allocated only one time

Constructor & Destructor Documentation

GLViewer_LineList::GLViewer_LineList ( int  size)

Constructor

Parameters
size- size of internal array

References myArray, myMainCoord, myRealSize, mySegmentNumber, and size().

GLViewer_LineList::~GLViewer_LineList ( )
virtual

Destructor

References myArray.

Member Function Documentation

bool GLViewer_LineList::addSegment ( double  coord1,
double  coord2 
)

Adds new line segment to list

Parameters
coord1,coord2- co-ordinates of points

References myArray, myRealSize, mySegmentNumber, and readSegment().

void GLViewer_LineList::clear ( )

Clears line list

References myArray, and myRealSize.

int GLViewer_LineList::contains ( double  thePoint) const
Returns
true if line list covers point
Parameters
thePoint- point co-ordinate

References myArray, and mySegmentNumber.

int GLViewer_LineList::count ( ) const
inline

References mySegmentNumber.

double GLViewer_LineList::mainCoord ( ) const
inline

References myMainCoord.

GLViewer_LineList& GLViewer_LineList::operator= ( GLViewer_LineList  )
void GLViewer_LineList::print ( )

Prints debug info about line list

References myArray, myMainCoord, myRealSize, and mySegmentNumber.

bool GLViewer_LineList::readSegment ( int  theIndex,
double &  coord1,
double &  coord2 
)

Gets info about segment

Parameters
theIndex- index of segment
coord1,coord2- co-ordinates of points

References myArray, and mySegmentNumber.

bool GLViewer_LineList::removeSegment ( int  theIndex)

Removes segment

Parameters
theIndex- segment index

References myArray, and mySegmentNumber.

bool GLViewer_LineList::removeSegment ( double  coord1,
double  coord2 
)

Removes segment from line list

Parameters
coord1,coord2- co-ordinates of points

References myArray, myRealSize, mySegmentNumber, and readSegment().

void GLViewer_LineList::setMainCoord ( double  theVal)
inline

References myMainCoord.

void GLViewer_LineList::show ( FieldDim  theDim)

Draws line list with help of OpenGL

Parameters
theDim- dimension

References FD_X, FD_Y, myArray, myMainCoord, and mySegmentNumber.

int GLViewer_LineList::size ( ) const
inline

References myRealSize.

Member Data Documentation

double* GLViewer_LineList::myArray
private
double GLViewer_LineList::myMainCoord
private
int GLViewer_LineList::myRealSize
private
int GLViewer_LineList::mySegmentNumber
private

The documentation for this class was generated from the following files: