DART 6.13.2
Loading...
Searching...
No Matches
Utils.hpp File Reference
#include <Eigen/Geometry>
#include <osg/Camera>
#include <osg/Matrix>
#include "dart/gui/osg/detail/Utils-impl.hpp"

Go to the source code of this file.

Namespaces

namespace  dart
 
namespace  dart::gui
 
namespace  dart::gui::osg
 

Functions

template<typename T >
constexpr T dart::gui::osg::getAlphaThreshold ()
 Returns the alpha threshold for demining if the object is a transparent object or not.
 
template<typename Scalar >
::osg::Matrix dart::gui::osg::eigToOsgMatrix (const Eigen::Transform< Scalar, 3, Eigen::Isometry > &tf)
 Converts Eigen::Isometry to osg::Matrix.
 
template<typename Derived >
::osg::Matrix dart::gui::osg::eigToOsgMatrix (const Eigen::DenseBase< Derived > &M)
 Converts Eigen::DenseBase to osg::Matrix.
 
template<typename Derived >
::osg::Vec3f dart::gui::osg::eigToOsgVec3f (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec3f.
 
template<typename Derived >
::osg::Vec3d dart::gui::osg::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 dart::gui::osg::eigToOsgVec3 (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec3f or osg::Vec3d based on the scalar type.
 
Eigen::Vector3f dart::gui::osg::osgToEigVec3 (const ::osg::Vec3f &vec)
 Converts osg::Vec3f to Eigen::Vector3f.
 
Eigen::Vector3d dart::gui::osg::osgToEigVec3 (const ::osg::Vec3d &vec)
 Converts osg::Vec3d to Eigen::Vector3d.
 
template<typename Derived >
::osg::Vec4f dart::gui::osg::eigToOsgVec4f (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec4f.
 
template<typename Derived >
::osg::Vec4d dart::gui::osg::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 > dart::gui::osg::eigToOsgVec4 (const Eigen::MatrixBase< Derived > &vec)
 Converts Eigen::MatrixBase to osg::Vec4f or osg::Vec4d based on the scalar type.
 
Eigen::Vector4f dart::gui::osg::osgToEigVec4 (const ::osg::Vec4f &vec)
 Converts osg::Vec4f to Eigen::Vector4f.
 
Eigen::Vector4d dart::gui::osg::osgToEigVec4 (const ::osg::Vec4d &vec)
 Converts osg::Vec4d to Eigen::Vector4d.
 
::osg::Camera * dart::gui::osg::createRttCamera (::osg::Camera::BufferComponent buffer, ::osg::Texture *tex, bool isAbsolute=false)
 Create a Render-To-Texture (RTT) camera.
 
::osg::Camera * dart::gui::osg::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 * dart::gui::osg::createScreenQuad (float width, float height, float scale=1.0f)
 Creates a osg::Geode of quad shape.