FX::TnFX3DGraph Class Reference
[2D and 3D Graphing]

#include <TnFXGraph.h>

Inheritance diagram for FX::TnFX3DGraph:

FX::TnFXGraph FX::FXGLGroup FX::FXGLObject FX::FXObject List of all members.

Detailed Description

Renders a 3D graph.

The graphs can come in one of two formats: quick and pretty. The quick scales up to 500,000 points on typical 3D hardware without a problem whereas the pretty scales up to 100,000 on typical 3D hardware. As rendering all the points can take too long to allow smooth animation during user manipulation, the graph offers a turbo mode which quarters the number of points being plotted during animation. See FX::FXGLViewer::setTurbo().

Pretty mode can be enabled by specifying the option STYLE_SURFACE|SHADING_SMOOTH on the FX::FXGLVertices underlying the item being rendered. You may also want to set up a specular light as well as a colour generation function.

Definition at line 247 of file TnFXGraph.h.

Public Types

typedef void(*) ExpandFunc (QMemArray< FXVec3f > &out, const QMemArray< FXVec2f > &in)
typedef void(*) ReduceFunc (QMemArray< FXVec3f > &out, const QMemArray< FXVec3f > &in)
 ID_LAST
enum  { ID_LAST }

Public Member Functions

 TnFX3DGraph ()
 TnFX3DGraph (const QMemArray< FXVec2f > *data, ExpandFunc expand=Expand)
 TnFX3DGraph (const QMemArray< FXVec3f > *data, ReduceFunc reduce=ReduceZ)
 ~TnFX3DGraph ()
FXGLVerticessetItemDetails (FXuint item, const FXString &title, const FXGLColor &colour, FXfloat pointsize=4.0f, FXfloat linesize=2.0f)
FXGLVerticessetItemData (FXuint item, const FXVec2f *data, FXuint elements, ExpandFunc expand=Expand)
FXGLVerticessetItemData (FXuint item, const QMemArray< FXVec2f > *data, ExpandFunc expand=Expand)
FXGLVerticessetItemData (FXuint item, const FXVec3f *data, FXuint elements, ReduceFunc reduce=ReduceZ)
FXGLVerticessetItemData (FXuint item, const QMemArray< FXVec3f > *data, ReduceFunc reduce=ReduceZ)
FXGLVerticesitemChanged (FXuint item)
virtual void bounds (FXRangef &box)
virtual void draw (FXGLViewer *viewer)
virtual void hit (FXGLViewer *viewer)
FXGLObjectListgetList ()
virtual FXGLObjectcopy ()
virtual FXGLObjectidentify (FXuint *path)
virtual FXbool canDrag () const
virtual FXbool drag (FXGLViewer *viewer, FXint fx, FXint fy, FXint tx, FXint ty)
FXint no () const
FXGLObjectchild (FXint pos) const
void insert (FXint pos, FXGLObject *obj)
void prepend (FXGLObject *obj)
void append (FXGLObject *obj)
void replace (FXint pos, FXGLObject *obj)
void remove (FXGLObject *obj)
void erase (FXint pos)
void clear ()
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual FXbool canDelete () const
virtual long onDefault (FXObject *, FXSelector, void *)
const FXchargetClassName () const
bool isMemberOf (const FXMetaClass *metaclass) const
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
QTransString tr (const char *text, const char *hint=0)
virtual void * getPythonObject () const
virtual void decouplePythonObject () const

Static Public Member Functions

template<FXint zval>
static void Expand (QMemArray< FXVec3f > &out, const QMemArray< FXVec2f > &in)
static void Expand (QMemArray< FXVec3f > &out, const QMemArray< FXVec2f > &in)
template<int offset, int stepe, int stepm>
static void ReduceE (QMemArray< FXVec3f > &out, const QMemArray< FXVec3f > &in)
template<int yinc, int offset, int step>
static void ReduceE2x (QMemArray< FXVec3f > &out, const QMemArray< FXVec3f > &in)
template<int xinc, int offset, int step>
static void ReduceE2y (QMemArray< FXVec3f > &out, const QMemArray< FXVec3f > &in)
static void ReduceZ (QMemArray< FXVec3f > &out, const QMemArray< FXVec3f > &in)

Protected Attributes

QPtrVector< TnFXGraphItem > * items
FXGLObjectList list


The documentation for this class was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:37:48 2009 for TnFOX by doxygen v1.4.7