31 #include <boost/thread.hpp>
33 #include "../common/math/linearAlgebra/WPosition.h"
34 #include "WGEViewer.h"
35 #include "WPickHandler.h"
127 void setX(
float x );
133 void setY(
float y );
139 void setZ(
float z );
Encapsulates info for pick action.
This only is a 3d double vector.
A sphere representing a region of interest.
bool m_lockX
flag indicatin wether the movement of the sphere is restricted
virtual ~WROISphere()
standard destructor
void redrawSphere()
removes the old drawable from the osg geode and adds a new one at the current position and size
osg::Vec4 m_notColor
the color of the box when negated
virtual void updateGFX()
updates the graphics
WVector3d m_pickNormal
Store the normal that occured when the pick action was started.
static size_t maxSphereId
Current maximum boxId over all spheres.
void setLockY(bool value=true)
sets the flag that allows or disallows movement along the y axis
osg::Vec4 m_color
the color of the box
void setLockVector(WVector3d vector)
setter
WPosition getPosition() const
getter
WPosition m_pickedPosition
Caches the old picked position to a allow for comparison.
void registerRedrawRequest(WPickInfo pickInfo)
note that there was a pick
WVector3d m_lockVector
stores the lock vector
void setPosition(WPosition position)
setter
void setLockZ(bool value=true)
sets the flag that allows or disallows movement along the z axis
std::shared_ptr< WGEViewer > m_viewer
makes viewer available all over this class.
void setLockOnVector(bool value=true)
setter
bool m_lockZ
flag indicatin wether the movement of the sphere is restricted
bool m_isPicked
Indicates whether the box is currently picked or not.
float m_radius
The radius of the sphere.
void setLockX(bool value=true)
sets the flag that allows or disallows movement along the x axis
WPickInfo m_pickInfo
Stores the pick information for potential redraw.
size_t sphereId
Id of the current sphere.
WPosition m_position
The position of the sphere.
bool m_lockOnVector
flag indicatin wether the movement of the sphere is restricted
void setNotColor(osg::Vec4 color)
Setter for color in negated state.
bool m_lockY
flag indicatin wether the movement of the sphere is restricted
WROISphere(WPosition position, float radius=5.0)
Yields sphere with desired center point and radius.
WVector2d m_oldPixelPosition
Caches the old picked position to a allow for cmoparison.
void moveSphere(WVector3d offset)
move the sphere with a given offset
WVector3d m_lockPoint
stores to point of origin of the lock vector
WPosition m_originalPosition
The position of the sphere when created, used for locking.
void setColor(osg::Vec4 color)
Setter for standard color.
Superclass for different ROI (region of interest) types.