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

#include <TnFXGraph.h>

Inheritance diagram for FX::TnFX2DGraph:

Inheritance graph
[legend]

List of all members.


Detailed Description

Renders a 2D graph.

In addition to the standard facilities offered by FX::TnFXGraph, TnFX2DGraph also provides optional axes and major indicators with labels.

Public Types

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

Public Member Functions

 TnFX2DGraph ()
 TnFX2DGraph (const QMemArray< FXVec2f > *data, ExpandFunc expand=Expand)
 TnFX2DGraph (const QMemArray< FXVec3f > *data, ReduceFunc reduce=ReduceZ)
FXGLVerticessetAxes (const FXVec4f &range=FXVec4f(Generic::BiggestValue< float >::value, Generic::BiggestValue< float >::value, Generic::BiggestValue< float >::value, Generic::BiggestValue< float >::value), FXfloat lineSize=4.0f)
FXGLVerticessetAxesMajor (FXfloat granx=0, FXfloat grany=0, FXfloat lineSize=2.0f, const FXFont *font=FXApp::instance()->getNormalFont())
virtual void bounds (FXRangef &box)
virtual void draw (FXGLViewer *viewer)
virtual void hit (FXGLViewer *viewer)
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)
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 FXchar * getClassName () 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


Member Typedef Documentation

typedef void(* FX::TnFXGraph::ExpandFunc)(QMemArray< FXVec3f > &out, const QMemArray< FXVec2f > &in) [inherited]

A function translating a 2d array into a 3d array.

typedef void(* FX::TnFXGraph::ReduceFunc)(QMemArray< FXVec3f > &out, const QMemArray< FXVec3f > &in) [inherited]

A function translating a 3d array into a 2d array.


Constructor & Destructor Documentation

FX::TnFX2DGraph::TnFX2DGraph (  ) 

Constructs an instance.


Member Function Documentation

FXGLVertices* FX::TnFX2DGraph::setAxes ( const FXVec4f range = FXVec4f(Generic::BiggestValue< float >::value, Generic::BiggestValue< float >::value, Generic::BiggestValue< float >::value, Generic::BiggestValue< float >::value),
FXfloat  lineSize = 4.0f 
)

Sets axes. Defaults set automatic ranging. Set lineSize to 0 to remove.

FXGLVertices* FX::TnFX2DGraph::setAxesMajor ( FXfloat  granx = 0,
FXfloat  grany = 0,
FXfloat  lineSize = 2.0f,
const FXFont font = FXApp::instance()->getNormalFont() 
)

Sets major marks with optional text (set zero for no text).

virtual void FX::TnFX2DGraph::bounds ( FXRangef box  )  [virtual]

Return bounding box.

Reimplemented from FX::TnFXGraph.

virtual void FX::TnFX2DGraph::draw ( FXGLViewer viewer  )  [virtual]

Draw into viewer.

Reimplemented from FX::TnFXGraph.

virtual void FX::TnFX2DGraph::hit ( FXGLViewer viewer  )  [virtual]

Hit in viewer.

Reimplemented from FX::TnFXGraph.

FXGLVertices* FX::TnFXGraph::setItemDetails ( FXuint  item,
const FXString title,
const FXGLColor colour,
FXfloat  pointsize = 4.0f,
FXfloat  linesize = 2.0f 
) [inherited]

Sets item title and colour.

FXGLVertices* FX::TnFXGraph::setItemData ( FXuint  item,
const FXVec2f data,
FXuint  elements,
ExpandFunc  expand = Expand 
) [inherited]

Sets the data to be used, with zero unsetting.

FXGLVertices* FX::TnFXGraph::setItemData ( FXuint  item,
const QMemArray< FXVec2f > *  data,
ExpandFunc  expand = Expand 
) [inherited]

Sets the data to be used, with zero unsetting. Automatically fetches the length thereafter.

FXGLVertices* FX::TnFXGraph::setItemData ( FXuint  item,
const FXVec3f data,
FXuint  elements,
ReduceFunc  reduce = ReduceZ 
) [inherited]

Sets the data to be used, with zero unsetting.

FXGLVertices* FX::TnFXGraph::setItemData ( FXuint  item,
const QMemArray< FXVec3f > *  data,
ReduceFunc  reduce = ReduceZ 
) [inherited]

Sets the data to be used, with zero unsetting. Automatically fetches the length thereafter.

FXGLVertices* FX::TnFXGraph::itemChanged ( FXuint  item  )  [inherited]

Indicates that an item's data should be recalculated.

template<FXint zval>
static void FX::TnFXGraph::Expand ( QMemArray< FXVec3f > &  out,
const QMemArray< FXVec2f > &  in 
) [inline, static, inherited]

Expands a 2d array into a 3d array by setting of Z.

References FX::QMemArray< type >::count(), and FX::QMemArray< type >::resize().

static void FX::TnFXGraph::Expand ( QMemArray< FXVec3f > &  out,
const QMemArray< FXVec2f > &  in 
) [inline, static, inherited]

Expands a 2d array into a 3d array by setting of Z to zero.

