Home

Download

Features

Screenshots

Handbook

Browse Source

Authors

SourceForge.net Logo
Hosted by SourceForge.net

OSI Certified


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Search  

glpolargraph.h

00001 /***************************************************************************
00002                           glpolargraph.h  -  description
00003                              -------------------
00004     begin                : Fri Oct 18 2002
00005     copyright            : (C) 2002 by Fungmeista
00006     email                : mizunoami44@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef GLPOLARGRAPH_H
00019 #define GLPOLARGRAPH_H
00020 
00021 #include "glexpressiongraph.h"
00022 
00027 class GLPolarGraph : public GLExpressionGraph
00028 {
00029     Q_OBJECT
00030 
00031     public:
00032         GLPolarGraph(QWidget *parent=0, const char *name=0);
00033         ~GLPolarGraph();
00034 
00035         virtual void load_key( const char *key, const char *value );
00036 
00037         int setPolarMin(GLfloat);
00038         int setPolarMax(GLfloat);
00039         int setAzimuthalMin(GLfloat);
00040         int setAzimuthalMax(GLfloat);
00041 
00042         GLfloat getPolarMin() const{return tMin;}
00043         GLfloat getPolarMax() const{return tMax;}
00044         GLfloat getAzimuthalMin() const{return aMin;}
00045         GLfloat getAzimuthalMax() const{return aMax;}
00046         
00047         virtual inline int getGraphType() const{return GLPOLARGRAPH;}
00048 
00049     protected:
00050         virtual const char * independent_vars() const{return "a,p";}
00051         virtual const char * dependent_var() const{return "r";}
00052         void trace(GLfloat mouseX, GLfloat mouseY, FungParser &parsed_function, GLfloat *x, GLfloat *y, GLfloat *z);
00053 
00054         inline virtual GLfloat traceDepX(GLfloat x) const{return (x-getXMin())/((getXMax()-getXMin())/(aMax-aMin))+aMin;}
00055         inline virtual GLfloat traceDepY(GLfloat y) const{return (y-getYMin())/((getYMax()-getYMin())/(tMax-tMin))+tMin;}
00056 
00057         virtual Cartesian3DCoord2DVector getValues( FungParser &fp, GLfloat *, GLfloat * );
00058 
00059     private:
00060         GLfloat tMin,tMax,aMin,aMax;
00061 
00062 };
00063 
00064 #endif
00065