VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
VAPoR::Manip Class Referenceabstract

A class that supports manipulators in in a VAPOR Visualizer. More...

#include <Manip.h>

Inheritance diagram for VAPoR::Manip:
VAPoR::TranslateStretchManip

Public Member Functions

 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
 

Protected Member Functions

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
 

Protected Attributes

GLManager_glManager
 
int _buttonNum
 
int _selectedHandle
 
double _dragDistance
 
double _handleMid [3]
 
double _selection [6]
 
double _extents [6]
 
double _cameraPosition [3]
 

Static Protected Attributes

static const float _faceSelectionColor [4]
 
static const float _unselectedFaceColor [4]
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Manip()

VAPoR::Manip::Manip ( GLManager glManager)
inline

Definition at line 51 of file Manip.h.

◆ ~Manip()

virtual VAPoR::Manip::~Manip ( )
inlinevirtual

Definition at line 52 of file Manip.h.

Member Function Documentation

◆ _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]isSelectedindicates 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]mousecoordinates in screen
[out]handleMidis 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]screenCoordsis a pixel location on the visualizer window
[in]handleMidpointis 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

Pure virtual function renders the geometry of the Manip.

Implemented in VAPoR::TranslateStretchManip.

◆ 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]rpTransformThe current scene transform used by the current RenderParams
[in]dmTransformThe current scene transform used by the current DataMgr
[in]constrainIndicates whether the manipulator box is bound by domain extents

Implemented in VAPoR::TranslateStretchManip.

Member Data Documentation

◆ _buttonNum

int VAPoR::Manip::_buttonNum
protected

Definition at line 126 of file Manip.h.

◆ _cameraPosition

double VAPoR::Manip::_cameraPosition[3]
protected

Definition at line 132 of file Manip.h.

◆ _dragDistance

double VAPoR::Manip::_dragDistance
protected

Definition at line 128 of file Manip.h.

◆ _extents

double VAPoR::Manip::_extents[6]
protected

Definition at line 131 of file Manip.h.

◆ _faceSelectionColor

const float VAPoR::Manip::_faceSelectionColor[4]
staticprotected

Definition at line 133 of file Manip.h.

◆ _glManager

GLManager* VAPoR::Manip::_glManager
protected

Definition at line 125 of file Manip.h.

◆ _handleMid

double VAPoR::Manip::_handleMid[3]
protected

Definition at line 129 of file Manip.h.

◆ _selectedHandle

int VAPoR::Manip::_selectedHandle
protected

Definition at line 127 of file Manip.h.

◆ _selection

double VAPoR::Manip::_selection[6]
protected

Definition at line 130 of file Manip.h.

◆ _unselectedFaceColor

const float VAPoR::Manip::_unselectedFaceColor[4]
staticprotected

Definition at line 134 of file Manip.h.


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