Back to index

salome-smesh  6.5.0
Classes | Functions
SMDS_LinearEdge.cxx File Reference
#include "SMDS_LinearEdge.hxx"
#include "SMDS_IteratorOfElements.hxx"
#include "SMDS_MeshNode.hxx"
#include "utilities.h"

Go to the source code of this file.

Classes

class  SMDS_LinearEdge_MyNodeIterator

Functions

bool operator< (const SMDS_LinearEdge &e1, const SMDS_LinearEdge &e2)

Function Documentation

bool operator< ( const SMDS_LinearEdge &  e1,
const SMDS_LinearEdge &  e2 
)

Definition at line 112 of file SMDS_LinearEdge.cxx.

{
  int id11 = e1.myNodes[0]->getVtkId();
  int id21 = e2.myNodes[0]->getVtkId();
  int id12 = e1.myNodes[1]->getVtkId();
  int id22 = e2.myNodes[1]->getVtkId();
  int tmp;

  if (id11 >= id12)
    {
      tmp = id11;
      id11 = id12;
      id12 = tmp;
    }
  if (id21 >= id22)
    {
      tmp = id21;
      id21 = id22;
      id22 = tmp;
    }

  if (id11 < id21)
    return true;
  else if (id11 == id21)
    return (id21 < id22);
  else
    return false;
}