MIRA
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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)
 
void loadResource (const Path &path, const Ogre::String &resourceGroup)
 
void setTransform (Ogre::SceneNode *node, const RigidTransform2f &t)
 Sets position and orientation of the scene node according to the specified transform. More...
 
void setTransform (Ogre::SceneNode *node, const RigidTransform3f &t)
 Sets position and orientation of the scene node according to the specified transform. More...
 
void setPosition (Ogre::SceneNode *node, const Eigen::Vector2f &t)
 Sets the position of the scene node according to the specified translation. More...
 
void setPosition (Ogre::SceneNode *node, const Eigen::Vector3f &t)
 Sets the position of the scene node according to the specified translation. More...
 
void setOrientation (Ogre::SceneNode *node, const Eigen::Rotation2D< float > &r)
 Sets the orientation of the scene node according to the specified rotation. More...
 
void setOrientation (Ogre::SceneNode *node, const Eigen::Quaternion< float > &r)
 Sets the orientation of the scene node according to the specified rotation. More...
 
bool hasAttachedObject (Ogre::SceneNode *node, Ogre::MovableObject *object)
 Returns true if object is directly or indirectly attached to the given node. More...
 
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...
 
std::pair< bool, float > rayObjectCollision (const Ogre::Ray &ray, const Ogre::MovableObject *object)
 Performs a ray/object collision check. More...
 

Function Documentation

◆ toOgreVector()

Ogre::Vector3 mira::OgreUtils::toOgreVector ( const TPoint &  p)
inline

◆ toOgreVector< Point2f >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< Point2f > ( const Point2f p)
inline

◆ toOgreVector< Point3f >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< Point3f > ( const Point3f p)
inline

◆ toOgreVector< Pose2 >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< Pose2 > ( const Pose2 p)
inline

◆ toOgreVector< PoseCov2 >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< PoseCov2 > ( const PoseCov2 p)
inline

◆ toOgreVector< Pose3 >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< Pose3 > ( const Pose3 p)
inline

◆ toOgreVector< PoseCov3 >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< PoseCov3 > ( const PoseCov3 p)
inline

◆ toOgreVector< RigidTransform< double, 2 > >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransform< double, 2 > > ( const RigidTransform< double, 2 > &  p)
inline

◆ toOgreVector< RigidTransformCov< double, 2 > >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransformCov< double, 2 > > ( const RigidTransformCov< double, 2 > &  p)
inline

◆ toOgreVector< RigidTransform< double, 3 > >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransform< double, 3 > > ( const RigidTransform< double, 3 > &  p)
inline

◆ toOgreVector< RigidTransformCov< double, 3 > >()

Ogre::Vector3 mira::OgreUtils::toOgreVector< RigidTransformCov< double, 3 > > ( const RigidTransformCov< double, 3 > &  p)
inline

◆ toOgreColor()

Ogre::ColourValue mira::OgreUtils::toOgreColor ( const ColorType &  c)
inline

◆ toOgreColor< Color::RGB >()

Ogre::ColourValue mira::OgreUtils::toOgreColor< Color::RGB > ( const Color::RGB c)
inline

◆ toOgreColor< Color::RGBA >()

Ogre::ColourValue mira::OgreUtils::toOgreColor< Color::RGBA > ( const Color::RGBA c)
inline

◆ loadResource()

void mira::OgreUtils::loadResource ( const Path path,
const Ogre::String &  resourceGroup 
)

◆ setTransform() [1/2]

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.

◆ setTransform() [2/2]

void mira::OgreUtils::setTransform ( Ogre::SceneNode *  node,
const RigidTransform3f t 
)

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

◆ setPosition() [1/2]

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

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

◆ setPosition() [2/2]

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

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

◆ setOrientation() [1/2]

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

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

◆ setOrientation() [2/2]

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

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

◆ hasAttachedObject()

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

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

◆ rayQuery()

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.

◆ rayObjectCollision()

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.