WalkOperator

class HPS::WalkOperator : public HPS::FlyOperator

The WalkOperator class defines an operator which allows the user to accurately move the camera around the scene, while snapped to a plane. This operator is intended for walking through models that have a defined ground plane, such as a floor in a building. For models that don’t have a ground plane, Visualize will attempt to determine a ground plane heuristically. This operator works for both mouse and touch-driven devices.

Subclassed by HPS::SimpleWalkOperator

Public Types

enum Axis

Values:

enumerator X
enumerator Y
enumerator Z
enumerator Negative_X
enumerator Negative_Y
enumerator Negative_Z

Public Functions

inline HPS::Plane GetGroundPlane() const
inline virtual HPS::UTF8 GetName() const

Returns the name of the operator.

inline Axis GetPrimaryUpAxis() const
inline float GetWalkerHeight() const
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 OnTimerTick(HPS::TimerTickEvent const &in_event)

This function is called whenever HPS receives a TimerTickEvent This function moves the camera

Parameters

in_state – A TimerTickEvent object describing the current timer tick.

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.

inline void SetGroundPlane(HPS::Plane const &in_plane)
inline void SetWalkerHeight(float height)
Axis UpdatePrimaryUpAxis(HPS::Vector const &v)
WalkOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonRight(), ModifierKeys in_modifier_trigger = ModifierKeys())

Public Static Functions

static Axis GetPrimaryAxis(HPS::Vector const &v)