References FX::QMemArray< type >::count(), and FX::QMemArray< type >::resize().

template<int offset, int stepe, int stepm>
static void FX::TnFXGraph::ReduceE ( QMemArray< FXVec3f > &  out,
const QMemArray< FXVec3f > &  in 
) [inline, static, inherited]

Translates a 3d array into a 2d array by elimination of a coordinate, stepping stepe at the end and stepm in the middle.

References FX::QMemArray< type >::count(), FX::QMemArray< type >::data(), and FX::QMemArray< type >::resize().

template<int yinc, int offset, int step>
static void FX::TnFXGraph::ReduceE2x ( QMemArray< FXVec3f > &  out,
const QMemArray< FXVec3f > &  in 
) [inline, static, inherited]

Translates a 3d array into a 2d array by elimination of two coordinates.

References FX::QMemArray< type >::count(), FX::QMemArray< type >::data(), and FX::QMemArray< type >::resize().

template<int xinc, int offset, int step>
static void FX::TnFXGraph::ReduceE2y ( QMemArray< FXVec3f > &  out,
const QMemArray< FXVec3f > &  in 
) [inline, static, inherited]

Translates a 3d array into a 2d array by elimination of two coordinates.

References FX::QMemArray< type >::count(), FX::QMemArray< type >::data(), and FX::QMemArray< type >::resize().

static void FX::TnFXGraph::ReduceZ ( QMemArray< FXVec3f > &  out,
const QMemArray< FXVec3f > &  in 
) [inline, static, inherited]

Translates a 3d array into a 2d array by division of Z.

References FX::QMemArray< type >::count(), and FX::QMemArray< type >::resize().

FXGLObjectList& FX::FXGLGroup::getList (  )  [inline, inherited]

Return list of childern.

virtual FXGLObject* FX::FXGLGroup::copy (  )  [virtual, inherited]

Copy this object.

Reimplemented from FX::FXGLObject.

virtual FXGLObject* FX::FXGLGroup::identify ( FXuint *  path  )  [virtual, inherited]

Identify object by means of path.

Reimplemented from FX::FXGLObject.

virtual FXbool FX::FXGLGroup::canDrag (  )  const [virtual, inherited]

Return TRUE if group can be dragged.

Reimplemented from FX::FXGLObject.

virtual FXbool FX::FXGLGroup::drag ( FXGLViewer viewer,
FXint  fx,
FXint  fy,
FXint  tx,
FXint  ty 
) [virtual, inherited]

Drag group object.

Reimplemented from FX::FXGLObject.

FXint FX::FXGLGroup::no (  )  const [inline, inherited]

Return number of children.

FXGLObject* FX::FXGLGroup::child ( FXint  pos  )  const [inline, inherited]

Child at position.

void FX::FXGLGroup::insert ( FXint  pos,
FXGLObject obj 
) [inline, inherited]

Insert child object at given position.

void FX::FXGLGroup::prepend ( FXGLObject obj  )  [inline, inherited]

Prepend child object.

void FX::FXGLGroup::append ( FXGLObject obj  )  [inline, inherited]

Append child object.

void FX::FXGLGroup::replace ( FXint  pos,
FXGLObject obj 
) [inline, inherited]

Replace child object.

void FX::FXGLGroup::remove ( FXGLObject obj  )  [inline, inherited]

Remove child object.

void FX::FXGLGroup::erase ( FXint  pos  )  [inline, inherited]

Remove child object at given position.

void FX::FXGLGroup::clear (  )  [inline, inherited]

Remove all children.

virtual void FX::FXGLGroup::save ( FXStream store  )  const [virtual, inherited]

Stream save and load.

Reimplemented from FX::FXObject.

virtual void FX::FXGLGroup::load ( FXStream store  )  [virtual, inherited]

Load object from stream.

Reimplemented from FX::FXObject.

virtual FXbool FX::FXGLObject::canDelete (  )  const [virtual, inherited]

Return true if this object can be deleted from the scene.

Reimplemented in FX::FXGLShape.

virtual long FX::FXObject::onDefault ( FXObject ,
FXSelector  ,
void *   
) [virtual, inherited]

Called for unhandled messages.

Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.

const FXchar* FX::FXObject::getClassName (  )  const [inherited]

Get class name of some object.

bool FX::FXObject::isMemberOf ( const FXMetaClass metaclass  )  const [inherited]

Check if object is member of metaclass.

virtual long FX::FXObject::tryHandle ( FXObject sender,
FXSelector  sel,
void *  ptr 
) [virtual, inherited]

Try handle message safely.

QTransString FX::FXObject::tr ( const char *  text,
const char *  hint = 0 
) [inherited]

Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)

virtual void* FX::FXObject::getPythonObject (  )  const [inline, virtual, inherited]

Returns the python object representing this instance (if created in python).

virtual void FX::FXObject::decouplePythonObject (  )  const [inline, virtual, inherited]

Causes decoupling of python object from this object (deletes self).


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:29:23 2008 for TnFOX by doxygen v1.5.6