# MouseWheelOperator

class MouseWheelOperator : public HPS::Operator

  Public Types

  enum class ZoomType

    Values:

    enumerator Fast

      The operator optimizes for time. It is possible to zoom through geometry.

    enumerator Accurate

      The operator optimizes zooming so that it is not possible to zoom through geometry.

  Public Functions

  inline virtual HPS::UTF8 GetName() const

    Returns the name of the Operator.

  MouseWheelOperator(ZoomType in_default_type = ZoomType::Accurate, HPS::ModifierKeys in_alternate_type_modifiers = HPS::ModifierKeys::KeyControl())

    Constructor for MouseWheelOperator

    Parameters:

      - in_default_type – The default zoom type for this operator.

      - in_alternate_type_modifiers – The modifier button that, when pressed, will activate the zoom type opposite to that specified in in_default_type. Passing an empty ModifierKey object prevents the zoom type from being anything but what was specified in in_default_type.

  virtual void OnModelAttached()

    This function is called whenever a model is attached to the view that is attached to this operator. If no view is attached to this operator, this function will not be called.

  virtual bool OnMouseWheel(HPS::MouseState const &in_state)

    This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled.

    Parameters:

      in_state – A MouseState object describing the current mouse state.

    Returns:

      true if the input event was handled, false otherwise.

  virtual void OnViewAttached(HPS::View const &in_attached_view)

    This function is called whenever a view is attached to this operator.

    Parameters:

      in_attached_view – The view attached to this operator.

  void UpdateZoomLimit()

    Call when scene bounds changes to update the mouse wheel zoom limit

Hello I'm HOOPSY!

HOOPSY BETA

Hello I am HOOPSY! your Docs generative AI assistant.

Ask me anything about HOOPS Visualize HPS or choose a sample question below to start a conversation:

Additional info

HOOPSY may store chats to provide and maintain the service according to OpenAI's data policy.

This feature is currently experimental. While we are continually enhancing its performance and quality, the underlying AI model may generate inaccurate or fabricated responses, especially if prompted to do so.

New Conversation
Continue generating