Commit cca4536b authored by Jan Möbius's avatar Jan Möbius
Browse files

Dennis:

Added-enterPick-and-leavePick-functions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5397 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d36b6143
......@@ -155,6 +155,21 @@ BaseNode::delete_subtree()
delete this;
}
//----------------------------------------------------------------------------
void
BaseNode::enterPick(GLState& _state, PickTarget /*_target*/, unsigned int _drawMode)
{
enter (_state, _drawMode);
}
//----------------------------------------------------------------------------
void
BaseNode::leavePick(GLState& _state, PickTarget /*_target*/, unsigned int _drawMode)
{
leave (_state, _drawMode);
}
//=============================================================================
} // namespace SceneGraph
......
......@@ -155,11 +155,26 @@ public:
*/
virtual void leave(GLState& /* _state */, unsigned int /* _drawMode */) {}
/** This function is called when traversing the scene graph during picking
and arriving at this node. It can be used to store GL states that
will be changed in order to restore then in the leavePick()
function. Its default implementation will call the enter() function.
*/
virtual void enterPick(GLState& _state , PickTarget _target,
unsigned int _drawMode );
/** Draw the node using the GL picking name stack. The node's ID
will already be on the name stack, so only names identifing e.g. faces
should be used ( by glLoadName() ).
*/
virtual void pick(GLState& /* _state */, PickTarget /* _target */ ) {}
/** The leavePick function is used to restore GL states the have been changed.
This function must restore the status before enterPick() !
Its default implementation will call the leave() function.
*/
virtual void leavePick(GLState& _state, PickTarget _target,
unsigned int _drawMode );
/** Enable or Disable picking for this node
* ( default: enabled )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment