DART 6.13.2
Loading...
Searching...
No Matches
dart::gui::osg Namespace Reference

Namespaces

namespace  detail
 
namespace  render
 
namespace  sfs_dnd
 

Classes

class  AboutWidget
 
class  BodyNodeDnD
 
class  DefaultEventHandler
 
class  DragAndDrop
 DragAndDrop is a class that facilitates enabling various kinds of dart Entities to be dragged and dropped in an dart::gui::osg environment. More...
 
class  GridVisual
 Attach this to a Viewer in order to visualize grid. More...
 
struct  ImGuiDrawCallback
 
class  ImGuiHandler
 
struct  ImGuiNewFrameCallback
 
class  ImGuiViewer
 
class  ImGuiWidget
 
class  InteractiveFrame
 
class  InteractiveFrameDnD
 
class  InteractiveFrameMouseEvent
 
class  InteractiveTool
 
class  InteractiveToolDnD
 
class  MouseEventHandler
 
struct  PickInfo
 
class  RealTimeWorldNode
 
class  SaveScreen
 
class  ShapeFrameNode
 
class  SimpleFrameDnD
 SimpleFrameDnD is a DragAndDrop implementation for SimpleFrame objects. More...
 
class  SimpleFrameShapeDnD
 SimpleFrameShapeDnD is a version of SimpleFrameDnD that allows a specific Shape within the SimpleFrame to be dragged and dropped (although it will carry the entire SimpleFrame with it) More...
 
class  SupportPolygonVisual
 Attach this to a Viewer in order to visualize the support polygon of a Skeleton. More...
 
class  TrackballManipulator
 
class  Viewer
 
class  ViewerAttachment
 
class  ViewerAttachmentCallback
 
class  WorldNode
 WorldNode class encapsulates a World to be displayed in OpenSceneGraph. More...
 
class  WorldNodeCallback
 

Typedefs

typedef std::shared_ptr< InteractiveFrameInteractiveFramePtr
 

Enumerations

enum  MouseButton { LEFT_MOUSE = 0 , RIGHT_MOUSE , MIDDLE_MOUSE , NUM_MOUSE_BUTTONS }
 
enum  MouseButtonEvent { BUTTON_PUSH = 0 , BUTTON_DRAG , BUTTON_RELEASE , BUTTON_NOTHING }
 
enum  ConstraintType {
  UNCONSTRAINED = 0 , LINE_CONSTRAINT , PLANE_CONSTRAINT , CUSTOM_CONSTRAINT ,
  NUM_CONSTRAINT_TYPES
}
 
enum  ConvertedKey : int {
  ConvertedKey_Tab = 257 , ConvertedKey_Left , ConvertedKey_Right , ConvertedKey_Up ,
  ConvertedKey_Down , ConvertedKey_PageUp , ConvertedKey_PageDown , ConvertedKey_Home ,
  ConvertedKey_End , ConvertedKey_Delete , ConvertedKey_BackSpace , ConvertedKey_Enter ,
  ConvertedKey_Escape , ConvertedKey_LeftControl , ConvertedKey_RightControl , ConvertedKey_LeftShift ,
  ConvertedKey_RightShift , ConvertedKey_LeftAlt , ConvertedKey_RightAlt , ConvertedKey_LeftSuper ,
  ConvertedKey_RightSuper
}
 
enum class  CameraMode { RGBA , DEPTH }
 Camera mode. More...
 

Functions

static bool wasActive (MouseButtonEvent event)
 
static void assignEventToButtons (MouseButtonEvent(&mLastButtonEvent)[NUM_MOUSE_BUTTONS], const ::osgGA::GUIEventAdapter &ea)
 
template<typename T >
constexpr T getAlphaThreshold ()
 Returns the alpha threshold for demining if the object is a transparent object or not.
 
template<typename Scalar >
::osg::Matrix eigToOsgMatrix (const Eigen::Transform< Scalar, 3, Eigen::Isometry > &tf)
 Converts Eigen::Isometry to osg::Matrix.
 
template<typename Derived >
::osg::Matrix eigToOsgMatrix (const Eigen::DenseBase< Derived > &M)
 Converts Eigen::DenseBase to osg::Matrix.
 
