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  

glcylindricalgraph.h

00001 /***************************************************************************
00002                           glcylindricalgraph.h  -  description
00003                              -------------------
00004     begin                : Mon Dec 2 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 GLCYLINDRICALGRAPH_H
00019 #define GLCYLINDRICALGRAPH_H
00020 
00021 #include "glexpressiongraph.h"
00022 
00027 class GLCylindricalGraph : public GLExpressionGraph
00028 {
00029     Q_OBJECT
00030 
00031     public: 
00032         GLCylindricalGraph(QWidget *parent=0, const char *name=0);
00033         ~GLCylindricalGraph();
00034 
00035         virtual void load_key( const char *key, const char *value );
00036 
00037         int setThetaMin(double);
00038         int setThetaMax(double);
00039         int setRadiusMin(double);
00040         int setRadiusMax(double);
00041 
00042         GLfloat getThetaMin() const{return thetaMin;}
00043         GLfloat getThetaMax() const{return thetaMax;}
00044         GLfloat getRadiusMin() const{return radiusMin;}
00045         GLfloat getRadiusMax() const{return radiusMax;}
00046         
00047         virtual inline int getGraphType() const{return GLCYLINDRICALGRAPH;}
00048 
00049     protected:
00050         virtual const char * independent_vars() const{return "r,t";}
00051         virtual const char * dependent_var() const{return "z";}
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())/(radiusMax-radiusMin))+radiusMin;}
00055         inline virtual GLfloat traceDepY(GLfloat y) const{return (y-getYMin())/((getYMax()-getYMin())/(thetaMax-thetaMin))+thetaMin;}
00056 
00057         virtual Cartesian3DCoord2DVector getValues( FungParser &fp, GLfloat *, GLfloat * );
00058 
00059     private:
00060         GLfloat thetaMin,thetaMax,radiusMin,radiusMax;
00061 
00062 };
00063 
00064 #endif