Studierstube Documentation Project

   Main Page       Modules       Class Hierarchy       Alphabetical List       Compound List       File List       Compound Members       Related Pages   

SoBotanicVis Class Reference
[BotanicVis]

provides means to realise a botanical visualisation of a hierarchical structure. More...

#include <SoBotanicVis.h>

List of all members.

Public Methods

 SoBotanicVis ()
virtual SbBool setUpConnections (SbBool onOff, SbBool doItAlways=FALSE)

Static Public Methods

void initClass ()

Public Attributes

SoSFTrigger trigger
SoSFFloat lengthOfBranches
SoSFFloat thickness
SoSFFloat alpha
SoSFFloat beta
SoSFInt32 numOfBranches

Protected Methods

void buildTree ()
virtual ~SoBotanicVis ()

Static Protected Methods

void treeSensorCB (void *data, SoSensor *sen)
void triggerSensorCB (void *data, SoSensor *sen)

Protected Attributes

SoSFNode geometry
SoSFNode treeElements
bool numOfBranchesChanged
SoFieldSensor treeSensor
SoFieldSensor triggerSensor


Detailed Description

provides means to realise a botanical visualisation of a hierarchical structure.

Therefore the information need to be structured into SoTreeNode's and SoTreeLeaf's, where a SoTreeNode may have multiple SoTreeNode's and SoTreeLeaf's as children as in a conventional n-ary tree.

This structure will then be reorganized in a botanical tree where a set of leaves corresponds to a fruit and a node corresponds to a branch. The field "numOfBranches" indicates here the number of branching connections leaving one branch, "lengthOfBranches" indicates the height of the SoCylinder of each branch and "thickness" specifies a scaling value for the radius of these cylinders.

More information on this visualisation technique can be found in the paper "Botanical Visualization of huge hierarchies" by Ernst Kleiberg, Huub van de Wetering and Jarke J. van Wijk on the url http://www.win.tue.nl/~vanwijk/botatree.pdf

CATALOG PARTS

All Parts
Part NamePart TypeDefault TypeNULL Default
geometry SoSeparatorSoSeparatorNO
treeElements SoSeparatorSoSeparatorYES

File Format / defaults:

SoBotanicVis {

    SoSFInt32   numOfBranches       3
    SoSFFloat   lengthOfBranches    10.0f
    SoSFFloat   thickness           0.5f
    SoSFFloat   alpha               1.0f
    SoSFFloat   beta                1.62f #golden ratio
    SoSFTrigger trigger         

}


Constructor & Destructor Documentation

SoBotanicVis::SoBotanicVis  
 

constructor

virtual SoBotanicVis::~SoBotanicVis   [protected, virtual]
 

destructor


Member Function Documentation

void SoBotanicVis::buildTree   [protected]
 

starts the SoBuildBotanicAction to build the botanical tree

void SoBotanicVis::initClass   [static]
 

Inventor class initialization.

virtual SbBool SoBotanicVis::setUpConnections SbBool    onOff,
SbBool    doItAlways = FALSE
[virtual]
 

sets the connections of the sensors

void SoBotanicVis::treeSensorCB void *    data,
SoSensor *    sen
[static, protected]
 

sets the flag numOfBranchesChanged to TRUE

void SoBotanicVis::triggerSensorCB void *    data,
SoSensor *    sen
[static, protected]
 

is called when the field "trigger" is triggered, i.e.

when the SoPushButton coupled to this field is pressed.


Member Data Documentation

SoSFFloat SoBotanicVis::alpha
 

this angle constitutes a reference for the rotation of each branch around the Z-axis.

SoSFFloat SoBotanicVis::beta
 

The angle beta specifies a rotation angle around the Y-axis which remains constantly during the building process.

Each branch is rotated with this angle beta to ensure a displacing of the branches and fruits

SoSFNode SoBotanicVis::geometry [protected]
 

contains the geometry of the botanic tree; is build automatically

SoSFFloat SoBotanicVis::lengthOfBranches
 

this field specifies the height of the cylinders representing the branches

SoSFInt32 SoBotanicVis::numOfBranches
 

This field specifies how many branching connections should at most leave one branch.

bool SoBotanicVis::numOfBranchesChanged [protected]
 

is used to interactively change the parameters of the tree.

If TRUE, the structure of the botanical tree need to be reformed and the action need to be started again

SoSFFloat SoBotanicVis::thickness
 

scaling value for the radius of the cylinders representing the branches.

The relative value is dependent on the number of strands of each branch.

SoSFNode SoBotanicVis::treeElements [protected]
 

contains the conventional tree to be visualized

SoFieldSensor SoBotanicVis::treeSensor [protected]
 

this sensor detects changes of the field numOfBranches and sets the flag numOfBranchesChanged to TRUE

SoSFTrigger SoBotanicVis::trigger
 

field that has to be connected to a SoPushButton to interactively rebuild the botanical tree

SoFieldSensor SoBotanicVis::triggerSensor [protected]
 

this sensor is attached to the field "trigger"


The documentation for this class was generated from the following files:
 This page was generated at Sat Jun 26 21:29:49 2004 for BotanicVis by Doxygen.
 If you have any comments, please send a message to schmalstieg@ims.tuwien.ac.at.
www.studierstube.org