Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
HxBase Class Reference

Base class of all data objects, modules, and editors. More...

#include <HxBase.h>

Inherits McInterface.

Public Types

Public Member Functions

virtual void setLabel (const QString &label)
 Set a unique label or name for the object. More...
 
virtual void setDisplayLabel (const QString &displayLabel)
 Set a display label for the object. More...
 
const QString & getDisplayLabel () const
 Returns the object's display label. More...
 
const QString & getLabel (bool withDoubleQuotes=false) const
 Returns the object's label. More...
 
const char * getName (bool withDoubleQuotes=false) const
 This is identical to the object's label. More...
 
const QString & getCamelCaseLabel () const
 Return the Camel Case label of the object. More...
 
virtual bool isCamelCaseSupported () const
 Indicates whether the object has a Camel Case label or not. More...
 
void composeLabel (const QString &otherLabel, const QString &replacement)
 Composes a label from otherLabel by replacing the suffix. More...
 
virtual void setViewerMask (int mask, int masterMask=0xffffffff)
 Defines in which viewer geometry is visible. More...
 
int getViewerMask () const
 Returns viewer mask ANDed with viewer master mask. More...
 
int getViewerMaskAsIs () const
 Returns the viewer mask of the object. More...
 
int getViewerMasterMask () const
 Returns the viewer master mask of the object. More...
 
void copyViewerVisibility (unsigned int fromViewerId, unsigned int toViewerId)
 Sets the viewer visibility flag of the viewer fromViewerId to toViewerId. More...
 
void showGeom (SoNode *node, HxSpatialData *controllData)
 Adds geometry to the viewers. More...
 
virtual void showGeom (SoNode *node)
 Calls showGeom(node,0); overridden in HxModule, HxEditor. More...
 
void hideGeom (SoNode *node)
 Removes geometry node from the viewers. More...
 
virtual void clipGeom (HxPlanarModBase *planarMod, int viewerMask=0xffff)
 Clip geometry by planar module. More...
 
virtual void unclipGeom (HxPlanarModBase *planarMod)
 Unset geometry clipping. More...
 
bool isClipped () const
 Returns true if an HxPlanarMod is clipping this object. More...
 
int getClipperMask (HxPlanarModBase *planarMod)
 Returns viewer mask in which planarMod clips this object. More...
 
virtual int parse (Tcl_Interp *interpreter, int argc, char **argv)
 Tcl command interface of the object. More...
 
void setControllingData (HxSpatialData *data)
 Specifies the data object from which the local transformation is taken from. More...
 
HxSpatialData * getControllingData () const
 Returns data object which defines the local coord transform. More...
 
void showPinButtons (bool showIt)
 Hides or shows pin buttons of all ports. More...
 
int getNumPorts () const
 Returns number of ports. More...
 
HxPort * getPort (int i) const
 Returns specified port. More...
 
HxPort * getPort (const QString &name) const
 Returns port corresponding to given name. More...
 
HxPort * getPortByLabel (const QString &label) const
 Returns port with the given label. More...
 
HxPort * getPortOfType (const McTypeInfo *type, bool ignoreInvisible=true) const
 Returns the first port corresponding to given type. More...
 
HxINTERNAL void saveTclMemberVars (FILE *fp)
 Needed internally for save network. More...
 
bool getTclMemberVar (const char *name, QString &result) const
 Gets value of tcl member variable with name. More...
 
void setTclMemberVar (const char *name, const char *value)
 sets value of tcl member variable with name More...
 
HxINTERNAL int setTclMemberVarSerialize (const char *name, bool serialize)
 Save this tcl member variable in network file (standard) or not. More...
 
SoSeparator * getSeparator () const
 Returns the separator containing all the geometry of the object. More...
 
virtual void checkRemoteMode ()
 Checks if VR mode or TeamWork mode is activated. More...
 
virtual HxINTERNAL int getGeometryWeight ()
 Get geometry weight. More...
 
void setRequiresPolygonOffset (bool value)
 Sets or unsets interest in a global polygon offset. More...
 
bool requiresPolygonOffset () const
 Checks if this object requires a global polygon offset or not. More...
 
virtual void setDisplayViewers (const std::set< int > &visibleAreas)
 Restricts the rendering of this module to a specific list of VR screens or viewers. More...
 
