H3D API  2.4.1
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
H3D::H3DNavigation Class Reference

H3DNavigation is a class used for navigation in H3DAPI. More...

#include <H3D/H3DNavigation.h>

Public Member Functions

 H3DNavigation ()
 Constructor.
 
 ~H3DNavigation ()
 Destructor.
 
void doNavigation (string navigation_type, X3DViewpointNode *vp, X3DChildNode *topNode, bool detect_collision, const vector< H3DFloat > &avatar_size, H3DFloat speed, const vector< string > &transition_type, H3DTime transition_time)
 Does navigation for different navigation modes.
 
X3DViewpointNodeviewpointToUse (X3DViewpointNode *potential_vp)
 Compares the given X3DViewpointNode to the X3DViewpointNode used by the NavigationInfo. More...
 
void leftButtonUpdate (bool _left_button)
 Called when left button has changed.
 
void motionUpdate (int x, int y)
 Called for each movement change.
 
void scrollWheelUpdate (bool up)
 Called when scroll wheel updates.
 

Static Public Member Functions

static void disableDevice (int device)
 Use values in the enum NavigationDevices to disable a certain device.
 
static void enableDevice (int device)
 Use values in the enum NavigationDevices to enable a certain device.
 
static X3DViewpointNodeviewpointToUse (X3DViewpointNode *potential_vp, int nav_index)
 Same as the non-static version but can be used to give an index from the list instead. More...
 

Protected Attributes

H3DUniquePtr< MouseNavigationmouse_nav
 Devices which it is possible to use for navigation.
 

Detailed Description

H3DNavigation is a class used for navigation in H3DAPI.

By default navigation can be done with mouse and keyboard. Each H3DWindowNode should have a H3DNavigation instance.

Member Function Documentation

◆ viewpointToUse() [1/2]

X3DViewpointNode* H3D::H3DNavigation::viewpointToUse ( X3DViewpointNode potential_vp)
inline

Compares the given X3DViewpointNode to the X3DViewpointNode used by the NavigationInfo.

Used in order to make sure that the same viewpoint is used for graphics and haptics when a NavigationInfo is in use.

Referenced by H3D::H3DWindowNode::render(), H3D::H3DHapticsDevice::updateDeviceValues(), and viewpointToUse().

◆ viewpointToUse() [2/2]

X3DViewpointNode * H3DNavigation::viewpointToUse ( X3DViewpointNode potential_vp,
int  nav_index 
)
static

Same as the non-static version but can be used to give an index from the list instead.

Used in order to call viewpointToUse from nodes that does not actually know which window they belong to, or which does not belong to any window, such as H3DHapticsDevice.

References viewpointToUse().


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