MIRA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
mira::OgreUtils Namespace Reference

Functions

template<typename TPoint >
Ogre::Vector3 toOgreVector (const TPoint &p)
 
template<>
Ogre::Vector3 toOgreVector< Point2f > (const Point2f &p)
 
template<>
Ogre::Vector3 toOgreVector< Point3f > (const Point3f &p)
 
template<>
Ogre::Vector3 toOgreVector< Pose2 > (const Pose2 &p)
 
template<>
Ogre::Vector3 toOgreVector< PoseCov2 > (const PoseCov2 &p)
 
template<>
Ogre::Vector3 toOgreVector< Pose3 > (const Pose3 &p)
 
template<>
Ogre::Vector3 toOgreVector< PoseCov3 > (const PoseCov3 &p)
 
template<>
Ogre::Vector3 toOgreVector< RigidTransform< double, 2 > > (const RigidTransform< double, 2 > &p)
 
template<>
Ogre::Vector3 toOgreVector< RigidTransformCov< double, 2 > > (const RigidTransformCov< double, 2 > &p)
 
template<>
Ogre::Vector3 toOgreVector< RigidTransform< double, 3 > > (const RigidTransform< double, 3 > &p)
 
template<>
Ogre::Vector3 toOgreVector< RigidTransformCov< double, 3 > > (const RigidTransformCov< double, 3 > &p)
 
template<typename ColorType >
Ogre::ColourValue toOgreColor (const ColorType &c)
 
template<>
Ogre::ColourValue toOgreColor< Color::RGB > (const Color::RGB &c)
 
template<>
Ogre::ColourValue toOgreColor< Color::RGBA > (const Color::RGBA &c)
 
MIRA_GUI_WIDGETS_EXPORT void loadResource (const Path &path, const Ogre::String &resourceGroup)
 
MIRA_GUI_WIDGETS_EXPORT void setTransform (Ogre::SceneNode *node, const RigidTransform2f &t)
 Sets position and orientation of the scene node according to the specified transform. More...
 
MIRA_GUI_WIDGETS_EXPORT void setTransform (Ogre::SceneNode *node, const RigidTransform3f &t)
 Sets position and orientation of the scene node according to the specified transform. More...
 
MIRA_GUI_WIDGETS_EXPORT void setPosition (Ogre::SceneNode *node, const Eigen::Vector2f &t)
 Sets the position of the scene node according to the specified translation. More...
 
MIRA_GUI_WIDGETS_EXPORT void setPosition (Ogre::SceneNode *node, const Eigen::Vector3f &t)
 Sets the position of the scene node according to the specified translation. More...
 
MIRA_GUI_WIDGETS_EXPORT void setOrientation (Ogre::SceneNode *node, const Eigen::Rotation2D< float > &r)
 Sets the orientation of the scene node according to the specified rotation. More...
 
MIRA_GUI_WIDGETS_EXPORT void setOrientation (Ogre::SceneNode *node, const Eigen::Quaternion< float > &r)
 Sets the orientation of the scene node according to the specified rotation. More...
 
MIRA_GUI_WIDGETS_EXPORT bool hasAttachedObject (Ogre::SceneNode *node, Ogre::MovableObject *object)
 Returns true if object is directly or indirectly attached to the given node. More...
 
MIRA_GUI_WIDGETS_EXPORT void rayQuery (Ogre::SceneNode *node, const Ogre::Ray &ray, Ogre::RaySceneQueryResult &oResult, uint32 queryMask=0xFFFFFFFF)
 Performs ray intersection tests for ALL movable objects in the specified scene node and all of its child nodes. More...
 
MIRA_GUI_WIDGETS_EXPORT
std::pair< bool, float > 
rayObjectCollision (const Ogre::Ray &ray, const Ogre::MovableObject *object)
 Performs a ray/object collision check. More...
 

Function Documentation

Ogre::Vector3 mira::OgreUtils::toOgreVector ( const TPoint &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< Point2f > ( const Point2f &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< Point3f > ( const Point3f &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< Pose2 > ( const Pose2 &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< PoseCov2 > ( const PoseCov2 &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< Pose3 > ( const Pose3 &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< PoseCov3 > ( const PoseCov3 &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransform< double, 2 > > ( const RigidTransform< double, 2 > &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransformCov< double, 2 > > ( const RigidTransformCov< double, 2 > &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransform< double, 3 > > ( const RigidTransform< double, 3 > &  p)
inline
Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransformCov< double, 3 > > ( const RigidTransformCov< double, 3 > &  p)
inline
Ogre::ColourValue mira::OgreUtils::toOgreColor ( const ColorType &  c)
inline
Ogre::ColourValue mira::OgreUtils::toOgreColor< Color::RGB > ( const Color::RGB &  c)
inline
Ogre::ColourValue mira::OgreUtils::toOgreColor< Color::RGBA > ( const Color::RGBA &  c)
inline
MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::loadResource ( const Path &  path,
const Ogre::String &  resourceGroup 
)
MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::setTransform ( Ogre::SceneNode *  node,
const RigidTransform2f &  t 
)

Sets position and orientation of the scene node according to the specified transform.

Examples:
tutorials/Point3Visualization.C.
MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::setTransform ( Ogre::SceneNode *  node,
const RigidTransform3f &  t 
)

Sets position and orientation of the scene node according to the specified transform.

MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::setPosition ( Ogre::SceneNode *  node,
const Eigen::Vector2f &  t 
)

Sets the position of the scene node according to the specified translation.

MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::setPosition ( Ogre::SceneNode *  node,
const Eigen::Vector3f &  t 
)

Sets the position of the scene node according to the specified translation.

MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::setOrientation ( Ogre::SceneNode *  node,
const Eigen::Rotation2D< float > &  r 
)

Sets the orientation of the scene node according to the specified rotation.

MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::setOrientation ( Ogre::SceneNode *  node,
const Eigen::Quaternion< float > &  r 
)

Sets the orientation of the scene node according to the specified rotation.

MIRA_GUI_WIDGETS_EXPORT bool mira::OgreUtils::hasAttachedObject ( Ogre::SceneNode *  node,
Ogre::MovableObject *  object 
)

Returns true if object is directly or indirectly attached to the given node.

MIRA_GUI_WIDGETS_EXPORT void mira::OgreUtils::rayQuery ( Ogre::SceneNode *  node,
const Ogre::Ray &  ray,
Ogre::RaySceneQueryResult &  oResult,
uint32  queryMask = 0xFFFFFFFF 
)

Performs ray intersection tests for ALL movable objects in the specified scene node and all of its child nodes.

All movable objects that are hit by the ray are stored in oResult.

MIRA_GUI_WIDGETS_EXPORT std::pair<bool,float> mira::OgreUtils::rayObjectCollision ( const Ogre::Ray &  ray,
const Ogre::MovableObject *  object 
)

Performs a ray/object collision check.

If the ray collides with the object, this method returns (true, distance to collision). If the ray does not collide with the object the method returns (false, ?). The intersection point can be computed as: ray.getPoint(result.second); For an Entity and ManualObject this method performs the tests down to polygon level.