void setDisplayViewers (const McDArray< int > &visibleAreas)
 Provided for convenience. More...
 
void getDisplayViewers (std::set< int > &visibleAreas) const
 Return the list of of VR screens or viewers which are allowed to display the representation of this module. More...
 
void setDisplay (HxDisplay *display)
 Sets class managing projection and shadowing options. More...
 
HxDisplay * getDisplay ()
 Gets class managing projection and shadowing options. More...
 
virtual const QxBaseNotifier * getNotifier () const
 To get the associated Qt notifier which enables to track all Qt signal emitted by HxBase objects. More...
 
QxGlobalDisplayUnitsChangesListener< HxBase > * getDisplayUnitsChangesListener () const
 Units management. More...
 
virtual void globalUnitChanged (const int &oldUnit, const int &newUnit)
 Called by m_displayUnitsChangesListener when a global display unit has changed. More...
 
virtual void globalCoordinatesUnitChanged (const int &oldUnit, const int &newUnit)
 Called by m_displayUnitsChangesListener when the global coordinates display unit has changed. More...
 
bool getFlag (unsigned int flag) const
 Returns flag value. More...
 
void setFlag (unsigned int flag, bool value)
 Sets flag with corresponding value. More...
 
HxINTERNAL HxPort * createOnTheFlyPortFromClassName (const QString &className, const QString &name, const QString &label)
 Create a port of determined type. More...
 
virtual HxINTERNAL HxPort * createOnTheFlyPort (const HxPortTypeInfo *typeInfo, const QString &name, const QString &label)
 Create a port of determined type. More...
 
HxINTERNAL void removeOnTheFlyPort (HxPort *port)
 Remove an on-the-fly port. More...
 
HxINTERNAL void removeAllOnTheFlyPorts ()
 Remove all on-the-fly ports. More...
 
HxINTERNAL void internalSetLabel (const char *label)
 internal use only More...
 
void notifyPortAdded (HxPort *port)
 Called to notify when a port has been added/removed to/from the HxBase instance. More...
 

Static Public Member Functions

static QString convertToCamelCase (const char *name)
 Converts a nil terminated C-style string to Camel Case wrt Avizo convention. More...
 
static int getDefaultViewerMask ()
 Returns the viewer mask, which had been used to initialize viewerMask. More...
 
static int getNumInstances ()
 Returns the total number of class instances. More...
 
static void addForbiddenLabel (const char *forbiddenLabel)
 Adds a forbidden label, stores a copy of the string. More...
 
static void removeForbiddenLabel (const char *forbiddenLabel)
 Removes a forbidden label. More...
 
static void removeAllForbiddenLabels ()
 Removes all forbidden labels. More...
 
static bool polygonOffsetRequired ()
 Returns true if a global polygon offset is needed by at least one module. More...
 
static QString translate (const char *context, const char *sourceText, const char *disambiguation=0)
 Returns the translation text for sourceText, by querying the installed translation files. More...
 

Protected Member Functions

HxINTERNAL HxBase (McInterfaceOwner *owner=0, QxBaseNotifier *notifier=0)
 Constructor. More...
 
virtual HxINTERNAL ~HxBase ()
 Destructor. More...
 
void useWorldCoords (int trueOrFalse=1)
 Derived classes should call this if they want to use world coords. More...
 
virtual void updateTransform ()
 Inserts transform nodes into root as necessary. More...
 
virtual void projectionActivated ()
 This method is called whenever a projection is activated. More...
 
virtual void projectionDeactivated ()
 This method is called whenever a projection is deactivated. More...
 
bool containsNode ()
 Checks if the scene graph managed by this instance contains a node. More...
 
HxINTERNAL void deleteSceneGraph ()
 Remove root from #theController and delete root and raSwitch. More...
 
virtual void addRootToController (SoSeparator *rootSep, int rootViewerMask=0xffff)
 Add rootSep to a controller. More...
 
virtual void removeRootFromController (SoSeparator *rootSep)
 Remove rootSep from a controller. More...
 
virtual int renderAreaSwitchCB (SoSwitch *traversingSwitch, HxRenderArea *renderArea, SoAction *action)
 The render area switch callback. More...
 
