47 #include <visp/vpOpenCVGrabber.h>
48 #include <visp/vpV4l2Grabber.h>
49 #include <visp/vp1394TwoGrabber.h>
50 #include <visp/vpDirectShowGrabber.h>
51 #include <visp/vpHomogeneousMatrix.h>
52 #include <visp/vpImage.h>
53 #include <visp/vpCameraParameters.h>
54 #include <visp/vpAROgre.h>
56 #if defined(VISP_HAVE_OGRE)
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60 class vpAROgreAdvanced :
public vpAROgre
64 Ogre::AnimationState * mAnimationState;
68 unsigned int width = 640,
unsigned int height = 480)
77 Ogre::Entity* robot = mSceneMgr->createEntity(
"Robot",
"robot.mesh");
79 Ogre::SceneNode* RobotNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(
"Robot");
81 RobotNode->attachObject(robot);
82 RobotNode->scale(0.001f,0.001f,0.001f);
83 RobotNode->pitch(Ogre::Degree(180));
84 RobotNode->yaw(Ogre::Degree(-90));
88 mAnimationState = robot->getAnimationState(
"Idle" );
90 mAnimationState->setLoop(
true );
92 mAnimationState->setEnabled(
true );
99 mAnimationState->addTime( evt.timeSinceLastFrame );
109 #if defined(VISP_HAVE_OGRE)
112 #if defined(VISP_HAVE_V4L2)
115 #elif defined(VISP_HAVE_DC1394_2)
118 #elif defined(VISP_HAVE_DIRECTSHOW)
121 #elif defined(VISP_HAVE_OPENCV)
125 # error "You need an available framegrabber to run this example"
147 vpAROgreAdvanced ogre(cam, (
unsigned int)grabber.
getWidth(), (
unsigned int)grabber.
getHeight());
152 while(ogre.continueRendering()){
159 ogre.display(I, cMo);
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
virtual bool customframeEnded(const Ogre::FrameEvent &evt)
Implementation of an augmented reality viewer.
unsigned int getWidth() const
Return the number of columns in the image.
Generic class defining intrinsic camera parameters.
void setPosition(const vpRobot::vpControlFrameType, const vpColVector &)
Set a displacement (frame has to be specified) in position control.
Class for the Video4Linux2 video device.
virtual void createScene(void)
void init()
Basic initialisation (identity).
void acquire(vpImage< unsigned char > &I)
Class for firewire ieee1394 video devices using libdc1394-2.x api.
unsigned int getHeight() const
Return the number of rows in the image.
Class for cameras video capture using OpenCV library.