76 if (TYElement::operator!=(other))
80 if (TYColorInterface::operator!=(other))
121 for (
unsigned int i = 0; i < pOtherCrbNiv->
_listPoints.size(); i++)
133 return "TYCourbeNiveau";
152 for (
unsigned int i = 0; i <
_listPoints.size(); i++)
169 bool altitudeOk =
false;
170 bool closedOk =
false;
171 bool nbPointsOk =
false;
172 bool distMaxOk =
false;
183 QDomNodeList childs = domElement.childNodes();
184 for (
unsigned int i = 0; i < childs.length(); i++)
186 elemCur = childs.item(i).toElement();
236 assert(pSite !=
nullptr &&
"The parent of a TYTopographie element must be a TYSiteNode");
275 for (
unsigned int i = 0; i <
_listPoints.size(); i++)
285 double valeur = 200.0;
325 float r = 255.0f, g = 0.0f, b = 0.0f;
348 double distance = 1.E9, dist_tmp = 0.0;
349 TYTabPoint::iterator iterRet =
_listPoints.begin();
352 dist_tmp = (*iter).distFrom(pt);
353 if (dist_tmp < distance)
385 if (iterP == iterLast)
395 TYTabPoint::iterator iter = iterP;
412 pCurve.
_pObj =
nullptr;
416 pCurve.
_pObj =
nullptr;
432 for (TYTabPoint::iterator it = itPt; it !=
_listPoints.end(); it++)
434 tab.push_back((*it));
439 for (TYTabPoint::iterator it = ++
_listPoints.begin(); it != itPt; it++)
441 tab.push_back((*it));
449 for (
unsigned int i = 0; i <
_listPoints.size(); i++)
Representation graphique d'une courbe de niveau (fichier header)
TY_EXTENSION_INST(TYCourbeNiveau)
TY_EXT_GRAPHIC_INST(TYCourbeNiveau)
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
#define TYDIRPREFERENCEMANAGER
virtual const char * getClassName() const
static OPrototype * safeDownCast(OPrototype *pObject)
T * _pObj
The real pointer, must derived IRefCount.
int fromXML(DOM_Element domElement)
TYColorInterface & operator=(const TYColorInterface &other)
virtual void setColor(const OColor &color)
void deepCopy(const TYColorInterface *pOther, bool copyId=true, bool pUseCopyTag=false)
DOM_Element toXML(DOM_Element &domElement)
bool operator!=(const TYCourbeNiveau &other) const
Operateur !=.
LPTYCourbeNiveau split(const TYPoint &pt)
return a new level curve by spliting the actual one at indicated point
virtual ~TYCourbeNiveau()
virtual int fromXML(DOM_Element domElement)
virtual DOM_Element toXML(DOM_Element &domElement)
TYCourbeNiveau & operator=(const TYCourbeNiveau &other)
Operateur =.
double _altitude
Altitude.
void setListPoints(const TYTabPoint &pts)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
TYTabPoint _listPoints
Liste de points.
void restructure(TYTabPoint::iterator itPt)
virtual void updateColor()
void addPoint(const TYPoint &pt)
virtual std::string toString() const
static double _defaultDistMax
TYTabPoint::iterator getPointRef(const TYPoint &pt)
return an iterator to the curve point closest to the point passed
virtual void setIsGeometryModified(bool isModified)
TYTabPoint & getListPoints()
bool operator==(const TYCourbeNiveau &other) const
Operateur ==.
static double setDefaultDistMax()
void setAltitude(double alt)
void applyAlitudeToPoints()
void setIsDMaxDefault(const bool &etat)
TYElement * getParent() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual DOM_Element toXML(DOM_Element &domElement)
QString _name
Nom courant de l'element.
TYElement & operator=(const TYElement &other)
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
static bool testId(const TYUUID &id, const TYElement *pElem)
const TYUUID & getID() const
TYElement * _pParent
Reference sur l'element parent.
void setParent(TYElement *pParent)
virtual int fromXML(DOM_Element domElement)
virtual void setIsGeometryModified(bool isModified)
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
LPTYAltimetrie getAltimetry() const