HxINTERNAL int handleRenderAreaSwitchTraversing (const std::set< int > &visibleAreas, SoSwitch *traversingSwitch, HxRenderArea *renderArea, SoAction *action)
 This method is called by renderAreaSwitchCB(SoSwitch* traversingSwitch, HxRenderArea* renderArea, SoAction* action) in order to know which child has to be traversed according to visibleAreas. More...
 
HxINTERNAL void handleNewDisplayViewersList (std::set< int > &visibleAreas)
 This helper is called by setDisplayViewers(const std::set<int>& visibleAreas) More...
 
virtual void initScenegraph ()
 Initializes the scene graph. More...
 

Static Protected Member Functions

static int staticParse (ClientData data, Tcl_Interp *interpreter, int argc, char **argv)
 Interface to Tcl scripting language. More...
 
static HxINTERNAL int renderAreaSwitchStaticCB (void *localUserData, HxBase *moduleBase, SoSwitch *traversingSwitch, HxRenderArea *renderArea, SoAction *action)
 The render area switch callback. More...
 
static HxINTERNAL void raSwitchOnSensorCB (void *data, SoSensor *sensor)
 Use to setting up some necessary OIV cache properties when raSwitch is started. More...
 

Detailed Description

Base class of all data objects, modules, and editors.

It provides the following features:

NOTE: If you derive your class from HxBase you must use special macros in your class declaration and definition.

Member Enumeration Documentation

Flags.

Enumerator
CAN_COPY_VIEWER_VISIBILITY 

Object can be clipped by other modules.

Default is true

CAN_HAVE_CONSOLE_COMPLETION 

Object visibility can be copied from one viewer to another.

Checked in HxBase::copyViewerVisibility. Default is true.

CONSOLE_COMPLETION_ACTIVATED 

Object can have console completion.

Default is true.

NUM_HXBASE_FLAGS 

The console completion is currently activated on object.

Default is false. The console completion will be automatically activated/deactivated when adding/removing an object to/from #theObjectPool.

Constructor & Destructor Documentation

HxINTERNAL HxBase::HxBase ( McInterfaceOwner *  owner = 0,
QxBaseNotifier *  notifier = 0 
)
protected

Constructor.

Constructor is protected - this is an abstract class.

To add signals/slots for inherited classes, a new class QxNewClassNotifier which inherits from QxBaseNotifier must be implemented. Then the notifier must be given to the constructor of HxBase, and the function getNotifier() must be overridden. In inherited class, getNotifier() must return the type of the new notifier.

virtual HxINTERNAL HxBase::~HxBase ( )
protectedvirtual

Destructor.

Destructor, declared virtual.

Member Function Documentation

static void HxBase::addForbiddenLabel ( const char *  forbiddenLabel)
static

Adds a forbidden label, stores a copy of the string.

Parameters
forbiddenLabelThe forbidden label.
virtual void HxBase::addRootToController ( SoSeparator *  rootSep,
int  rootViewerMask = 0xffff 
)
protectedvirtual

Add rootSep to a controller.

When adding rootSep, it's possible to set its default visibility by setting rootViewerMask. This method can be re-implemented in case you would like to use your own controller.

Parameters
rootSepThe root separator.
rootViewerMaskThe root viewer mask (default value is 0xffff).
virtual void HxBase::checkRemoteMode ( )
virtual

Checks if VR mode or TeamWork mode is activated.

virtual void HxBase::clipGeom ( HxPlanarModBase *  planarMod,
int  viewerMask = 0xffff 
)
virtual

Clip geometry by planar module.

You can optionally specify in which viewer (viewerMask) this object must be clipped by planarMod.

Parameters
planarModThe planar mod.
viewerMaskThe viewer mask (default value is 0xffff).
void HxBase::composeLabel ( const QString &  otherLabel,
const QString &  replacement 
)

Composes a label from otherLabel by replacing the suffix.

Example:

  • otherLabel: motor.am
  • replacement: "-simplified" => "motor-simplified"
    Parameters
    otherLabelThe other label.
    replacementThe replacement.
bool HxBase::containsNode ( )
protected

Checks if the scene graph managed by this instance contains a node.

Returns
True if root or raSwitch contain a node, false otherwise.
static QString HxBase::convertToCamelCase ( const char *  name)
static

Converts a nil terminated C-style string to Camel Case wrt Avizo convention.

This class method converts the input parameter to Camel Case with respect to internal conventions. First letter of the result string is lower case. All blank and '-' characters are removed from the string; words those characters were separating are lower cased, excepted their first letter which is upper cased. Other special characters are replaced by '_'; several '_' following one after the other are reduced to only one '_'. First letter following a '_' is upper cased. For example: input string: "Ortho Slice" *** result: "orthoSlice" input string: "Ortho-Slice" *** result: "orthoSlice" input string: "OrthoSlice" *** result: "orthoSlice" input string: "Ortho@Slice" *** result: "ortho_Slice" input string: "Ortho@@@Slice" *** result: "ortho_Slice"

Parameters
nameC-style nil terminated string to convert.
Returns
Camel Case version of the input parameter.
void HxBase::copyViewerVisibility ( unsigned int  fromViewerId,
unsigned int  toViewerId 
)

Sets the viewer visibility flag of the viewer fromViewerId to toViewerId.

It enables to show/hide object of the pool for a particular viewer.

Parameters
fromViewerIdThe src viewer id.
toViewerIdThe dest viewer id.
virtual HxINTERNAL HxPort* HxBase::createOnTheFlyPort ( const HxPortTypeInfo *  typeInfo,
const QString &  name,
const QString &  label 
)
virtual

Create a port of determined type.

This method is intended to be overridden (HxObject and HxEditor do). By default, it will throw an exception as HxBase can't instantiate a port.

Parameters
typeInfoHxPortTypeInfo structure referring to the C++ class name of port to instantiate.
nameName of the port. (tcl name)
labelof the port. (text displayed py the port Gui)
Note
This function will throw an exception if this class can't instantiate port. (only HxObject and HxEditor could)
Returns
The created port.
HxINTERNAL HxPort* HxBase::createOnTheFlyPortFromClassName ( const QString &  className,
const QString &  name,
const QString &  label 
)

Create a port of determined type.

Parameters
classNamestring containing the C++ class name of port to instantiate.
nameName of the port. (tcl name)
labelof the port. (text displayed by the port Gui)
Note
This function will throw an exception in 2 cases:
  • className is not a recognizable C++ class.
  • This class can't instantiate port. (only HxObject and HxEditor could)
Returns
The created port.
HxINTERNAL void HxBase::deleteSceneGraph ( )
protected

Remove root from #theController and delete root and raSwitch.

const QString& HxBase::getCamelCaseLabel ( ) const

Return the Camel Case label of the object.

Returns
The Camel Case label of the object.
int HxBase::getClipperMask ( HxPlanarModBase *  planarMod)

Returns viewer mask in which planarMod clips this object.

See also
setViewerMask() for the definition of the viewer mask.
Parameters
planarModThe planar mod.
Returns
0 in case this object isn't clipped by planarMod.
HxSpatialData* HxBase::getControllingData ( ) const

Returns data object which defines the local coord transform.

Returns
The data.
static int HxBase::getDefaultViewerMask ( )
static

Returns the viewer mask, which had been used to initialize viewerMask.

Note that the default viewer masks differ for different products e.g. Amira, Avizo

Returns
the default viewer mask.
HxDisplay* HxBase::getDisplay ( )

Gets class managing projection and shadowing options.

Returns
The display.
const QString& HxBase::getDisplayLabel ( ) const
inline

Returns the object's display label.

QxGlobalDisplayUnitsChangesListener<HxBase>* HxBase::getDisplayUnitsChangesListener ( ) const

Units management.

Return display units changes listener.

Returns
The display units changes listener.
void HxBase::getDisplayViewers ( std::set< int > &  visibleAreas) const

Return the list of of VR screens or viewers which are allowed to display the representation of this module.

If the size of the returned list is 0, it means that all viewers are allowed to display the representation.

Parameters
visibleAreasThe visible areas.
bool HxBase::getFlag ( unsigned int  flag) const

Returns flag value.

Parameters
flagThe flag.
Returns
The flag value.
virtual HxINTERNAL int HxBase::getGeometryWeight ( )
virtual

Get geometry weight.

const QString& HxBase::getLabel ( bool  withDoubleQuotes = false) const

Returns the object's label.

