|
CEDRIC
Revision_backup-2009-02
|
Graphical representation of Phast objects (e.g. PaDetector, PaTrack, ...) as OpenSceneGraph node. More...
#include <PhastNode.h>
Classes | |
| struct | Magnet |
| struct | Target |
Public Types | |
| enum | Type { GROUP =1, DETECTOR =2, CALORIMETER =4, RICH =8, TRACK =16, MAGNET =32, TARGET =64, CLUSTER =128 } |
Public Types inherited from TypedTransform | |
| enum | ReservedTypes { UNSPECIFIED =-1, GROUP =1 } |
| typedef TypedTransform | T |
Public Member Functions | |
| PhastNode () | |
| Constructor for a GROUP node. More... | |
| PhastNode (const PaDetect &det, osg::Vec4 color=osg::Vec4(1.f, 1.f, 1.f, 1.f)) | |
| Constructor for a DETECTOR node. More... | |
| PhastNode (const PaCalorimeter &cal, osg::Vec4 color=osg::Vec4(1.f, 1.f, 1.f, 1.f)) | |
| Constructor for a CALORIMETER node. More... | |
| PhastNode (const PaRich &rich, osg::Vec4 color=osg::Vec4(1.f, 1.f, 1.f, 1.f)) | |
| Constructor for a RICH node. More... | |
| PhastNode (const PaTrack &track, osg::Vec4 color=osg::Vec4(1.f, 1.f, 1.f, 1.f)) | |
| Constructor for a TRACK node. More... | |
| PhastNode (const PaCaloClus &cluster) | |
| Constructor for a CLUSTER node, a special node showing the energy deposit in a Calorimeter Cluster. More... | |
| std::string | getName () const |
| Return name (matches Phast object's name if node corresponds to a Phast object) More... | |
| int | getUID () const |
| Return unique PhastNode index (e.g. usefull for mapping a PhastNode to a QTreeWidget item) More... | |
| void | setColor (osg::Vec3 color) |
| Change color of this node and all its children. More... | |
| void | setAlpha (float alpha) |
| Change alpha value of this node and all its children. More... | |
| void | setVisible (bool visible) |
| Change visibility of this node and its subtree. More... | |
| void | highlight (bool highlighted) |
| PhastNode (const Magnet &magnet, osg::Vec4 color=osg::Vec4(1.f, 1.f, 1.f, 1.f)) | |
| PhastNode (const Target &target, osg::Vec4 color=osg::Vec4(1.f, 1.f, 1.f, 1.f)) | |
| bool | isSetupEntity () |
| bool | isEventEntity () |
| bool | isGroup () |
| bool | isDetector () |
| bool | isCalorimeter () |
| bool | isRich () |
| bool | isTrack () |
| bool | isCluster () |
| bool | isMagnet () |
| bool | isTarget () |
Selectable implementation | |
| virtual bool | onHighlight (bool highlight) |
| virtual bool | onSelect (bool select) |
| virtual const std::string & | toolTip (osg::Node *) |
Pickable implementation | |
Everything pickable except shadow | |
| virtual bool | isPickable (osg::Node *node) |
Public Member Functions inherited from TypedTransform | |
| TypedTransform (std::string className) | |
| virtual bool | childrenAllowed () |
| const std::string & | getClassName () const |
| int | getType () const |
| virtual bool | addChild (osg::Node *child) |
| virtual bool | insertChild (unsigned int index, osg::Node *child) |
| virtual bool | setChild (unsigned int index, osg::Node *child) |
| virtual bool | replaceChild (osg::Node *origChild, osg::Node *child) |
| virtual bool | removeChildren (unsigned int pos, unsigned int numChildrenToRemove) |
Public Member Functions inherited from Selectable | |
| Selectable () | |
| virtual | ~Selectable () |
Public Member Functions inherited from PickingHandler::Pickable | |
| Pickable () | |
| virtual | ~Pickable () |
Protected Member Functions | |
| osg::Geode * | createHighlightBox (osg::BoundingBox bbox) |
| osg::Node * | createWireframe (osg::Node *node) |
| osg::Node * | createShadow (osg::Node *) |
| void | createSimplifiedGeometry (osg::Vec4) |
| void | init (int type, const std::string &name) |
| Setup uid, type and name (first call in constructor) More... | |
| void | assemble () |
| Assemble switch node with geometry nodes (last call in constructor) More... | |
Protected Member Functions inherited from TypedTransform | |
| void | updateType (int type=UNSPECIFIED) |
Protected Member Functions inherited from Selectable | |
| bool | isSelected () const |
| virtual void | onMouseOver (const osgGA::GUIEventAdapter *ea, osg::Node *) |
| virtual void | onMouseEnter (const osgGA::GUIEventAdapter *ea, osg::Node *) |
| virtual void | onMouseLeave (const osgGA::GUIEventAdapter *ea) |
Protected Member Functions inherited from PickingHandler::Pickable | |
| void | setToolTip (std::string text) |
| This may be used for showing a tooltip. More... | |
| void | setToolTipPosition (float x, float y, float z) |
Additional Inherited Members | |
Static Public Member Functions inherited from Selectable | |
| static bool | selectCurrent (bool select=true) |
| static bool | toggleCurrent () |
| static void | resetCurrent () |
| static Selectable * | getCurrent () |
Protected Attributes inherited from TypedTransform | |
| int | m_type |
| std::string | m_className |
Graphical representation of Phast objects (e.g. PaDetector, PaTrack, ...) as OpenSceneGraph node.
| enum PhastNode::Type |
| PhastNode::PhastNode | ( | ) |
Constructor for a GROUP node.
| PhastNode::PhastNode | ( | const PaDetect & | det, |
| osg::Vec4 | color = osg::Vec4(1.f,1.f,1.f,1.f) |
||
| ) |
Constructor for a DETECTOR node.
References OsgGeometry::createBox(), and OsgGeometry::createBoxWireframe().
| PhastNode::PhastNode | ( | const PaCalorimeter & | cal, |
| osg::Vec4 | color = osg::Vec4(1.f,1.f,1.f,1.f) |
||
| ) |
Constructor for a CALORIMETER node.
References OsgGeometry::createBox(), OsgGeometry::createBoxArray(), and OsgGeometry::createBoxWireframe().
| PhastNode::PhastNode | ( | const PaRich & | rich, |
| osg::Vec4 | color = osg::Vec4(1.f,1.f,1.f,1.f) |
||
| ) |
Constructor for a RICH node.
References OsgGeometry::createBox(), OsgGeometry::createBoxWireframe(), and GetBoundingBoxVisitor::getBoundingBox().
| PhastNode::PhastNode | ( | const PaTrack & | track, |
| osg::Vec4 | color = osg::Vec4(1.f,1.f,1.f,1.f) |
||
| ) |
Constructor for a TRACK node.
References OsgGeometry::createLineStrip(), and OsgGeometry::setLineState().
| PhastNode::PhastNode | ( | const PaCaloClus & | cluster | ) |
Constructor for a CLUSTER node, a special node showing the energy deposit in a Calorimeter Cluster.
References OsgGeometry::createCross3D(), OsgGeometry::createQuad(), and QPhastInterface::getCalorimeter().
| PhastNode::PhastNode | ( | const Magnet & | magnet, |
| osg::Vec4 | color = osg::Vec4(1.f,1.f,1.f,1.f) |
||
| ) |
Constructors for special nodes
References GetBoundingBoxVisitor::getBoundingBox(), PhastNode::Magnet::model, PhastNode::Magnet::name, PhastNode::Magnet::x, PhastNode::Magnet::y, and PhastNode::Magnet::z.
| PhastNode::PhastNode | ( | const Target & | target, |
| osg::Vec4 | color = osg::Vec4(1.f,1.f,1.f,1.f) |
||
| ) |
|
protected |
Assemble switch node with geometry nodes (last call in constructor)
|
protected |
References OsgGeometry::createBoxWireframe().
|
inlineprotected |
|
inlineprotected |
|
protected |
References OsgGeometry::setLineState().
|
inline |
Return name (matches Phast object's name if node corresponds to a Phast object)
Referenced by EventMultiViewer::requestView().
|
inline |
Return unique PhastNode index (e.g. usefull for mapping a PhastNode to a QTreeWidget item)
Referenced by SetupTreeWidget::addGroup(), SelectionDispatcher::highlight(), and ParticleTreeWidget::updateContent().
| void PhastNode::highlight | ( | bool | highlighted | ) |
|
protected |
Setup uid, type and name (first call in constructor)
|
inline |
References CALORIMETER, and TypedTransform::m_type.
Referenced by EventMultiViewer::requestView().
|
inline |
References CLUSTER, and TypedTransform::m_type.
|
inline |
References DETECTOR, and TypedTransform::m_type.
|
inline |
References CLUSTER, TypedTransform::m_type, and TRACK.
Referenced by SelectionDispatcher::highlight().
|
inline |
References GROUP, and TypedTransform::m_type.
Referenced by SelectionDispatcher::highlight(), and EventMultiViewer::requestView().
|
inline |
References TypedTransform::m_type, and MAGNET.
|
inlinevirtual |
Reimplemented from PickingHandler::Pickable.
|
inline |
References TypedTransform::m_type, and RICH.
|
inline |
Convenience getters for Type (Remember: A GROUP has the types of all its children!)
References CALORIMETER, DETECTOR, TypedTransform::m_type, MAGNET, RICH, and TARGET.
Referenced by SelectionDispatcher::highlight().
|
inline |
References TypedTransform::m_type, and TARGET.
|
inline |
References TypedTransform::m_type, and TRACK.
|
virtual |
Implements Selectable.
References SelectionDispatcher::highlight(), and SelectionDispatcher::ref().
|
virtual |
Implements Selectable.
| void PhastNode::setAlpha | ( | float | alpha | ) |
Change alpha value of this node and all its children.
References ChangeColorVisitor::changeOnlyAlpha(), ChangeColorVisitor::setAlpha(), and setAlpha().
Referenced by SetupTreeWidget::changeSetupAlpha(), and setAlpha().
| void PhastNode::setColor | ( | osg::Vec3 | color | ) |
Change color of this node and all its children.
References ChangeColorVisitor::getNumberOfChangedDrawables(), and setColor().
Referenced by setColor().
| void PhastNode::setVisible | ( | bool | visible | ) |
Change visibility of this node and its subtree.
References setVisible().
Referenced by setVisible(), and SetupTreeWidget::updateItem().
|
virtual |
Reimplemented from Selectable.
1.8.6