|
gramods
|
Base type for camera adaptors providing means to input camera data from different scenegraph or graphics platforms. More...
#include <TouchState.hh>

Public Member Functions | |
| virtual void | init (int width, int height) |
| Called by the owner (TouchState) when eventsInit is called. | |
| virtual void | done () |
| Called by the owner (TouchState) when eventsDone is called. | |
Protected Member Functions | |
| void | setCurrentProjection (Eigen::Matrix4f WPV_inv) |
| Sets the current (inverted) projection matrix to use when back-projecting the 2D touch points into 3D. | |
Base type for camera adaptors providing means to input camera data from different scenegraph or graphics platforms.
Get the platform/library dependent adaptor by calling TouchState::getCameraAdaptor.
|
virtual |
Called by the owner (TouchState) when eventsDone is called.
|
virtual |
Called by the owner (TouchState) when eventsInit is called.
|
protected |
Sets the current (inverted) projection matrix to use when back-projecting the 2D touch points into 3D.
This can be calculated by inverting the matrix product of 1) viewport window matrix, 2) projection matrix and 3) view matrix (W*P*V)^-1, when using column vector matrices.
If the view changes changing over time, one of these methods needs to be called every frame, between calling eventsInit and eventsDone and before extrating 3D lines. If the view is static, the method needs to be called at least twice, to make the current matrix be copied to previous state.