Parameters
withDoubleQuotesIf it is set to true, a quotation mark is added as first and last character of the label. The default value is false.
const char* HxBase::getName ( bool  withDoubleQuotes = false) const

This is identical to the object's label.

Parameters
withDoubleQuotesIf it is set to true, a quotation mark is added as first and last character of the label. The default value is false.
virtual const QxBaseNotifier* HxBase::getNotifier ( ) const
virtual

To get the associated Qt notifier which enables to track all Qt signal emitted by HxBase objects.

Must be inherited to specify the return type.

Returns
The Qt notifier.
static int HxBase::getNumInstances ( )
static

Returns the total number of class instances.

Returns
The total number of class instances.
int HxBase::getNumPorts ( ) const

Returns number of ports.

Returns
The number of ports.
HxPort* HxBase::getPort ( int  i) const

Returns specified port.

Parameters
iThe port index number.
Returns
The specified port.
HxPort* HxBase::getPort ( const QString &  name) const

Returns port corresponding to given name.

Parameters
nameThe port name.
Returns
The specified port.
HxPort* HxBase::getPortByLabel ( const QString &  label) const

Returns port with the given label.

Parameters
labelThe port label.
Returns
The specified port.
HxPort* HxBase::getPortOfType ( const McTypeInfo *  type,
bool  ignoreInvisible = true 
) const

Returns the first port corresponding to given type.

Parameters
typeThe port type.
ignoreInvisibleSpecifies if invisible ports should be ignored during the search (default value is true).
Returns
The first port corresponding to given type.
SoSeparator* HxBase::getSeparator ( ) const

Returns the separator containing all the geometry of the object.

If the object does not display any geometry, i.e., if it has never called showGeom(), a null pointer is returned.

Returns
The separator containing all the geometry of the object.
bool HxBase::getTclMemberVar ( const char *  name,
QString &  result 
) const

Gets value of tcl member variable with name.

Parameters
nameThe name.
resultThe associated value.
Returns
True in case of success and false if the variable did not exist.
int HxBase::getViewerMask ( ) const

Returns viewer mask ANDed with viewer master mask.

This combination decides if an object is actually visible or not.

Returns
The viewer mask anded with viewer master mask.
int HxBase::getViewerMaskAsIs ( ) const

Returns the viewer mask of the object.

Returns
The viewer mask of the object.
int HxBase::getViewerMasterMask ( ) const

Returns the viewer master mask of the object.

Returns
The viewer master mask of the object.
virtual void HxBase::globalCoordinatesUnitChanged ( const int &  oldUnit,
const int &  newUnit 
)
virtual

Called by m_displayUnitsChangesListener when the global coordinates display unit has changed.

Must be overloaded by derivated classes which need to track coordinates display unit changes.

Parameters
oldUnitThe old unit.
newUnitThe new unit.
virtual void HxBase::globalUnitChanged ( const int &  oldUnit,
const int &  newUnit 
)
virtual

Called by m_displayUnitsChangesListener when a global display unit has changed.

Must be overloaded by derivated classes which need to track display unit changes.

Parameters
oldUnitThe old unit.
newUnitThe new unit.
HxINTERNAL void HxBase::handleNewDisplayViewersList ( std::set< int > &  visibleAreas)
protected

This helper is called by setDisplayViewers(const std::set<int>& visibleAreas)

It is in charge of: -updating the visibleAreas list in order to add appropriated SO_SWITCH_NONE or SO_SWITCH_ALL, -ensuring that the root and raSwitch exist, -starting or stopping the raSwitch filtering process. Re-implementing this method is useful when you want to mix the user defined m_visibleAreas list with your own one.

HxINTERNAL int HxBase::handleRenderAreaSwitchTraversing ( const std::set< int > &  visibleAreas,
SoSwitch *  traversingSwitch,
HxRenderArea *  renderArea,
SoAction *  action 
)
protected

This method is called by renderAreaSwitchCB(SoSwitch* traversingSwitch, HxRenderArea* renderArea, SoAction* action) in order to know which child has to be traversed according to visibleAreas.

void HxBase::hideGeom ( SoNode *  node)

Removes geometry node from the viewers.

The reference count of node is decreased by one.

Parameters
nodeThe node.
virtual void HxBase::initScenegraph ( )
protectedvirtual

Initializes the scene graph.

HxINTERNAL void HxBase::internalSetLabel ( const char *  label)

internal use only

virtual bool HxBase::isCamelCaseSupported ( ) const
virtual

Indicates whether the object has a Camel Case label or not.

This method always returns false in this implementation; it must be overloaded by classes supporting Camel Case labels.

Returns
True only if the Camel Case label is supported by the object, false otherwise.
bool HxBase::isClipped ( ) const

Returns true if an HxPlanarMod is clipping this object.

Returns
true if an HxPlanarMod is clipping this object.
void HxBase::notifyPortAdded ( HxPort *  port)

Called to notify when a port has been added/removed to/from the HxBase instance.

Parameters
portThe port.
virtual int HxBase::parse ( Tcl_Interp *  interpreter,
int  argc,
char **  argv 
)
virtual

Tcl command interface of the object.

Parameters
interpreterThe interpreter.
argcThe number of arguments.
argvThe arguments.
Returns
1 if parse is done without error.
static bool HxBase::polygonOffsetRequired ( )
static

Returns true if a global polygon offset is needed by at least one module.

At least one module must have called setRequiresPolygonOffset() with value==true, otherwise the method returns false.

Returns
True if a global polygon offset is needed by at least one module, false otherwise.
virtual void HxBase::projectionActivated ( )
protectedvirtual

This method is called whenever a projection is activated.

virtual void HxBase::projectionDeactivated ( )
protectedvirtual

This method is called whenever a projection is deactivated.

static HxINTERNAL void HxBase::raSwitchOnSensorCB ( void *  data,
SoSensor *  sensor 
)
staticprotected

Use to setting up some necessary OIV cache properties when raSwitch is started.

static void HxBase::removeAllForbiddenLabels ( )
static

Removes all forbidden labels.

HxINTERNAL void HxBase::removeAllOnTheFlyPorts ( )

Remove all on-the-fly ports.

static void HxBase::removeForbiddenLabel ( const char *  forbiddenLabel)
static

Removes a forbidden label.

Parameters
forbiddenLabelThe forbidden label.
HxINTERNAL void HxBase::removeOnTheFlyPort ( HxPort *  port)

Remove an on-the-fly port.

Parameters
Theport.
virtual void HxBase::removeRootFromController ( SoSeparator *  rootSep)
protectedvirtual

Remove rootSep from a controller.

This method can be re-implemented in case you would like to use your own controller.

Parameters
rootSepThe root separator.
virtual int HxBase::renderAreaSwitchCB ( SoSwitch *  traversingSwitch,
HxRenderArea *  renderArea,
SoAction *  action 
)
protectedvirtual

The render area switch callback.

This callback is activated only when the "setScreen" TCL command or the "setDisplayViewers" method has been called.

Parameters
traversingSwitchThe Transversing switch.
renderAreaThe render area.
actionThe action.
static HxINTERNAL int HxBase::renderAreaSwitchStaticCB ( void *  localUserData,
HxBase moduleBase,
SoSwitch *  traversingSwitch,
HxRenderArea *  renderArea,
SoAction *  action 
)
staticprotected

The render area switch callback.

This callback is activated only when the "setScreen" TCL command or the "setDisplayViewers" method has been called.

bool HxBase::requiresPolygonOffset ( ) const

Checks if this object requires a global polygon offset or not.

Returns
True if setRequiresPolygonOffset(true) was called.
HxINTERNAL void HxBase::saveTclMemberVars ( FILE *  fp)

Needed internally for save network.

Parameters
fpThe file.
void HxBase::setControllingData ( HxSpatialData *  data)

Specifies the data object from which the local transformation is taken from.

Parameters
dataThe spatial data.
void HxBase::setDisplay ( HxDisplay *  display)

Sets class managing projection and shadowing options.

Warning: display will be deleted by this class.

Parameters
displayThe display.
virtual void HxBase::setDisplayLabel ( const QString &  displayLabel)
virtual

Set a display label for the object.

This label does not have to be unique. It will be the label displayed in the GUI.

virtual void HxBase::setDisplayViewers ( const std::set< int > &  visibleAreas)
virtual

Restricts the rendering of this module to a specific list of VR screens or viewers.

