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  

GLExpressionGraph Class Reference

Subclass this to create 3D graphs based on expressions. This handles adding expressions, animating the given expressions, and such things. More...

#include <glexpressiongraph.h>

Inheritance diagram for GLExpressionGraph:

Inheritance graph
[legend]
Collaboration diagram for GLExpressionGraph:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< std::vector<
Cartesian3DCoord > > 
Cartesian3DCoord2DVector

Public Slots

void setResolution (int percent)
 Sets the resolution of the graph to the specified percent of possible resolution.

int getResolution () const
void nextExpression ()
 Makes the next expression active.

void prevExpression ()
 Makes the previous expression active.

void setShowCurrentExpression (bool state)
void slotNextFrame ()

Signals

void animationValueChanged (double)

Public Methods

 GLExpressionGraph (QWidget *parent=0, const char *name=0)
 ~GLExpressionGraph ()
virtual void load_key (const char *key, const char *value)
void setAngle (int m)
int getAngle () const
void addExpression (const Expression &)
void removeExpression (unsigned int)
Expression getExpression (unsigned int i) const
int getCurrentExpressionIndex () const
void setCurrentExpressionIndex (int i)
void setDrawConnected (bool b)
bool isDrawConnected () const
void setGrid (bool b)
bool getGridState () const
void setGridColor (const QColor &c)
QColor gridColor () const
bool isTracing () const
void setTrace (bool b)
int expressionCount () const
 Returns the number of expressions the graph is holding.

void setXRes (GLfloat f)
 Sets the resolution in the x direction.

void setYRes (GLfloat f)
 Sets the resolution in the y direction.

GLfloat getXRes () const
GLfloat getYRes () const
void exportToDXF (const char *)

Protected Methods

void paintGL ()
void initializeGL ()
virtual double snapIntervalX () const
virtual double snapIntervalY () const
virtual void nextFrameReady ()
 Classes that implement this class need to implement this function.

virtual const char * independent_vars () const=0
virtual const char * dependent_var () const=0
virtual void trace (GLfloat mouseX, GLfloat mouseY, FungParser &parsed_expression, GLfloat *x, GLfloat *y, GLfloat *z)=0
virtual GLfloat traceDepX (GLfloat x) const
virtual GLfloat traceDepY (GLfloat y) const
void recompileLists ()
void orthoChanged ()
void doColorBlend (GLfloat, const QColor &, GLfloat, GLfloat)
 Blends the given color with black according to the elevation given by the GLfloat.

virtual Cartesian3DCoord2DVector getValues (FungParser &, GLfloat *=0, GLfloat *=0)=0
 This class uses the 2-dimensional vector returned from this function to draw the expression and export it do DXF.

void mouseMoveEvent (QMouseEvent *)
void resizeGL (int w, int h)

Protected Attributes

GLfloat xScale
GLfloat yScale

Detailed Description

Subclass this to create 3D graphs based on expressions. This handles adding expressions, animating the given expressions, and such things.

Author:
Fungmeista

Definition at line 37 of file glexpressiongraph.h.


Member Function Documentation

int GLExpressionGraph::expressionCount   const [inline]
 

Returns the number of expressions the graph is holding.

This includes hidden expressions.

Definition at line 74 of file glexpressiongraph.h.

virtual Cartesian3DCoord2DVector GLExpressionGraph::getValues FungParser  ,
GLfloat *    = 0,
GLfloat *    = 0
[protected, pure virtual]
 

This class uses the 2-dimensional vector returned from this function to draw the expression and export it do DXF.

The 2-dimensional vector of Cartesian3DCoord's should be all of the vertices on the graph.

Implemented in GLCylindricalGraph, GLFunctionGraph, and GLPolarGraph.

void GLExpressionGraph::nextFrameReady   [protected, virtual]
 

Classes that implement this class need to implement this function.

This function is called everytime the next frame is ready and the subclass should implement an animation with it

Implements Animator.

Definition at line 380 of file glexpressiongraph.cpp.

References Animator::animatorValue().

void GLExpressionGraph::setResolution int    percent [slot]
 

Sets the resolution of the graph to the specified percent of possible resolution.

This accepts a double between 0 and 100. If less than or greater than 0 or 100, it sets the resolution to 0 or 100 respectively.

Definition at line 354 of file glexpressiongraph.cpp.

References setXRes(), and setYRes().

void GLExpressionGraph::setXRes GLfloat    f [inline]
 

Sets the resolution in the x direction.

Warning: Any small values for this functions can significantly reduce the speed of the program. Also, values less than 0.05 could cause errors due to lack of system resources, although it depends on your system.

Definition at line 79 of file glexpressiongraph.h.

Referenced by setResolution().

void GLExpressionGraph::setYRes GLfloat    f [inline]
 

Sets the resolution in the y direction.

Warning: Any small values for this functions can significantly reduce the speed of the program. Also, values less than 0.05 could cause errors due to lack of system resources, although it depends on your system.

Definition at line 84 of file glexpressiongraph.h.

Referenced by setResolution().


The documentation for this class was generated from the following files: