SOFA plugin: SofaSimpleGUI  master
Open source framework for multi-physics simuation
sofa::simplegui::PickedPoint Struct Reference

#include <PickedPoint.h>

The PickedPoint struct represents a vertex of a State, typically picked using the mouse. It is returned by the Sofa interface to the user application to set up an interaction. We call it vaild if it corresponds to a valid index of an existing mechanical state, and invalid if not so (the pointer to the mechanical state is null) More...

Detailed Description

The PickedPoint struct represents a vertex of a State, typically picked using the mouse. It is returned by the Sofa interface to the user application to set up an interaction. We call it vaild if it corresponds to a valid index of an existing mechanical state, and invalid if not so (the pointer to the mechanical state is null)

Author
Francois Faure, 2014

Public Attributes

BaseMechanicalState::SPtr state
 the DOF of the picked object More...
 
nat index
 index of the particle picked More...
 
Vec3 point
 location of the picked particle in world space More...
 

Public Member Functions

 operator bool () const
 Conversion to boolean for easier test writing. True iff the PickedPoint is valid. Default value is converted to false. More...
 
 PickedPoint (BaseMechanicalState::SPtr state=0, nat index=0)
 
bool operator< (const PickedPoint &p) const
 Comparison operator used in maps. More...
 
bool operator!= (const PickedPoint &p) const
 Comparison operator used in maps. More...
 
bool operator== (const PickedPoint &p) const
 Comparison operator used in maps. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const PickedPoint p)
 

Attribute details

◆ index

nat sofa::simplegui::PickedPoint::index

index of the particle picked

◆ point

Vec3 sofa::simplegui::PickedPoint::point

location of the picked particle in world space

◆ state

BaseMechanicalState::SPtr sofa::simplegui::PickedPoint::state

the DOF of the picked object

Constructor details

◆ PickedPoint()

sofa::simplegui::PickedPoint::PickedPoint ( BaseMechanicalState::SPtr  state = 0,
nat  index = 0 
)
inline

Function details

◆ operator bool()

sofa::simplegui::PickedPoint::operator bool ( ) const
inline

Conversion to boolean for easier test writing. True iff the PickedPoint is valid. Default value is converted to false.

◆ operator!=()

bool sofa::simplegui::PickedPoint::operator!= ( const PickedPoint p) const
inline

Comparison operator used in maps.

◆ operator<()

bool sofa::simplegui::PickedPoint::operator< ( const PickedPoint p) const
inline

Comparison operator used in maps.

◆ operator==()

bool sofa::simplegui::PickedPoint::operator== ( const PickedPoint p) const
inline

Comparison operator used in maps.

Related details

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const PickedPoint  p 
)
friend