By default, all viewers are allowed to display the representation of this module.

Parameters
visibleAreasThe visible areas.
void HxBase::setDisplayViewers ( const McDArray< int > &  visibleAreas)

Provided for convenience.

See setDisplayViewers(const std::set<int>& visibleAreas) for more info.

Parameters
visibleAreasThe visible areas.
void HxBase::setFlag ( unsigned int  flag,
bool  value 
)

Sets flag with corresponding value.

Parameters
flagThe flag.
valueThe flag value.
virtual void HxBase::setLabel ( const QString &  label)
virtual

Set a unique label or name for the object.

The label is displayed at the object's icon. For every label there is also a Tcl command, which corresponds to the object. The setLabel() method might append some digits to the label in order to make it unique.

Parameters
labelThe label name.
void HxBase::setRequiresPolygonOffset ( bool  value)

Sets or unsets interest in a global polygon offset.

Some modules like HxSurfaceIsolines require surfaces to be rendered using a polygon offset towards the back so that lines can be drawn directly onto the surface without z-buffer artifacts. However, since a polygon offset might introduce other rendering artifacts at sharp polygon boundaries it should only be enabled if necessary. Thus, if some module requires polygon offset to be enabled it may request so by calling this method with value==true. If polygon offset is no longer needed the method should be called with value==false. The method will be called automatically with value==false in the destructor of a HxBase object. The method should only be called from the main thread.

Parameters
valueThe polygon offset state.
void HxBase::setTclMemberVar ( const char *  name,
const char *  value 
)

sets value of tcl member variable with name

Parameters
nameThe name.
valueThe value.
HxINTERNAL int HxBase::setTclMemberVarSerialize ( const char *  name,
bool  serialize 
)

Save this tcl member variable in network file (standard) or not.

Parameters
nameThe name.
serializeThe serialize value.
Returns
1 in case of success and 0 if the variable did not exist.
virtual void HxBase::setViewerMask ( int  mask,
int  masterMask = 0xffffffff 
)
virtual

Defines in which viewer geometry is visible.

The viewer mask of Amira objects can be modified interactively using the orange viewer toggles displayed in the work area. Each bit of the mask is associated with a particular viewer. Note, that even if the viewer mask is set an object may be invisible because the master viewer mask is not set. The master viewer mask is changed whenever the viewer mask of an upstream data object is modified.

Parameters
maskThe bit mask.
masterMaskThe master bit mask (default value is 0xffffffff).
void HxBase::showGeom ( SoNode *  node,
HxSpatialData *  controllData 
)

Adds geometry to the viewers.

node may point to an arbitrary Open Inventor scene graph. This graph will become visible in all viewers defined in the viewer mask. The reference count of node will be increased by one. If controllData is non-zero the geometry will be transformed by the local transformation matrix of controllData.

Parameters
nodeThe node.
controllDataThe spatial data.
virtual void HxBase::showGeom ( SoNode *  node)
virtual

Calls showGeom(node,0); overridden in HxModule, HxEditor.

Parameters
nodeThe node.
void HxBase::showPinButtons ( bool  showIt)

Hides or shows pin buttons of all ports.

Parameters
showItThe show state.
static int HxBase::staticParse ( ClientData  data,
Tcl_Interp *  interpreter,
int  argc,
char **  argv 
)
staticprotected

Interface to Tcl scripting language.

Parameters
dataThe data.
interpreterThe interpreter.
argcThe number of arguments.
argvThe arguments.
Returns
1 if parse is done without error.
static QString HxBase::translate ( const char *  context,
const char *  sourceText,
const char *  disambiguation = 0 
)
static

Returns the translation text for sourceText, by querying the installed translation files.

Parameters
contextThe context.
sourceTextThe source text.
disambiguationThe disambiguation (default value is 0).
Returns
The translation text for sourceText.
virtual void HxBase::unclipGeom ( HxPlanarModBase *  planarMod)
virtual

Unset geometry clipping.

Parameters
planarModThe planar mod.
virtual void HxBase::updateTransform ( )
protectedvirtual

Inserts transform nodes into root as necessary.

void HxBase::useWorldCoords ( int  trueOrFalse = 1)
protected

Derived classes should call this if they want to use world coords.

Parameters
trueOrFalseThe value.

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