/*
    C++ Mesh Generation Library
    Copyright (c) 2000echet <eric at bechet dot ca>

    This file is part of the C++ Mesh Generation Library.

    See the NOTICE & LICENSE files for conditions.
*/
#ifndef FM_AOMDNODE_H
#define FM_AOMDNODE_H

#include "mVertex.h"
#include <iostream>
using namespace std;
namespace FM
{
  class AOMDElement;

  class AOMDNode
  {
  public:
    AOMDNode ( AOMD::mVertex *v ) :aomdv ( v ) {}
    AOMDNode() :aomdv ( ( AOMD::mVertex* ) 0 ) {}

    virtual void GetPos ( double& x,double &y,double &z ) const
    {
      x=aomdv->point() ( 0 );
      y=aomdv->point() ( 1 );
      z=aomdv->point() ( 2 );
    }

    virtual void Print ( void )
    {
      aomdv->print();
    }

    virtual bool operator < ( const AOMDNode& other ) const
    {
      return ( ( void* ) aomdv < ( void* ) other.aomdv );
    }

    virtual bool operator == ( const AOMDNode& other ) const
    {
      return ( ( void* ) aomdv == ( void* ) other.aomdv );
    }

    AOMD::mVertex* GetVertex ( void ) const
    {
      return aomdv;
    }

    virtual void GetNeighbors ( int dim,vector<AOMDElement> &tab ) const;

  private :
    AOMD::mVertex *aomdv;
  };

}
#endif //FM_AOMDNODE_H
 
