Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Sources   Namespace Members   Compound Members   File Members  

bearing_constraint.h

This is the verbatim text of the bearing_constraint.h include file.
//$Header: /home/ben/Mapper/include/RCS/bearing_constraint.h,v 6.4 2002/07/02 19:45:15 ben Exp $
#ifndef BEARING_CONSTRAINT_H
#define BEARING_CONSTRAINT_H
// Copyright Benedict Adamson 2002.
// This file is part of Mapper.

// Mapper is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.

// Mapper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Mapper; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

#include "assoc.h"
#include "constraint.h"



class bearing_constraint
   :public constraint
{
   public: //Constructors and destructors.

      bearing_constraint(
         const double u,
         const double b
         );

      virtual ~bearing_constraint(void);

   public: // Attributes

      virtual void energy(
         const double tol,
         const vector< vector2 > &p,
         double &e, // output
         vector< vector2 > &dedp // output
         ) const;

      inline double wanted_bearing(void) const;

   public: // Messages

      void wanted_bearing(
         const double b
         );

   private: // State

      double wanted_bearing_;

      friend void assoc(
         bearing_constraint &c,
         vector2 &p0,
         vector2 &p1
         );

      friend void unassoc(
         bearing_constraint &c
         );

};



inline double bearing_constraint::wanted_bearing(void) const
{
   // The expected separation of the two constrained points.
   return this->wanted_bearing_;
}


      
#endif

Generated at Sun Jul 14 20:38:16 2002 for Mapper by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999