Public Member Functions | Protected Attributes

MeshLib::CEdgeKey Class Reference

CEdgeKey class, which is used for sorting edges. More...

#include <Edge.h>

Collaboration diagram for MeshLib::CEdgeKey:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CEdgeKey (int id1, int id2)
bool operator< (const CEdgeKey &key) const
bool operator== (const CEdgeKey &key) const
 ~CEdgeKey ()

Protected Attributes

int m_id [2]

Detailed Description

CEdgeKey class, which is used for sorting edges.

Definition at line 82 of file Edge.h.


Constructor & Destructor Documentation

MeshLib::CEdgeKey::CEdgeKey ( int  id1,
int  id2 
) [inline]

CEdgeKey constructor

Parameters:
id1 source vertex id
id2 target vertex id

Definition at line 90 of file Edge.h.

        {
                assert( id1 != id2 );
                m_id[0] = (id1 < id2)?id1:id2;
                m_id[1] = (id1 < id2)?id2:id1;
        };

MeshLib::CEdgeKey::~CEdgeKey (  )  [inline]

CEdgeKey destructor

Definition at line 123 of file Edge.h.

{};


Member Function Documentation

bool MeshLib::CEdgeKey::operator< ( const CEdgeKey key  )  const [inline]

Comparision

Parameters:
key another CEdgeKey object

Definition at line 100 of file Edge.h.

        {       
                if( m_id[0] < key.m_id[0] ) return true;
                if( m_id[0] > key.m_id[0] ) return false;
                if( m_id[1] < key.m_id[1] ) return true;
                if( m_id[1] > key.m_id[1] ) return false;
                return false;
        };

bool MeshLib::CEdgeKey::operator== ( const CEdgeKey key  )  const [inline]

Comparision

Parameters:
key another CEdgeKey object

Definition at line 113 of file Edge.h.

        {
                if( m_id[0] != key.m_id[0] ) return false;
                if( m_id[1] != key.m_id[1] ) return false;
                return true;
        }


Member Data Documentation

int MeshLib::CEdgeKey::m_id[2] [protected]

Two vertex ids.

Definition at line 123 of file Edge.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Defines