Page 1 of 1

graph editor

Posted: Fri Apr 21, 2006 06:17
by Tov
I need a basic graph editor to boost the development of my engine.

It is intended as the upper layer of a world editor. The whole editing process involves picking nodes from an Ogre scene, so I don't want to use an external window, forcing the user to point back and forth. The graph editor itself is a 2D overlay exposing nodes and links (i.e. vertices and edges) through appropriate widgets.

CEGUI is well-named, a bit crazy, but it integrates well with Ogre and Lua, which I use heavily; I have faith it will improve fast, so i'm sticking with it. :wink:

We'll assume graph nodes are viewed-controlled through standard windows, say EditBox. As far as links are concerned, we need to
  • represent them as thick lines, with optional arrows at anchor points;
  • be able to select and highlight them;
  • be able to drag & drop anchor points.
This entails being able to draw and pick arbritrary lines. From what I read (API and Ogre renderer) all the rendering in CEGUI is based on quads and textures. So here's my basic plan:
  • to draw a line, rasterize (e.g. Bresenham) into a transparent dynamic texture via Texture::loadFromMemory.
  • to pick a line, refine standard quad picking by addressing the texture.

Hints much appreciated.

Posted: Tue Apr 25, 2006 16:19
by lindquist
I'm not sure loadFromMemory will yield fast enough performance.
You should be able to just create the texture, then cast it to OgreCEGUITexture (IIRC) and render directly to this texture.

The picking part will be venturing unchartered territory I think, so good luck ;)