Version: 6.3.1
Public Member Functions | Private Attributes

GLViewer_LineList Class Reference

#include <GLViewer_Tools.h>

Public Member Functions

 GLViewer_LineList (int)
virtual ~GLViewer_LineList ()
int count () const
 Returns number of segments.
int size () const
 Returns real size.
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.
void setMainCoord (double theVal)
 Sets level of segments.
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

int GLViewer_LineList.count ( ) const

References mySegmentNumber.

int GLViewer_LineList.size ( ) const

References myRealSize.

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

Adds new line segment to list

Parameters:
coord1,coord2- co-ordinates of points

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

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 test_big_table.k, myArray, myRealSize, mySegmentNumber, and readSegment().

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.

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

References myArray, and mySegmentNumber.

void GLViewer_LineList.setMainCoord ( double  theVal)

References myMainCoord.

double GLViewer_LineList.mainCoord ( ) const

References myMainCoord.

void GLViewer_LineList::clear ( )

Clears line list

References myArray, and myRealSize.

void GLViewer_LineList::print ( )

Prints debug info about line list

References myArray, myMainCoord, myRealSize, and mySegmentNumber.

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.

GLViewer_LineList& GLViewer_LineList.operator= ( GLViewer_LineList  )

Field Documentation

double* GLViewer_LineList.myArray [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS