namespace CurveCreator
{
//! Points coordinates
- typedef float TypeCoord;
+ typedef double TypeCoord;
/** List of coordinates in format depends on section dimension:
* 2D: [x1, y1, x2, y2, x3, y3, ..]
#ifndef _CurveCreator_ICurve_HeaderFile
#define _CurveCreator_ICurve_HeaderFile
+#include "CurveCreator.hxx"
#include "CurveCreator_Macro.hxx"
#include <TColgp_HArray1OfPnt.hxx>
typedef std::pair<int,int> SectionToPoint;
typedef std::deque<SectionToPoint> SectionToPointList;
- typedef std::deque< std::pair< SectionToPoint,std::deque< float > > > SectionToPointCoordsList;
+ typedef std::deque< std::pair< SectionToPoint, CurveCreator::Coordinates > > SectionToPointCoordsList;
public:
/***********************************************/
* Insert one or several points to the specified section starting from the given theIPnt index
* (or add these at the end of section points if \a theIPnt is -1).
*/
- virtual bool addPoints( const std::deque<float>& theCoords,
+ virtual bool addPoints( const CurveCreator::Coordinates& theCoords,
const int theISection,
const int theIPnt = -1 ) = 0;
//! Set coordinates of specified point
virtual bool setPoint( const int theISection,
const int theIPnt,
- const std::deque<float>& theNewCoords ) = 0;
+ const CurveCreator::Coordinates& theNewCoords ) = 0;
//! Set coordinates of specified points from different sections
virtual bool setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords,
virtual bool removeSeveralPoints( const SectionToPointList &theSectionToPntIDs) = 0;
//! Get coordinates of specified point
- virtual std::deque<float> getPoint( const int theISection,
+ virtual CurveCreator::Coordinates getPoint( const int theISection,
const int theIPnt ) const = 0;
/**
* Get points of a section (the total points in Curve if theISection is equal to -1)..
*/
- virtual std::deque<float> getPoints( const int theISection = -1 ) const = 0;
+ virtual CurveCreator::Coordinates getPoints( const int theISection = -1 ) const = 0;
/**
* Get number of points in specified section or (the total number of points
if ( myDragStarted ) {
bool isDragged = myDragged;
CurveCreator_ICurve::SectionToPointList aDraggedPoints;
- QMap<CurveCreator_ICurve::SectionToPoint, std::deque< float > > anInitialDragPointsCoords;
+ QMap<CurveCreator_ICurve::SectionToPoint, CurveCreator::Coordinates > anInitialDragPointsCoords;
if ( myDragged ) {
aDraggedPoints = myDragPoints;
anInitialDragPointsCoords = myInitialDragPointsCoords;
for ( ; anIt != aLast; anIt++ ) {
int aSectionId = anIt->first;
int aPointId = anIt->second;
- std::deque<float> aPos = myCurve->getPoint( aSectionId, aPointId );
+ CurveCreator::Coordinates aPos = myCurve->getPoint( aSectionId, aPointId );
aCoordList.push_back(
std::make_pair( std::make_pair( aSectionId, aPointId ), aPos ) );
double aX = myLocalPointView->item( theRow, 2 )->data( Qt::UserRole ).toDouble();
double anY = myLocalPointView->item( theRow, 3 )->data( Qt::UserRole ).toDouble();
- std::deque<float> aChangedPos;
+ CurveCreator::Coordinates aChangedPos;
aChangedPos.push_back( aX );
aChangedPos.push_back( anY );
myCurve->setPoint( aCurrSect, aPntIndex, aChangedPos );
double anYDelta = aStartPnt.Y() - anEndPnt.Y();
CurveCreator_ICurve::SectionToPointCoordsList aCoordList;
- std::deque<float> aChangedPos;
+ CurveCreator::Coordinates aChangedPos;
CurveCreator_ICurve::SectionToPointList::const_iterator anIt = myDragPoints.begin(),
aLast = myDragPoints.end();
for ( ; anIt != aLast; anIt++ ) {