VR-Engage  2.3
Loading...
Searching...
No Matches
makVre::DtBinocularsZoomOverlay Class Reference

Detailed Description

DtBinocularsZoomOverlay extends the basic binoculars overlay with functionality specific to maximum zoom level indication. The overlay is only visible when the binoculars are at their maximum zoom level, providing a visual indication to the user that they cannot zoom in any further. It inherits core functionality from the DtBinocularsOverlay class.

#include <vreBinocularsZoomOverlay.h>

Inheritance diagram for makVre::DtBinocularsZoomOverlay:
[legend]

Public Member Functions

 DtBinocularsZoomOverlay ()
 
virtual ~DtBinocularsZoomOverlay () override
 
virtual bool initialize (makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
 
virtual bool postInitialize () override
 
virtual void tick (double dt) override
 
virtual bool isOverlayVisible () override
 
virtual const char * type () const override
 
- Public Member Functions inherited from makVre::DtBinocularsOverlay
 DtBinocularsOverlay (const std::string &className="DtBinocularsOverlay")
 
virtual ~DtBinocularsOverlay () override
 
virtual void shutdown () override
 
void setReticleHeight (float height)
 
- Public Member Functions inherited from makVre::DtQtQuickOverlay
 DtQtQuickOverlay ()
 
virtual ~DtQtQuickOverlay () override
 
virtual void setRoot (QQuickItem *root)
 
virtual void initdoc (QQuickItem *root)
 
virtual DtVreMessageResult handleEnterPlayerState (DtVreMessage *msg)
 
virtual DtVreMessageResult handleExitPlayerState (DtVreMessage *msg)
 
virtual void setVisibility (bool visible)
 
virtual bool isVisible ()
 
virtual void setMenuState (bool on)
 
- Public Member Functions inherited from makVre::DtPlayerComponent
 DtPlayerComponent ()
 
virtual ~DtPlayerComponent ()
 
bool componentReady () const
 
void setComponentReady (bool ready)
 
virtual DtInitTickStatus finalizeInitTick (double dt)
 
virtual void setName (const std::string &name)
 
virtual const std::string & name ()
 
virtual DtPlayerStation & player ()
 
virtual DtAttributeHandle & playerAttributeStore ()
 
virtual const DtAttributeHandle & playerAttributeStore () const
 
virtual const DtAttributeHandle & ownshipState () const
 
virtual void setExtendedData (const std::string &key, const std::string &value, DtEntityIdentifier entity=DtEntityIdentifier::nullId())
 

Protected Attributes

DtAttributeHandleType< double > myViewMagnificationAttr
 
DtAttributeHandleType< double > myMaxViewMagnificationAttr
 
- Protected Attributes inherited from makVre::DtBinocularsOverlay
float myReticleTotalMils
 
bool myUsePostEffect
 
makVrv::DtOsgChannel * myChannel
 
makVre::DtInitTable myConfig
 
DtAttributeHandleType< double > myHealthAttr
 
DtAttributeHandleType< ObserverAttachMode > myObserverAttachModeAttr
 
DtAttributeHandleType< HumanPosture > myPostureAttr
 
DtAttributeHandleType< Equipment > myCurrentEquipmentAttr
 
DtAttributeHandleType< LauncherState > myLauncherStateAttr
 
DtAttributeHandleType< bool > myAimingAttr
 
- Protected Attributes inherited from makVre::DtQtQuickOverlay
DtInitTable myBindQmlPropertyToAttribute
 
QQuickItem * myRoot
 
std::string myTargetWindow
 
std::vector< Connection > myConnections
 
std::string myQmlFile
 
std::string myQmlDataItemName
 
bool myIsInMenuState
 
bool myCachedVisibility
 
DtAttributeHandleType< bool > myVisibilityAttribute
 
bool myRenderOverlayOnly
 
bool myWantSceneHidden
 
makVrv::DtOsgChannel * myChannel
 
makVrv::DtObserverObject * myObserver
 
QObject myQObject
 
bool myHasTickFunction
 
bool myShowInMenus = false
 
- Protected Attributes inherited from makVre::DtPlayerComponent
bool myComponentReady = true
 
std::string myName
 
DtInitTable myConfig
 
DtPlayerStation * myPlayer
 
makVrv::DtDe * myDe
 
DtEntityResolver * myResolver
 
DtAttributeCallbackManager myAttributeCallbacks
 
DtVreMessageHandlerGroup myMessageHandlers
 

Additional Inherited Members

- Protected Member Functions inherited from makVre::DtBinocularsOverlay
virtual void computeReticleDimensions ()
 
virtual void slot_channelConfigurationModified (const std::string &deName, const std::string &winName, const std::string &oldChannelName, const makVrv::DtChannelConfiguration &config)
 
virtual void slot_channelDestroyed (makVrv::DtChannelManager *channelManager, makVrv::DtChannel *channel)
 
- Protected Member Functions inherited from makVre::DtQtQuickOverlay
virtual void updateVals (double dt)
 
virtual void disconnect ()
 
virtual bool buildConnections (DtInitTable &connections)
 
virtual void onVisibilityAttributeChanged (bool on)
 
virtual void removeModelSetAndSkyFromChannel ()
 
virtual void restoreModelSetAndSkyToChannel ()
 
- Protected Member Functions inherited from makVre::DtPlayerComponent
virtual void initializeStateAttributes ()
 

Constructor & Destructor Documentation

◆ DtBinocularsZoomOverlay()

makVre::DtBinocularsZoomOverlay::DtBinocularsZoomOverlay ( )

Constructor for DtBinocularsZoomOverlay.

Initializes the component with default settings

◆ ~DtBinocularsZoomOverlay()

virtual makVre::DtBinocularsZoomOverlay::~DtBinocularsZoomOverlay ( )
overridevirtual

Virtual destructor for DtBinocularsZoomOverlay.

Member Function Documentation

◆ initialize()

virtual bool makVre::DtBinocularsZoomOverlay::initialize ( makVre::DtPlayerStation * player,
makVre::DtInitTable & config )
overridevirtual

Initializes the binoculars zoom overlay component.

Parameters
playerPointer to the player station this component belongs to
configConfiguration table containing overlay settings
Returns
True if initialization succeeded, false otherwise

Forwards initialization to the base class and performs any specialized setup

Reimplemented from makVre::DtBinocularsOverlay.

References makVre::DtPlayerComponent::player().

◆ postInitialize()

virtual bool makVre::DtBinocularsZoomOverlay::postInitialize ( )
overridevirtual

Performs post-initialization after all components are initialized.

Returns
True if post-initialization succeeded, false otherwise

Completes initialization by calling the base class post-initialize

Reimplemented from makVre::DtBinocularsOverlay.

◆ tick()

virtual void makVre::DtBinocularsZoomOverlay::tick ( double dt)
overridevirtual

Called every frame to update the overlay state.

Parameters
dtDelta time since the last frame in seconds

Updates overlay visibility and other state based on current zoom level

Reimplemented from makVre::DtBinocularsOverlay.

◆ isOverlayVisible()

virtual bool makVre::DtBinocularsZoomOverlay::isOverlayVisible ( )
overridevirtual

Determines if the zoom overlay should be visible.

Returns
True if the overlay should be visible, false otherwise

Checks if base binoculars overlay is visible and if the current view magnification is at the maximum allowed value

Reimplemented from makVre::DtBinocularsOverlay.

◆ type()

virtual const char * makVre::DtBinocularsZoomOverlay::type ( ) const
overridevirtual

Returns the type identifier for this component.

Returns
The type string for DtBinocularsZoomOverlay

Reimplemented from makVre::DtBinocularsOverlay.

Member Data Documentation

◆ myViewMagnificationAttr

DtAttributeHandleType<double> makVre::DtBinocularsZoomOverlay::myViewMagnificationAttr
protected

Handle for current binocular magnification.

Attribute Store KeyviewMagnification

◆ myMaxViewMagnificationAttr

DtAttributeHandleType<double> makVre::DtBinocularsZoomOverlay::myMaxViewMagnificationAttr
protected

Handle for maximum binocular magnification.

Attribute Store KeymaxViewMagnification

The documentation for this class was generated from the following file: