Added support for naming slides and layers with slide_name and layer_name properties respectively.
Added support for creating events based on key presses using a <key_to_run> and <key_to_jump> tags.
This commit is contained in:
@@ -27,9 +27,9 @@ class OSGPRESENTATION_EXPORT PickEventHandler : public osgGA::GUIEventHandler
|
||||
{
|
||||
public:
|
||||
|
||||
PickEventHandler(osgPresentation::Operation operation, bool relativeJump=true, int slideNum=0, int layerNum=0);
|
||||
PickEventHandler(const std::string& str, osgPresentation::Operation operation, bool relativeJump=true, int slideNum=0, int layerNum=0);
|
||||
PickEventHandler(const osgPresentation::KeyPosition& keyPos, bool relativeJump=true, int slideNum=0, int layerNum=0);
|
||||
PickEventHandler(osgPresentation::Operation operation, const JumpData& jumpData=JumpData());
|
||||
PickEventHandler(const std::string& str, osgPresentation::Operation operation, const JumpData& jumpData=JumpData());
|
||||
PickEventHandler(const osgPresentation::KeyPosition& keyPos, const JumpData& jumpData=JumpData());
|
||||
|
||||
void setOperation(osgPresentation::Operation operation) { _operation = operation; }
|
||||
osgPresentation::Operation getOperation() const { return _operation; }
|
||||
@@ -40,15 +40,9 @@ class OSGPRESENTATION_EXPORT PickEventHandler : public osgGA::GUIEventHandler
|
||||
void setKeyPosition(const osgPresentation::KeyPosition& keyPos) { _keyPos = keyPos; }
|
||||
const osgPresentation::KeyPosition& getKeyPosition() const { return _keyPos; }
|
||||
|
||||
void setRelativeJump(int slideDelta, int layerDelta);
|
||||
void setAbsoluteJump(int slideNum, int layerNum);
|
||||
|
||||
bool getRelativeJump() const { return _relativeJump; }
|
||||
int getSlideNum() const { return _slideNum; }
|
||||
int getLayerNum() const { return _layerNum; }
|
||||
|
||||
bool requiresJump() const { return _relativeJump ? (_slideNum!=0 || _layerNum!=0) : true; }
|
||||
|
||||
void setJumpData(const JumpData& jumpData) { _jumpData = jumpData; }
|
||||
const JumpData& getJumpData() const { return _jumpData; }
|
||||
|
||||
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv);
|
||||
|
||||
virtual void accept(osgGA::GUIEventHandlerVisitor& v);
|
||||
@@ -61,9 +55,7 @@ class OSGPRESENTATION_EXPORT PickEventHandler : public osgGA::GUIEventHandler
|
||||
osgPresentation::KeyPosition _keyPos;
|
||||
osgPresentation::Operation _operation;
|
||||
|
||||
bool _relativeJump;
|
||||
int _slideNum;
|
||||
int _layerNum;
|
||||
JumpData _jumpData;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user