Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and list-tree item management.
virtual void | AnnihilateRecursively() |
virtual void | PreDeleteElement() |
virtual void | RemoveElementsInternal() |
static const char* | ToString(Bool_t b) |
TEveElement& | operator=(const TEveElement&) |
static const TGPicture* | fgListTreeIcons[9] | |
static const TGPicture* | fgRnrIcons[4] | |
static TEveElement::EChangeBits | kCBColorSelection | |
static TEveElement::EChangeBits | kCBObjProps | |
static TEveElement::EChangeBits | kCBTransBBox | |
static TEveElement::EChangeBits | kCBVisibility |
UChar_t | fCSCBits | |
Bool_t | fCanEditMainColor | Allow editing of main color. |
Bool_t | fCanEditMainTrans | Allow editing of main transformation. |
Bool_t | fCanEditMainTransparency | Allow editing of main transparency. |
UChar_t | fChangeBits | ! |
TEveElement::List_t | fChildren | List of children. |
TEveCompound* | fCompound | Compound this object belongs to. |
Int_t | fDenyDestroy | ! Deny-destroy count. |
Bool_t | fDestroyOnZeroRefCnt | Auto-destruct when ref-count reaches zero. |
Char_t | fDestructing | ! |
Bool_t | fHighlighted | ! |
Short_t | fImpliedHighlighted | ! |
Short_t | fImpliedSelected | ! |
TEveElement::sLTI_t | fItems | ! Set of list-tree-items. |
Color_t* | fMainColorPtr | Pointer to main-color variable. |
TEveTrans* | fMainTrans | Pointer to main transformation matrix. |
Char_t | fMainTransparency | Main-transparency variable. |
Int_t | fNumChildren | ! |
Int_t | fParentIgnoreCnt | ! Counter for parents that are ignored in ref-counting. |
TEveElement::List_t | fParents | List of parents. |
Bool_t | fPickable | |
Bool_t | fRnrChildren | Render children of this element. |
Bool_t | fRnrSelf | Render this element. |
Bool_t | fSelected | ! |
TRef | fSource | External object that is represented by this element. |
Int_t | fTopItemCnt | ! Counter for top-level list-tree items that prevent automatic destruction. |
void* | fUserData | ! Externally assigned and controlled user data. |
TEveElement* | fVizModel | ! Element used as model from VizDB. |
TString | fVizTag | Tag used to query VizDB for model element. |
static TEveElement::EDestruct | kAnnihilate | |
static TEveElement::ECompoundSelectionColorBits | kCSCBApplyMainColorToAllChildren | |
static TEveElement::ECompoundSelectionColorBits | kCSCBApplyMainColorToMatchingChildren | |
static TEveElement::ECompoundSelectionColorBits | kCSCBApplyMainTransparencyToAllChildren | |
static TEveElement::ECompoundSelectionColorBits | kCSCBApplyMainTransparencyToMatchingChildren | |
static TEveElement::ECompoundSelectionColorBits | kCSCBImplySelectAllChildren | |
static TEveElement::ECompoundSelectionColorBits | kCSCBTakeAnyParentAsMaster | |
static TEveElement::EDestruct | kNone | |
static TEveElement::EDestruct | kStandard |
Copy constructor. Does shallow copy. For deep-cloning and children-cloning, see: TEveElement* CloneElementRecurse(Int_t level) void CloneChildrenRecurse(TEveElement* dest, Int_t level) 'TRef fSource' is copied but 'void* UserData' is NOT. If the element is projectable, its projections are NOT copied. Not implemented for most sub-classes, let us know. Note that sub-classes of TEveProjected are NOT and will NOT be copyable.
Destructor. Do not call this method directly, either call Destroy() or Annihilate(). See also DestroyElements() and AnnihilateElements() if you need to delete all children of an element.
Called before the element is deleted, thus offering the last chance to detach from acquired resources and from the framework itself. Here the request is just passed to TEveManager. If you override it, make sure to call base-class version.
Clone the element via copy constructor. Should be implemented for all classes that require cloning support.
Clone elements and recurse 'level' deep over children. If level == 0, only the element itself is cloned (default). If level == -1, all the hierarchy is cloned.
Clone children and attach them to the dest element. If level == 0, only the direct descendants are cloned (default). If level == -1, all the hierarchy is cloned.
Virtual function for retrieveing name of the element. Here we attempt to cast the assigned object into TNamed and call GetName() there.
Virtual function for retrieveing title of the render-element. Here we attempt to cast the assigned object into TNamed and call GetTitle() there.
Virtual function for setting of name of an element. Here we attempt to cast the assigned object into TNamed and call SetName() there. If you override this call NameTitleChanged() from there.
Virtual function for setting of title of an element. Here we attempt to cast the assigned object into TNamed and call SetTitle() there. If you override this call NameTitleChanged() from there.
Virtual function for setting of name and title of render element. Here we attempt to cast the assigned object into TNamed and call SetNameTitle() there. If you override this call NameTitleChanged() from there.
Virtual function called when a name or title of the element has been changed. If you override this, call also the version of your direct base-class.
Set visualization-parameter model element. Calling of this function from outside of EVE should in principle be avoided as it can lead to dis-synchronization of viz-tag and viz-model.
Set the VizTag, find model-element from the VizDB and copy visualization-parameters from it. If the model is not found and fallback_tag is non-null, its search is attempted as well. For example: ApplyVizTag("TPC Clusters", "Clusters"); If the model-element can not be found a warning is printed and false is returned.
Propagate visualization parameters to dependent elements. MainColor is propagated independently in SetMainColor(). In this case, as fMainColor is a pointer to Color_t, it should be set in TProperClass::CopyVizParams(). Render state is not propagated. Maybe it should be, at least optionally.
Propagate visualization parameters from element el (defaulting to this) to all elements (children). The primary use of this is for model-elements from visualization-parameter database.
Copy visualization parameters from element el. This method needs to be overriden by any class that introduces new parameters. Color is copied in sub-classes which define it. See, for example, TEvePointSet::CopyVizParams(), TEveLine::CopyVizParams() and TEveTrack::CopyVizParams().
Save visualization parameters for this element with given tag. This function creates the instantiation code, calls virtual WriteVizParams() and, at the end, writes out the code for registration of the model into the VizDB.
Write-out visual parameters for this object. This is a virtual function and all sub-classes are required to first call the base-element version. The name of the element pointer is 'x%03d', due to cint limitations. Three spaces should be used for indentation, same as in SavePrimitive() methods.
Reset visual parameters for this object from VizDB. The model object must be already set.
Copy visual parameters from this element to viz-db model. If update is set, all clients of the model will be updated to the new value. A warning is printed if the model-element fVizModel is not set.
Create a replica of element and insert it into VizDB with given tag. If replace is true an existing element with the same tag will be replaced. If update is true, existing client of tag will be updated.
Returns the master element - that is: - master of projectable, if this is a projected; - master of compound, if fCompound is set; - master of first compound parent, if kSCBTakeAnyParentAsMaster bit is set; If non of the above is true, *this* is returned.
Add re into the list parents. Adding parent is subordinate to adding an element. This is an internal function.
Remove re from the list of parents. Removing parent is subordinate to removing an element. This is an internal function.
Check external references to this and eventually auto-destruct the render-element.
Collect scene-parents from all children. This is needed to automatically detect which scenes need to be updated during/after a full sub-tree update. Argument parent specifies parent in traversed hierarchy for which we can skip the upwards search.
Populates parent with elements. parent must be an already existing representation of *this*. Returns number of inserted elements. If parent already has children, it does nothing. Element can be inserted in a list-tree several times, thus we can not search through fItems to get parent here. Anyhow, it is probably known as it must have been selected by the user.
Destroy sub-tree under item 'parent' in list-tree 'ltree'.
Add this element into ltree to an already existing item parent_lti. Children, if any, are added as below the newly created item. Returns the newly created list-tree-item.
Add this render element into ltree to all items belonging to parent. Returns list-tree-item from the first register entry (but we use a set for that so it can be anything).
Add this render element into all list-trees and all items belonging to parent. Returns list-tree-item from the first register entry (but we use a set for that so it can be anything).
Remove element from all list-trees where 'parent' is the user-data of the parent list-tree-item.
Find any list-tree-item of this element in list-tree 'ltree'. Note that each element can be placed into the same list-tree on several postions.
Find list-tree-item of this element with given parent list-tree-item.
Get a TObject associated with this render-element. Most cases uses double-inheritance from TEveElement and TObject so we just do a dynamic cast here. If some TEveElement descendant implements a different scheme, this virtual method should be overriden accordingly.
Show GUI editor for this object. This is forwarded to TEveManager::EditElement().
Export source object to CINT with given name for the variable. Throws an exception if it is not set.
Set render state of this element, i.e. if it will be published on next scene update pass. Returns true if the state has changed.
Set render state of this element's children, i.e. if they will be published on next scene update pass. Returns true if the state has changed.
Set state for rendering of this element and its children. Returns true if the state has changed.
Set render state of this element and of its children to the same value. Returns true if the state has changed.
Propagate render state to the projected replicas of this element. Maybe this should be optional on gEve/element level.
Convert RGB values to Color_t and call SetMainColor.
Convert RGB values to Color_t and call SetMainColor.
Propagate color to projected elements.
Set main-transparency via float alpha varable. Value of alpha is clamped t0 [0, 1].
Propagate transparency to projected elements.
Return pointer to main transformation. If 'create' flag is set (default) it is created if not yet existing.
Return reference to main transformation. It is created if not yet existing.
Initialize the main transformation to identity matrix. If can_edit is true (default), the user will be able to edit the transformation parameters via TEveElementEditor.
Destroy the main transformation matrix, it will always be taken as identity. Editing of transformation parameters is disabled.
Check if el can be added to this element. In the base-class version we only make sure the new child is not equal to this.
Perform additional local removal of el. Called from RemoveElement() which does whole untangling. Put into special function as framework-related handling of element removal should really be common to all classes and clearing of local structures happens in between removal of list-tree-items and final removal. If you override this, you should also override RemoveElementsLocal().
Remove all elements. This assumes removing of all elements can be done more efficiently then looping over them and removing one by one. This protected function performs the removal on the level of TEveElement.
Remove all elements. This assumes removing of all elements can be done more efficiently then looping over them and removing them one by one.
Perform additional local removal of all elements. See comment to RemoveElementlocal(TEveElement*).
If this is a projectable, loop over all projected replicas and add the projected image of child 'el' there. This is supposed to be called after you add a child to a projectable after it has already been projected. You might also want to call RecheckImpliedSelections() on this element or 'el'. If 'same_depth' flag is true, the same depth as for parent object is used in every projection. Otherwise current depth of each relevant projection-manager is used.
If this is a projectable, loop over all projected replicas and add the projected image of all children there. This is supposed to be called after you destroy all children and then add new ones after this element has already been projected. You might also want to call RecheckImpliedSelections() on this element. If 'same_depth' flag is true, the same depth as for the projected element is used in every projection. Otherwise current depth of each relevant projection-manager is used.
Find the first child with given name. If cls is specified (non 0), it is also checked. Returns 0 if not found.
Find the first child whose name matches regexp. If cls is specified (non 0), it is also checked. Returns 0 if not found.
Find all children with given name and append them to matches list. If class is specified (non 0), it is also checked. Returns number of elements added to the list.
Find all children whose name matches regexp and append them to matches list. Returns number of elements added to the list.
Enable rendering of children and their list contents. Arguments control how to set self/child rendering.
Disable rendering of children and their list contents. Arguments control how to set self/child rendering. Same as above function, but default arguments are different. This is convenient for calls via context menu.
Optimized destruction without check of reference-count. Parents are not notified about child destruction. The method should only be used when an element does not have more than one parent -- otherwise an exception is thrown.
Destroy this element. Throws an exception if deny-destroy is in force. This method should be called instead of a destructor. Note that an exception will be thrown if the element has been protected against destruction with IncDenyDestroy().
Returns state of flag determining if the element will be destroyed when reference count reaches zero. This is true by default.
Sets the state of flag determining if the element will be destroyed when reference count reaches zero. This is true by default.
Returns the number of times deny-destroy has been requested on the element.
Increases the deny-destroy count of the element. Call this if you store an external pointer to the element.
Decreases the deny-destroy count of the element. Call this after releasing an external pointer to the element.
Get number of parents that should be ignored in doing reference-counting. For example, this is used when subscribing an element to a visualization-database model object.
React to element being pasted or dnd-ed. Return true if redraw is needed.
Call this after an element has been changed so that the state can be propagated around the framework.
Returns element to be selected on click. If value is zero the selected object will follow rules in TEveSelection.
Returns element to be displayed in GUI editor on click. If value is zero the displayed object will follow rules in TEveSelection.
Virtual function called when both fSelected is false and fImpliedSelected is 0. Nothing is done in this base-class version
Virtual function called when both fHighlighted is false and fImpliedHighlighted is 0. Nothing is done in this base-class version
Populate set impSelSet with derived / dependant elements. If this is a TEveProjectable, the projected replicas are added to the set. Thus it does not have to be reimplemented for each sub-class of TEveProjected. Note that this also takes care of projections of TEveCompound class, which is also a projectable.
Get selection level, needed for rendering selection and highlight feedback. This should go to TAtt3D.
Call this if it is possible that implied-selection or highlight has changed for this element or for implied-selection this element is member of and you want to maintain consistent selection state. This can happen if you add elements into compounds in response to user-interaction.
Add (bitwise or) given stamps to fChangeBits. Register this element to gEve as stamped. This method is virtual so that sub-classes can add additional actions. The base-class method should still be called (or replicated).
Returns list-tree-item check-box picture appropriate for given rendering state.
Convert Bool_t to string - kTRUE or kFALSE. Needed in WriteVizParams().
void DumpSourceObject(); // *MENU* void InspectSourceObject(); // *MENU*
{ fSource = o; }
void StampElementAdded() { AddStamp(kCBElementAdded); } void StampElementRemoved() { AddStamp(kCBElementRemoved); }
{ AddStamp(kCBVisibility); }