A class that supports manipulators in in a VAPOR Visualizer.
More...
#include <Manip.h>
|
| Manip (GLManager *glManager) |
|
virtual | ~Manip () |
|
virtual void | Render ()=0 |
| Pure virtual function renders the geometry of the Manip.
|
|
virtual void | Update (std::vector< double > llc, std::vector< double > urc, std::vector< double > minExtents, std::vector< double > maxExtents, VAPoR::Transform *rpTransform, VAPoR::Transform *dmTransform, bool constrain)=0 |
|
virtual bool | MouseEvent (int buttonNum, std::vector< double > screenCoords, double handleMidpoint[3], bool release=false)=0 |
|
virtual void | GetBox (std::vector< double > &llc, std::vector< double > &urc) const =0 |
|
|
virtual int | _mouseIsOverHandle (const double screenCoords[2], double handleMid[3]) const =0 |
|
void | _drawCubeFaces (double *extents, bool isSelected) |
|
virtual void | _mousePress (double screenCoords[2], double handleMidpoint[3], int buttonNum)=0 |
|
virtual void | _mouseDrag (double screenCoords[2], double handleMidpoint[3])=0 |
|
virtual void | _mouseRelease (double screenCoords[2])=0 |
| param[in] screenCoords - coordinates of the cursor upon mose release
|
|
virtual void | _stretchCorners (double corners[8][3]) const =0 |
|
A class that supports manipulators in in a VAPOR Visualizer.
- Author
- Alan Norton, Scott Pearse
- Version
- 3.0
- Date
- July 2015, June 2018
Manip class is a pure virtual class that supports manipulators in the VAPOR Visualizer scene
Definition at line 49 of file Manip.h.
◆ Manip()
◆ ~Manip()
virtual VAPoR::Manip::~Manip |
( |
| ) |
|
|
inlinevirtual |
◆ _drawCubeFaces()
void VAPoR::Manip::_drawCubeFaces |
( |
double * |
extents, |
|
|
bool |
isSelected |
|
) |
| |
|
protected |
General utility function for drawing axis-aligned cubes.
- Parameters
-
[in] | extents | : extents of box to be drawn |
[in] | isSelected | indicates if this box is to be drawn with the selection color or not |
◆ _mouseDrag()
virtual void VAPoR::Manip::_mouseDrag |
( |
double |
screenCoords[2], |
|
|
double |
handleMidpoint[3] |
|
) |
| |
|
protectedpure virtual |
Handles logic for moving a handle while a mouse button is held down. param[in] screenCoords is the current position of the mouse cursor param[in] handleMidpoint is the center of the handle being moved
◆ _mouseIsOverHandle()
virtual int VAPoR::Manip::_mouseIsOverHandle |
( |
const double |
screenCoords[2], |
|
|
double |
handleMid[3] |
|
) |
| const |
|
protectedpure virtual |
Pure virtual method: Determine which handle (if any) is under mouse
- Parameters
-
[in] | mouse | coordinates in screen |
[out] | handleMid | is the coordinates of the center of the selected handle (if selected). |
- Returns
- handle index, or -1 if no intersection
◆ _mousePress()
virtual void VAPoR::Manip::_mousePress |
( |
double |
screenCoords[2], |
|
|
double |
handleMidpoint[3], |
|
|
int |
buttonNum |
|
) |
| |
|
protectedpure virtual |
Handles logic for a mouse-press event on one of the manip handles
- Parameters
-
[in] | screenCoords | is a pixel location on the visualizer window |
[in] | handleMidpoint | is the center of a handle to test that gets tested against the screenCoords array. |
param[in] buttonNum is the button of the mouse that is clicked, which determines whether we are moving or stretching the manipulator.
◆ _mouseRelease()
virtual void VAPoR::Manip::_mouseRelease |
( |
double |
screenCoords[2] | ) |
|
|
protectedpure virtual |
param[in] screenCoords - coordinates of the cursor upon mose release
Handles logic to set the current extents of the manipulator, held in the _selection array
◆ _stretchCorners()
virtual void VAPoR::Manip::_stretchCorners |
( |
double |
corners[8][3] | ) |
const |
|
protectedpure virtual |
Adjust the corners of the manipulator extents according to _dragDistance param[in] corners describes the bounding box of the manipulator
◆ GetBox()
virtual void VAPoR::Manip::GetBox |
( |
std::vector< double > & |
llc, |
|
|
std::vector< double > & |
urc |
|
) |
| const |
|
pure virtual |
Method to retrieve the manipulator's current extents
- Parameters
-
[out] | llc | - The lower-left coordinates of the manipulator |
[out] | urc | - The upper-right coordinates of the manipulator |
Implemented in VAPoR::TranslateStretchManip.
◆ MouseEvent()
virtual bool VAPoR::Manip::MouseEvent |
( |
int |
buttonNum, |
|
|
std::vector< double > |
screenCoords, |
|
|
double |
handleMidpoint[3], |
|
|
bool |
release = false |
|
) |
| |
|
pure virtual |
Notify that manipulator that is being moved with the mouse
- Parameters
-
[in] | buttonNum | - The mouse button being used to move the manipulator |
[in] | screenCoords | - The current coordinates of the mouse cursor |
Implemented in VAPoR::TranslateStretchManip.
◆ Render()
virtual void VAPoR::Manip::Render |
( |
| ) |
|
|
pure virtual |
◆ Update()
virtual void VAPoR::Manip::Update |
( |
std::vector< double > |
llc, |
|
|
std::vector< double > |
urc, |
|
|
std::vector< double > |
minExtents, |
|
|
std::vector< double > |
maxExtents, |
|
|
VAPoR::Transform * |
rpTransform, |
|
|
VAPoR::Transform * |
dmTransform, |
|
|
bool |
constrain |
|
) |
| |
|
pure virtual |
Update the box manipulator's extents
- Parameters
-
[in] | llc | : The lower-left corner to update the manipulator with |
[in] | urc | : The upper-right corner to update the manipulator with |
[in] | minExtents | : The minimum extents that the manipulator can draw to |
[in] | maxExtents | : The maximum extents that the manipulator can draw to |
[in] | rpTransform | The current scene transform used by the current RenderParams |
[in] | dmTransform | The current scene transform used by the current DataMgr |
[in] | constrain | Indicates whether the manipulator box is bound by domain extents |
Implemented in VAPoR::TranslateStretchManip.
◆ _buttonNum
int VAPoR::Manip::_buttonNum |
|
protected |
◆ _cameraPosition
double VAPoR::Manip::_cameraPosition[3] |
|
protected |
◆ _dragDistance
double VAPoR::Manip::_dragDistance |
|
protected |
◆ _extents
double VAPoR::Manip::_extents[6] |
|
protected |
◆ _faceSelectionColor
const float VAPoR::Manip::_faceSelectionColor[4] |
|
staticprotected |
◆ _glManager
◆ _handleMid
double VAPoR::Manip::_handleMid[3] |
|
protected |
◆ _selectedHandle
int VAPoR::Manip::_selectedHandle |
|
protected |
◆ _selection
double VAPoR::Manip::_selection[6] |
|
protected |
◆ _unselectedFaceColor
const float VAPoR::Manip::_unselectedFaceColor[4] |
|
staticprotected |
The documentation for this class was generated from the following file:
- /Users/pearse/VAPOR/apps/vaporgui/Manip.h