/* -*- C++ -*- * Copyright ©2004 Hugo Mills * * This software is distributed under the terms of the GNU GPL v3 * For more information on the GPL, see the file COPYING or * visit http://www.gnu.org/ * * This software is distributed without warranty */ #ifndef XFMAP_POINTPROJECTED_H #define XFMAP_POINTPROJECTED_H #include "magellan/xfmap.h" class XfMap_PointProjected : public XfMap { public: XfMap_PointProjected(double p) : proj(p) { p1 = p+1; pp1 = p*p1; p12 = p1*p1; q = 1-p*p; } virtual ~XfMap_PointProjected() { } virtual bool f(dvec2&, const dvec3&) const; virtual bool g(dvec3&, const dvec2&) const; static XfMap* parser( ConfigLexer* lex, const std::string& type, const std::string& subtype = "" ); private: double proj; double p1, p12, pp1, q; }; #endif