SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::gui::GLPickHandler Class Reference

#include <GLPickHandler.h>

Inheritance diagram for sofa::gui::GLPickHandler:

Protected Attributes

bool _fboAllocated
 
sofa::helper::gl::FrameBufferObject _fbo
 
sofa::helper::gl::fboParameters _fboParams
 
- Protected Attributes inherited from sofa::gui::PickHandler
bool interactorInUse
 
MOUSE_STATUS mouseStatus
 
MOUSE_BUTTON mouseButton
 
Node::SPtr mouseNode
 
MouseContainer::SPtr mouseContainer
 
MouseCollisionModel::SPtr mouseCollision
 
MousePosition mousePosition
 
ComponentMouseInteractioninteraction
 
std::vector< ComponentMouseInteraction * > instanceComponents
 
BodyPicked lastPicked
 
bool useCollisions
 
helper::fixed_array< Operation *, NONEoperations
 
helper::vector< CallBackPicker * > callbacks
 
CallBackRenderrenderCallback
 
PickingMethod pickingMethod
 
double m_defaultLength
 Default length of the ray. Set by constructor. More...
 

Public Member Functions

 GLPickHandler (double defaultLength=1000000)
 
virtual ~GLPickHandler () override
 
void allocateSelectionBuffer (int width, int height) override
 
void destroySelectionBuffer () override
 
BodyPicked findCollisionUsingColourCoding (const defaulttype::Vector3 &origin, const defaulttype::Vector3 &direction) override
 
- Public Member Functions inherited from sofa::gui::PickHandler
 PickHandler (double defaultLength=1000000)
 
virtual ~PickHandler ()
 
void activateRay (int width, int height, core::objectmodel::BaseNode *root)
 
void deactivateRay ()
 
void setPickingMethod (PickingMethod method)
 
bool useSelectionBufferMethod () const
 
void updateRay (const sofa::defaulttype::Vector3 &position, const sofa::defaulttype::Vector3 &orientation)
 
void handleMouseEvent (MOUSE_STATUS status, MOUSE_BUTTON button)
 
void init (core::objectmodel::BaseNode *root)
 
void reset ()
 
void unload ()
 
void setColourRenderCallback (CallBackRender *colourRender)
 
void updateMouse2D (MousePosition mouse)
 
OperationgetOperation (MOUSE_BUTTON button)
 
OperationchangeOperation (sofa::component::configurationsetting::MouseButtonSetting *setting)
 
OperationchangeOperation (MOUSE_BUTTON button, const std::string &op)
 
void addCallBack (CallBackPicker *c)
 
helper::vector< CallBackPicker * > getCallBackPicker ()
 
void clearCallBacks ()
 
ComponentMouseInteractiongetInteraction ()
 
BodyPickedgetLastPicked ()
 

Additional Inherited Members

- Static Public Member Functions inherited from sofa::gui::PickHandler
static BodyPicked findCollisionUsingBruteForce (const defaulttype::Vector3 &origin, const defaulttype::Vector3 &direction, double maxLength, core::objectmodel::BaseNode *root)
 
- Protected Member Functions inherited from sofa::gui::PickHandler
virtual BodyPicked findCollision ()
 
BodyPicked findCollisionUsingPipeline ()
 
BodyPicked findCollisionUsingBruteForce ()
 
BodyPicked findCollisionUsingColourCoding ()
 
bool needToCastRay ()
 
void setCompatibleInteractor ()
 

Attribute details

sofa::helper::gl::FrameBufferObject sofa::gui::GLPickHandler::_fbo
protected
bool sofa::gui::GLPickHandler::_fboAllocated
protected
sofa::helper::gl::fboParameters sofa::gui::GLPickHandler::_fboParams
protected

Constructor details

sofa::gui::GLPickHandler::GLPickHandler ( double  defaultLength = 1000000)
sofa::gui::GLPickHandler::~GLPickHandler ( )
overridevirtual

Function details

void sofa::gui::GLPickHandler::allocateSelectionBuffer ( int  width,
int  height 
)
overridevirtual

Reimplemented from sofa::gui::PickHandler.

void sofa::gui::GLPickHandler::destroySelectionBuffer ( )
overridevirtual

Reimplemented from sofa::gui::PickHandler.

component::collision::BodyPicked sofa::gui::GLPickHandler::findCollisionUsingColourCoding ( const defaulttype::Vector3 &  origin,
const defaulttype::Vector3 &  direction 
)
overridevirtual

Reimplemented from sofa::gui::PickHandler.

Enum details

Enumerator
RAY_CASTING 
SELECTION_BUFFER