|
VR-Engage
2.2
|
DtZoomControl manages view magnification through a set of configurable zoom levels. It provides input handlers for zooming in and out, updates state attributes to reflect current zoom levels, and adjusts aim input scaling proportionally to the zoom level to maintain consistent aiming sensitivity at different magnifications.
#include <zoomControl.h>
Public Member Functions | |
| DtZoomControl () | |
| virtual | ~DtZoomControl () override |
| virtual bool | initialize (DtPlayerStation *player, DtInitTable &config) override |
| virtual void | shutdown () override |
| virtual const char * | type () const override |
| virtual void | zoomIn (double val) |
| virtual void | zoomOut (double val) |
| virtual void | zoom (float val) |
Public Member Functions inherited from makVre::DtEntityControlLogic | |
| DtEntityControlLogic () | |
| virtual | ~DtEntityControlLogic () override |
| virtual bool | postInitialize () override |
| virtual void | tick (double dt) override |
| virtual void | setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId()) |
| virtual void | setMouseControlEnabled (bool enabled) |
| virtual bool | isMouseControlEnabled () |
| virtual bool | isMouseControlSupportAllowed () const |
| virtual void | setMouseControlSupportAllowed (bool enable) |
| virtual const std::vector< std::string > & | joystickGroups () const |
| virtual makVre::DtVreMessageResult | handleSimState (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleStateMessages (makVre::DtVreMessage *message) |
| virtual makVre::DtVreMessageResult | handleReset (makVre::DtVreMessage *message) |
| virtual void | reset (float val) |
| virtual void | resetInPlace (float val) |
| virtual void | toggleMouseControl (float val) |
| virtual void | enableMouseControl (float val) |
| virtual makVre::DtVreMessageResult | handleFocusMessage (makVre::DtVreMessage *message) |
Public Member Functions inherited from makVre::DtPlayerComponent | |
| DtPlayerComponent () | |
| virtual | ~DtPlayerComponent () |
| virtual void | setName (const std::string &name) |
| virtual const std::string & | name () |
| virtual DtPlayerStation & | player () |
| virtual DtAttributeHandle & | playerAttributeStore () |
| virtual const DtAttributeHandle & | playerAttributeStore () const |
Protected Attributes | |
| DtInputLogic | myInputLogic |
| std::vector< double > | myZoomLevels |
| int | myZoomIndex |
Protected Attributes inherited from makVre::DtEntityControlLogic | |
| std::vector< std::string > | myJoystickFunctionGroups |
| DtInputLogic | myCommonInputLogic |
| std::string | myInputConfigFile |
| bool | myMouseControlEnabled |
| bool | myMouseControlSupportAllowed |
Protected Attributes inherited from makVre::DtPlayerComponent | |
| std::string | myName |
| DtInitTable | myConfig |
| DtPlayerStation * | myPlayer |
| makVrv::DtDe * | myDe |
| DtEntityResolver * | myResolver |
| DtAttributeCallbackManager | myAttributeCallbacks |
Additional Inherited Members | |
Protected Member Functions inherited from makVre::DtEntityControlLogic | |
| virtual void | takeControlOfPlayerEntity () |
| virtual void | releaseControlOfPlayerEntity () |
Protected Member Functions inherited from makVre::DtPlayerComponent | |
| virtual void | initializeStateAttributes () |
| makVre::DtZoomControl::DtZoomControl | ( | ) |
Constructor for DtZoomControl.
Initializes the zoom control component and checks out the VR-Engage ground feature license
|
overridevirtual |
Virtual destructor for DtZoomControl.
|
overridevirtual |
Initializes the zoom control component.
| player | Pointer to the player station this component belongs to |
| config | Configuration table containing zoom settings |
Sets up zoom levels from configuration or uses default levels if not specified, initializes state attributes, and configures input handlers for zoom controls
Reimplemented from makVre::DtEntityControlLogic.
References makVre::DtPlayerComponent::player().
|
overridevirtual |
Shuts down the zoom control component.
Cleans up input logic and performs base class shutdown operations
Reimplemented from makVre::DtEntityControlLogic.
|
overridevirtual |
Returns the type identifier for this component.
Reimplemented from makVre::DtEntityControlLogic.
|
virtual |
Input handler for zooming in.
| val | Input value (non-zero to trigger zoom) |
Increases the zoom index to the next higher magnification level and updates state attributes with the new zoom value and adjusted aim sensitivity
|
virtual |
Input handler for zooming out.
| val | Input value (non-zero to trigger zoom) |
Decreases the zoom index to the next lower magnification level and updates state attributes with the new zoom value and adjusted aim sensitivity
|
virtual |
Input handler for incremental zooming.
| val | Input value (positive to zoom in, negative to zoom out) |
Calls either zoomIn or zoomOut based on the sign of the input value
|
protected |
Input logic that handles mapping of input actions to zoom functions.
|
protected |
Collection of available zoom magnification levels.
|
protected |
Current index into the zoom levels array.