Re: perfly - show tree, see name

New Message Reply Date view Thread view Subject view Author view

Brian Furtaw (brian++at++sgi.com)
Thu, 21 Nov 1996 08:55:17 -0500


If you scale the tree larger you will be able to see all of the text. There is
a scale slider on the perfly interface. I do like your idea of color coding
though, in inventor when you interactively edit the database using gview they
have different symbols for different types of nodes. The symbolology is defined
in the inventor mentor so if you have read the book you get it right away.

Brian

On Nov 20, 12:00pm, David Cooper wrote:
> Subject: perfly - show tree, see name
> Ever been frustrated by the fact that the nodes on the "show tree"
> option in perfly can only show 8 characters and of those 8 usually about
> 6 are used by the type specification, leaving only 2 characters for name
> information ?
>
> Here is a very minor change which makes the option a bit more useful.
> Nodes become color coded by type and if a name has been defined for a
> node it is placed on the node. Using color to indicate type frees up
> about 6 characters which can make identifying a node of interest much
> easier.
>
> You need to modify the source for libpfutil
>
> cd /usr/share/Performer/lib/libpfutil
>
> edit gui.c and replace the function drawNode() with the code segment
> below.
>
> Recompile and copy the library libpfutil_<GL version>.so into /usr/lib/
>
> You should not have to recompile perfly for it to pick up the new
> version.
>
> ---->
>
>
> typedef struct { int col; char name[256]; } colTable;
> #define COL_ENTRIES 4
> static colTable boxColors[COL_ENTRIES] =
> {
> 0xff705311, "Group",
> 0xff00ff00, "Switch",
> 0xffcde130, "DCS",
> 0xffffff00, "SCS",
> };
>
> static void
> drawNode(pfNode *node, float x, float y, int ishlight)
> {
> const char *typeName;
> char str[512];
> int found = 0, i;
>
> typeName = pfGetTypeName((pfObject*) node);
>
> if (strncmp(typeName, "pf", 2) == 0)
> typeName +=2;
>
> if (pfGetNodeName(node) != NULL)
> strcpy(str, pfGetNodeName(node));
> else
> strcpy(str,typeName);
>
> /* indicate number of geosets referenced by geode */
> if (pfIsOfType(node, pfGetGeodeClassType()))
> {
> char children[32];
> sprintf(children, " :%d", pfGetNumGSets((pfGeode *)node));
> strcat(str, children);
> }
>
> for (i = 0; i < COL_ENTRIES; i++)
> {
> if (!strcmp(typeName,boxColors[i].name))
> {
> found = 1;
> drawBevelBox(x, y, XS-1, YS-1, boxColors[i].col,
> str);
> }
> }
>
> if (!found)
> drawBevelBox(x, y, XS-1, YS-1, 0xff808080, str);
>
> }
>
>
>
> --
> David Cooper Mitsubishi Electric ITA
> Senior Member of Tech Staff Sunnyvale Lab
> email:cooper++at++svl.meitca.com 1060 East Arques Avenue
> tel:408 523 6805 Sunnyvale CA 94086
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from David Cooper

-- 
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o

Brian Furtaw (brian++at++sgi.com) VisSim Technical Consultant 12200-G Plum Orchard Drive Office: (301)572-3293 Fax: (301)872-3293 Silver Spring, Maryland 20904 OpenGL/ImageVision/OpenInventor/Performer ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:59 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.