template<typename Derived >
::osg::Vec3f eigToOsgVec3f (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec3f.
 
template<typename Derived >
::osg::Vec3d eigToOsgVec3d (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec3d.
 
template<typename Derived >
std::conditional< std::is_same< typenameDerived::Scalar, float >::value,::osg::Vec3f,::osg::Vec3d >::type eigToOsgVec3 (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec3f or osg::Vec3d based on the scalar type.
 
template<typename Derived >
::osg::Vec4f eigToOsgVec4f (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec4f.
 
template<typename Derived >
::osg::Vec4d eigToOsgVec4d (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec4d.
 
template<typename Derived >
std::conditional< std::is_same< typename Derived::Scalar, float >::value, ::osg::Vec4f, ::osg::Vec4d > eigToOsgVec4 (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec4f or osg::Vec4d based on the scalar type.
 
::osg::Vec3 toVec3 (const Eigen::Vector3d &point)
 
void setVertices (::osg::Vec3Array *axisLineVertices, ::osg::Vec3Array *majorLineVertices, ::osg::Vec3Array *minorLineVertices, std::size_t numCells, std::size_t numMinorLinesPerMajorLine, float stepSize, GridVisual::PlaneType planeType, const Eigen::Vector3d &offset)
 
int convertFromOSGKey (int key)
 
static void warnAboutUnsuccessfulCast (const std::string &shapeType, const std::string &entityName)
 
Eigen::Vector3f osgToEigVec3 (const ::osg::Vec3f &vec)
 Converts osg::Vec3f to Eigen::Vector3f.
 
Eigen::Vector3d osgToEigVec3 (const ::osg::Vec3d &vec)
 Converts osg::Vec3d to Eigen::Vector3d.
 
Eigen::Vector4f osgToEigVec4 (const ::osg::Vec4f &vec)
 Converts osg::Vec4f to Eigen::Vector4f.
 
Eigen::Vector4d osgToEigVec4 (const ::osg::Vec4d &vec)
 Converts osg::Vec4d to Eigen::Vector4d.
 
::osg::Camera * createRttCamera (::osg::Camera::BufferComponent buffer, ::osg::Texture *tex, bool isAbsolute=false)
 Create a Render-To-Texture (RTT) camera.
 
::osg::Camera * createHudCamera (double left=0, double right=1, double bottom=0, double top=1)
 Creates a head-up display (HUD) camera that renders on the top after the main scene is drawn, which is generally used for heads-up display.
 
::osg::Geode * createScreenQuad (float width, float height, float scale=1.0f)
 Creates a osg::Geode of quad shape.
 
std::string toString (CameraMode mode)
 
static sfs_dnd::iterator getSimpleFrameShapeDnDFromMultimap (dart::dynamics::SimpleFrame *_frame, dart::dynamics::Shape *_shape, std::multimap< dart::dynamics::Shape *, SimpleFrameShapeDnD * > &map)
 

Typedef Documentation

◆ InteractiveFramePtr

Enumeration Type Documentation

◆ CameraMode

enum class dart::gui::osg::CameraMode
strong

Camera mode.

Enumerator
RGBA 

To render the RGBA color.

DEPTH 

To render the depth buffer.

Warning
The DEPTH mode currently not compatible with the ImGui widgets.

◆ ConstraintType

Enumerator
UNCONSTRAINED 
LINE_CONSTRAINT 
PLANE_CONSTRAINT 
CUSTOM_CONSTRAINT 
NUM_CONSTRAINT_TYPES 

◆ ConvertedKey

Enumerator
ConvertedKey_Tab 
ConvertedKey_Left 
ConvertedKey_Right 
ConvertedKey_Up 
ConvertedKey_Down 
ConvertedKey_PageUp 
ConvertedKey_PageDown 
ConvertedKey_Home 
ConvertedKey_End 
ConvertedKey_Delete 
ConvertedKey_BackSpace 
ConvertedKey_Enter 
ConvertedKey_Escape 
ConvertedKey_LeftControl 
ConvertedKey_RightControl 
ConvertedKey_LeftShift 
ConvertedKey_RightShift 
ConvertedKey_LeftAlt 
ConvertedKey_RightAlt 
ConvertedKey_LeftSuper 
ConvertedKey_RightSuper 

◆ MouseButton

Enumerator
LEFT_MOUSE 
RIGHT_MOUSE 
MIDDLE_MOUSE 
NUM_MOUSE_BUTTONS 

◆ MouseButtonEvent

Enumerator
BUTTON_PUSH 
BUTTON_DRAG 
BUTTON_RELEASE 
BUTTON_NOTHING 

Function Documentation

◆ assignEventToButtons()

static void dart::gui::osg::assignEventToButtons ( MouseButtonEvent(&)  mLastButtonEvent[NUM_MOUSE_BUTTONS],
const ::osgGA::GUIEventAdapter &  ea 
)
static

◆ convertFromOSGKey()

int dart::gui::osg::convertFromOSGKey ( int  key)

◆ createHudCamera()

osg::Camera * dart::gui::osg::createHudCamera ( double  left,
double  right,
double  bottom,
double  top 
)

Creates a head-up display (HUD) camera that renders on the top after the main scene is drawn, which is generally used for heads-up display.

◆ createRttCamera()

osg::Camera * dart::gui::osg::createRttCamera ( ::osg::Camera::BufferComponent  buffer,
::osg::Texture *  tex,
bool  isAbsolute 
)

Create a Render-To-Texture (RTT) camera.

◆ createScreenQuad()

osg::Geode * dart::gui::osg::createScreenQuad ( float  width,
float  height,
float  scale 
)

Creates a osg::Geode of quad shape.

◆ eigToOsgMatrix() [1/2]

template<typename Derived >
::osg::Matrix dart::gui::osg::eigToOsgMatrix ( const Eigen::DenseBase< Derived > &  M)

Converts Eigen::DenseBase to osg::Matrix.

◆ eigToOsgMatrix() [2/2]

template<typename Scalar >
::osg::Matrix dart::gui::osg::eigToOsgMatrix ( const Eigen::Transform< Scalar, 3, Eigen::Isometry > &  tf)

Converts Eigen::Isometry to osg::Matrix.

◆ eigToOsgVec3()

template<typename Derived >
std::conditional< std::is_same< typenameDerived::Scalar, float >::value,::osg::Vec3f,::osg::Vec3d >::type dart::gui::osg::eigToOsgVec3 ( const Eigen::MatrixBase< Derived > &  vec)

Converts Eigen::MatrixBase to osg::Vec3f or osg::Vec3d based on the scalar type.

◆ eigToOsgVec3d()

template<typename Derived >
::osg::Vec3d dart::gui::osg::eigToOsgVec3d ( const Eigen::MatrixBase< Derived > &  vec)

Converts Eigen::MatrixBase to osg::Vec3d.

◆ eigToOsgVec3f()

template<typename Derived >
::osg::Vec3f dart::gui::osg::eigToOsgVec3f ( const Eigen::MatrixBase< Derived > &  vec)

Converts Eigen::MatrixBase to osg::Vec3f.

◆ eigToOsgVec4()

template<typename Derived >
std::conditional< std::is_same< typename Derived::Scalar, float >::value, ::osg::Vec4f, ::osg::Vec4d > dart::gui::osg::eigToOsgVec4 ( const Eigen::MatrixBase< Derived > &  vec)

Converts Eigen::MatrixBase to osg::Vec4f or osg::Vec4d based on the scalar type.

◆ eigToOsgVec4d()

template<typename Derived >
::osg::Vec4d dart::gui::osg::eigToOsgVec4d ( const Eigen::MatrixBase< Derived > &  vec)

Converts Eigen::MatrixBase to osg::Vec4d.

◆ eigToOsgVec4f()

template<typename Derived >
::osg::Vec4f dart::gui::osg::eigToOsgVec4f ( const Eigen::MatrixBase< Derived > &  vec)

Converts Eigen::MatrixBase to osg::Vec4f.

◆ getAlphaThreshold()

template<typename T >
constexpr T dart::gui::osg::getAlphaThreshold ( )
constexpr

Returns the alpha threshold for demining if the object is a transparent object or not.

◆ getSimpleFrameShapeDnDFromMultimap()

static sfs_dnd::iterator dart::gui::osg::getSimpleFrameShapeDnDFromMultimap ( dart::dynamics::SimpleFrame _frame,
dart::dynamics::Shape _shape,
std::multimap< dart::dynamics::Shape *, SimpleFrameShapeDnD * > &  map 
)
static

◆ osgToEigVec3() [1/2]

Eigen::Vector3d dart::gui::osg::osgToEigVec3 ( const ::osg::Vec3d &  vec)

Converts osg::Vec3d to Eigen::Vector3d.

◆ osgToEigVec3() [2/2]

Eigen::Vector3f dart::gui::osg::osgToEigVec3 ( const ::osg::Vec3f &  vec)

Converts osg::Vec3f to Eigen::Vector3f.

◆ osgToEigVec4() [1/2]

Eigen::Vector4d dart::gui::osg::osgToEigVec4 ( const ::osg::Vec4d &  vec)

Converts osg::Vec4d to Eigen::Vector4d.

◆ osgToEigVec4() [2/2]

Eigen::Vector4f dart::gui::osg::osgToEigVec4 ( const ::osg::Vec4f &  vec)

Converts osg::Vec4f to Eigen::Vector4f.

◆ setVertices()

void dart::gui::osg::setVertices ( ::osg::Vec3Array *  axisLineVertices,
::osg::Vec3Array *  majorLineVertices,
::osg::Vec3Array *  minorLineVertices,
std::size_t  numCells,
std::size_t  numMinorLinesPerMajorLine,
float  stepSize,
GridVisual::PlaneType  planeType,
const Eigen::Vector3d &  offset 
)

◆ toString()

std::string dart::gui::osg::toString ( CameraMode  mode)

◆ toVec3()

::osg::Vec3 dart::gui::osg::toVec3 ( const Eigen::Vector3d &  point)

◆ warnAboutUnsuccessfulCast()

static void dart::gui::osg::warnAboutUnsuccessfulCast ( const std::string &  shapeType,
const std::string &  entityName 
)
static

◆ wasActive()

static bool dart::gui::osg::wasActive ( MouseButtonEvent  event)
static